| 1 | #ifndef MANTID_API_FADING_FRAME_H_ |
|---|
| 2 | #define MANTID_API_FADING_FRAME_H_ |
|---|
| 3 | |
|---|
| 4 | #include "DllOption.h" |
|---|
| 5 | |
|---|
| 6 | #include <QFrame> |
|---|
| 7 | #include <QColor> |
|---|
| 8 | |
|---|
| 9 | class QWidget; |
|---|
| 10 | |
|---|
| 11 | namespace MantidQt |
|---|
| 12 | { |
|---|
| 13 | namespace API |
|---|
| 14 | { |
|---|
| 15 | /** |
|---|
| 16 | * |
|---|
| 17 | * |
|---|
| 18 | * Copyright © 2014 ISIS Rutherford Appleton Laboratory & NScD Oak Ridge National Laboratory |
|---|
| 19 | * |
|---|
| 20 | * This file is part of Mantid. |
|---|
| 21 | * |
|---|
| 22 | * Mantid is free software; you can redistribute it and/or modify |
|---|
| 23 | * it under the terms of the GNU General Public License as published by |
|---|
| 24 | * the Free Software Foundation; either version 3 of the License, or |
|---|
| 25 | * (at your option) any later version. |
|---|
| 26 | * |
|---|
| 27 | * Mantid is distributed in the hope that it will be useful, |
|---|
| 28 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 29 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 30 | * GNU General Public License for more details. |
|---|
| 31 | * |
|---|
| 32 | * You should have received a copy of the GNU General Public License |
|---|
| 33 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 34 | * |
|---|
| 35 | * File change history is stored at: <https://github.com/mantidproject/mantid> |
|---|
| 36 | * Code Documentation is available at: <http://doxygen.mantidproject.org> |
|---|
| 37 | */ |
|---|
| 38 | class EXPORT_OPT_MANTIDQT_API FadingFrame : public QFrame |
|---|
| 39 | { |
|---|
| 40 | Q_OBJECT |
|---|
| 41 | |
|---|
| 42 | public: |
|---|
| 43 | FadingFrame(QWidget * parent = 0); |
|---|
| 44 | |
|---|
| 45 | Q_PROPERTY(QColor fadeBorderColor READ fadeBorderColor WRITE setFadeBorderColor); |
|---|
| 46 | Q_PROPERTY(QColor fadeBackgroundColor READ fadeBackgroundColor WRITE setFadeBackgroundColor); |
|---|
| 47 | |
|---|
| 48 | QColor fadeBorderColor() const { return m_fadeBorderColor; } |
|---|
| 49 | QColor fadeBackgroundColor() const { return m_fadeBackgroundColor; } |
|---|
| 50 | |
|---|
| 51 | void setFadeBorderColor( const QColor & fadeBorderColor ); |
|---|
| 52 | void setFadeBackgroundColor( const QColor & fadeBackgroundColor ); |
|---|
| 53 | |
|---|
| 54 | void doFadeAnimation(); |
|---|
| 55 | |
|---|
| 56 | private: |
|---|
| 57 | void setStyle(const QColor & borderColor, const QColor & backgroundColor); |
|---|
| 58 | |
|---|
| 59 | QColor m_fadeBorderColor; |
|---|
| 60 | QColor m_fadeBackgroundColor; |
|---|
| 61 | }; |
|---|
| 62 | |
|---|
| 63 | |
|---|
| 64 | } // namespace API |
|---|
| 65 | } // namespace MantidQt |
|---|
| 66 | |
|---|
| 67 | #endif /* MANTID_API_FADING_FRAME_H_ */ |
|---|