diff options
Diffstat (limited to 'Swift/QtUI/QtColorToolButton.h')
-rw-r--r-- | Swift/QtUI/QtColorToolButton.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/Swift/QtUI/QtColorToolButton.h b/Swift/QtUI/QtColorToolButton.h index 33d195d..babafc5 100644 --- a/Swift/QtUI/QtColorToolButton.h +++ b/Swift/QtUI/QtColorToolButton.h @@ -4,29 +4,35 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once #include <QToolButton> namespace Swift { - class QtColorToolButton : public QToolButton { - Q_OBJECT - Q_PROPERTY(QColor color READ getColor WRITE setColor NOTIFY colorChanged) - public: - explicit QtColorToolButton(QWidget* parent = NULL); - void setColor(const QColor& color); - const QColor& getColor() const { return color_; } + class QtColorToolButton : public QToolButton { + Q_OBJECT + Q_PROPERTY(QColor color READ getColor WRITE setColor NOTIFY colorChanged) + public: + explicit QtColorToolButton(QWidget* parent = nullptr); + void setColor(const QColor& color); + const QColor& getColor() const { return color_; } - signals: - void colorChanged(const QColor&); + signals: + void colorChanged(const QColor&); - private slots: - void onClicked(); + private slots: + void onClicked(); - private: - void setColorIcon(const QColor& color); - QColor color_; - }; + private: + void setColorIcon(const QColor& color); + QColor color_; + }; } |