karbon
vcolorslider.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef VCOLORSLIDER_H
00023 #define VCOLORSLIDER_H
00024
00025 #include <qwidget.h>
00026
00027 class QLabel;
00028 class KIntSpinBox;
00029 class KGradientSelector;
00030
00035 class VColorSlider : public QWidget
00036 {
00037 Q_OBJECT
00038 public:
00045 VColorSlider( QWidget* parent = 0L, const char* name = 0L );
00046
00059 VColorSlider( const QString& label, const QColor& col1, const QColor& col2,
00060 int min, int max, int value, QWidget* parent = 0L, const char* name = 0L );
00061
00063 ~VColorSlider();
00064
00070 bool isDragging() { return m_isDragging; }
00071 public slots:
00072
00078 virtual void setLabel( const QString& label );
00079
00086 virtual void setColors( const QColor& color1, const QColor& color2 );
00087
00093 virtual void setValue( int value );
00094
00100 virtual void setMinValue( int value );
00101
00107 virtual void setMaxValue( int value );
00108
00114 int value();
00115
00116 private:
00117 void init();
00118 bool eventFilter( QObject *obj, QEvent *ev );
00119 QLabel* m_label;
00120 KIntSpinBox* m_spinBox;
00121 KGradientSelector* m_gradientSelect;
00122 bool m_isDragging;
00123 int m_minValue;
00124 int m_maxValue;
00125
00126 signals:
00133 void valueChanged( int value );
00134
00135 private slots:
00136 void updateFrom_spinBox( int );
00137 void updateFrom_gradientSelect( int );
00138 };
00139
00140 #endif
00141
|