00001
00002
00003
00004
00005
00006 #ifndef MAINCOLORFORM_H
00007 #define MAINCOLORFORM_H
00008
00009 #include <QtGui/QWidget>
00010 #include <QColor>
00011
00012 namespace Ui {
00013 class MainColorForm;
00014 }
00015
00016 namespace srchiliteqt {
00017
00022 class MainColorForm : public QWidget {
00023 Q_OBJECT
00024 Q_DISABLE_COPY(MainColorForm)
00025 public:
00026 explicit MainColorForm(QWidget *parent = 0);
00027 virtual ~MainColorForm();
00028
00033 void setColor(const QColor &color);
00034
00039 void setBackgroundColor(const QColor &color);
00040
00044 const QColor &getColor() const {
00045 return foreground;
00046 }
00047
00051 const QColor &getBackgroundColor() const {
00052 return background;
00053 }
00054
00055 protected:
00056 virtual void changeEvent(QEvent *e);
00057
00058 private:
00059 Ui::MainColorForm *m_ui;
00060
00061 QColor foreground;
00062
00063 QColor background;
00064
00065 private slots:
00066 void selectBackground();
00067 void selectForeground();
00068 };
00069
00070 }
00071
00072 #endif // MAINCOLORFORM_H