// // C++ Interface: colorslider // // Description: // // // Author: Andreas Krumnow <andreas@krumnow.de>, (C) 2006 // // Copyright: See COPYING file that comes with this distribution // // #ifndef COLORSLIDER_H #define COLORSLIDER_H #include <QWidget> #include <QBoxLayout> #include <QSlider> #include <QLabel> #include <QPixmap> #include <QPainter> /** @author Andreas Krumnow <andreas@krumnow.de> */ class ColorSlider : public QSlider { Q_OBJECT private: QPainter *stift; int max_col, curIntCol; protected: void paintEvent ( QPaintEvent * ); public: ColorSlider(Qt::Orientation, QWidget *parent = 0); ~ColorSlider(){} QRgb intSldrToRgb(const int i); int getCurIntCol(){ return curIntCol; } public slots: void setValue(int value); signals: void valueChanged( QRgb newValue ); }; #endif