diff --git a/src/Editor/Widgets/WColorPicker.cpp b/src/Editor/Widgets/WColorPicker.cpp index be6417ae..42eda4b7 100644 --- a/src/Editor/Widgets/WColorPicker.cpp +++ b/src/Editor/Widgets/WColorPicker.cpp @@ -6,7 +6,6 @@ WColorPicker::WColorPicker(QWidget *parent) : QWidget(parent) - , mColor(Qt::transparent) { } @@ -79,7 +78,7 @@ void WColorPicker::mouseReleaseEvent(QMouseEvent *pEvent) } } -QColor WColorPicker::Color() +QColor WColorPicker::Color() const { return mColor; } diff --git a/src/Editor/Widgets/WColorPicker.h b/src/Editor/Widgets/WColorPicker.h index ff1bd61b..2c4f9e1d 100644 --- a/src/Editor/Widgets/WColorPicker.h +++ b/src/Editor/Widgets/WColorPicker.h @@ -7,16 +7,17 @@ class WColorPicker : public QWidget { Q_OBJECT - QColor mColor; + QColor mColor{Qt::transparent}; QColor mOldColor; public: - explicit WColorPicker(QWidget *pParent = 0); - void paintEvent(QPaintEvent *); - void keyPressEvent(QKeyEvent *pEvent); - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *pEvent); - QColor Color(); + explicit WColorPicker(QWidget* pParent = nullptr); + + void paintEvent(QPaintEvent*) override; + void keyPressEvent(QKeyEvent* pEvent) override; + void mousePressEvent(QMouseEvent*) override; + void mouseReleaseEvent(QMouseEvent* pEvent) override; + QColor Color() const; void SetColor(QColor Color); signals: