00001 #ifndef __COLOURSDIALOG_HPP__
00002 #define __COLOURSDIALOG_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 #include <QVector>
00029 #include <QColor>
00030
00031 class QWidget;
00032 class QVBoxLayout;
00033 class QFrame;
00034 class QGridLayout;
00035 class PaletteDisplayer;
00036
00041 class ColoursDialog : public QDialog
00042 {
00043 Q_OBJECT
00044
00045 private:
00046
00047 QVBoxLayout* pMainLayout;
00049 QFrame* pButtonFrame;
00050 QGridLayout* pButtonLayout;
00052 PaletteDisplayer* pd;
00054 QPushButton* pRandomButton;
00055 QPushButton* pGradientButton;
00056 QPushButton* pColoration1Button;
00057 QPushButton* pColoration2Button;
00058 QPushButton* pColoration3Button;
00059 QPushButton* pCustomiseButton;
00060 QPushButton* pApplyButton;
00061 QPushButton* pValidateButton;
00062 QPushButton* pCancelButton;
00064 QPushButton* pLoadPaletteButton;
00065 QPushButton* pSavePaletteButton;
00067 QVector<QRgb> oldTable;
00068 QVector<QRgb> table;
00070 signals:
00074 void coloursTableChanged(QVector<QRgb>);
00075
00076 public slots:
00077
00082 void randomColours(void);
00083
00089 void gradientColours(void);
00090
00095 void coloration1(void);
00096
00101 void coloration2(void);
00102
00107 void coloration3(void);
00108
00113 void customiseTable(void);
00114
00119 void apply(void);
00120
00124 void applyNewTable(QVector<QRgb> newTable);
00125
00130 void validate(void);
00131
00136 void cancel(void);
00137
00142 void loadPalette(void);
00143
00148 void savePalette(void);
00149
00150 public:
00151
00158 ColoursDialog(const QVector<QRgb> table, QWidget* parent);
00159
00163 ~ColoursDialog(void);
00164
00169 QVector<QRgb> getColourTable(void)const { return table; };
00170 };
00171
00172 #endif