2015-06-02 19:42:10 -07:00
|
|
|
#ifndef COLORLINEEDIT_H
|
|
|
|
#define COLORLINEEDIT_H
|
2017-03-06 01:00:41 -08:00
|
|
|
#include <QColorDialog>
|
2015-06-02 19:42:10 -07:00
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QPushButton>
|
|
|
|
|
|
|
|
class QToolButton;
|
|
|
|
|
|
|
|
class ColorLineEdit : public QLineEdit
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit ColorLineEdit(QWidget *parent = NULL);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void selectColor();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void updateColorButton(const QString &text);
|
|
|
|
|
|
|
|
private:
|
|
|
|
//QString styleSheetForCurrentState() const;
|
|
|
|
QString buttonStyleSheetForCurrentState() const;
|
|
|
|
|
|
|
|
QToolButton *mColorButton;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // COLORLINEEDIT_H
|