00001 #ifndef __COLOURDIALOG_HPP__
00002 #define __COLOURDIALOG_HPP__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <QDialog>
00027
00028 class QGridLayout;
00029 class QFrame;
00030 class QSpinBox;
00031 class QPushButton;
00032 class FrameColored;
00033
00037 class ColourDialog : public QDialog
00038 {
00039 Q_OBJECT
00040
00041 private:
00042 QVector<QRgb> table;
00044 QGridLayout* pMainGrid;
00045 FrameColored* pColourBox;
00047 QSpinBox* pColourSelector;
00049 QPushButton* pColourButton;
00050 QPushButton* pCancelButton;
00051 QPushButton* pApplyButton;
00052 QPushButton* pValidateButton;
00054 signals:
00055
00059 void needsApply(QVector<QRgb>);
00060
00061 public slots:
00062
00066 void changeFrameColour(int index);
00067
00071 void changeColour(void);
00072
00076 void cancel(void);
00077
00081 void apply(void);
00082
00086 void validate(void);
00087
00088
00089 public:
00090
00097 ColourDialog(const QVector<QRgb>& table, QWidget* parent = 0);
00098
00102 ~ColourDialog(void);
00103
00108 QVector<QRgb> getTable(void)const { return table; };
00109 };
00110
00111 #endif