X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fchoosecolorwidget.h;h=dc04d22fe219e7d8d57ab3c3d3e8f0c4d29b527b;hb=4ae3260592acc87712db77b7d3fe0cc2be7d76bc;hp=4c2c2ff2bb46246043e7b3e57457d0b4c8438687;hpb=7d708fd156c646b36c91cffaed60e5cf777f95d9;p=kdenlive diff --git a/src/choosecolorwidget.h b/src/choosecolorwidget.h index 4c2c2ff2..dc04d22f 100644 --- a/src/choosecolorwidget.h +++ b/src/choosecolorwidget.h @@ -21,7 +21,6 @@ #ifndef CHOOSECOLORWIDGET_H #define CHOOSECOLORWIDGET_H -#include #include class KColorButton; @@ -38,26 +37,26 @@ class ChooseColorWidget : public QWidget public: /** @brief Sets up the widget. * @param text (optional) What the color will be used for - * @param color (optional) initial color */ - ChooseColorWidget(QString text = QString(), QString color = "0xffffffff", QWidget* parent = 0); + * @param color (optional) initial color + * @param alphaEnabled (optional) Should transparent colors be enabled */ + explicit ChooseColorWidget(const QString &text = QString(), const QString &color = "0xffffffff", bool alphaEnabled = false, QWidget* parent = 0); /** @brief Gets the choosen color. */ - QString getColor(); - /** @brief Enable the use of alpha channel. - * @param enabled (required) whether alpha is enabled or disabled */ - void setAlphaChannelEnabled(bool enabled); + QString getColor() const; private: KColorButton *m_button; private slots: /** @brief Updates the different color choosing options to have all selected @param color. */ - void setColor(QColor color); + void setColor(const QColor &color); signals: /** @brief Emitted whenever a different color was choosen. */ void modified(); void displayMessage(const QString&, int); + /** @brief When user wants to pick a color, it's better to disable filter so we get proper color values. */ + void disableCurrentFilter(bool); }; #endif