00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COLOURVALUEPREF_H
00021 #define COLOURVALUEPREF_H
00022
00023 #include "labelini.h"
00024 #include "doscolourbox.h"
00025 #include "spinvalue.h"
00026 #include "scheditprefs.h"
00027
00028 #include <qpainter.h>
00029 #include <qcanvas.h>
00030
00031 class KDialogBase;
00032 class KConfig;
00033
00037 class ColourValuePref : public ScheditPrefs {
00038 Q_OBJECT
00039 private:
00040 QColor colour;
00041 LabelIni laColour;
00042 DosColourBox dcb;
00043
00044 LabelIni laValue;
00045 SpinValue svValue;
00046
00047 QLabel pixLl;
00048
00049 QCanvasView view;
00050 QHBoxLayout * hbLayout;
00051
00052 bool bSpinBox;
00053 QCanvas canvas;
00054
00055 void readPreferences ( KConfigGroup * config );
00056 void writePreferences ( KConfigGroup * config );
00057 void renderPage ();
00058
00059 public:
00060 typedef struct {
00061 QBrush brush;
00062 int iSize;
00063 } JunctionData;
00064
00065 ColourValuePref ( KDialogBase * dlg,
00066 QString qsTitle,
00067 QString qsKey);
00068 void showSpinBox ( bool bEnable );
00069 QColor getColour ();
00070 int getValue ();
00071 void setSpinBoxTitle ( QString qs );
00072 void setupPainter ( QPainter& painter);
00073 QCanvas * getCanvas ();
00074 QVBoxLayout * addLayout ( void );
00075 QCheckBox * createCb ( QString qs, QVBoxLayout * bl );
00076 void layoutCb ( QCheckBox * cb, QVBoxLayout * vbLayout );
00077 void adjustForCheckBoxes ( void );
00078 };
00079
00080 #endif