28 #include <QtGui/QAbstractSlider>
29 #include <QtGui/QGradient>
30 #include <QtGui/QWidget>
41 class KDEUI_EXPORT
KSelector :
public QAbstractSlider
44 Q_PROPERTY(
int value READ value WRITE setValue )
45 Q_PROPERTY(
int minValue READ minimum WRITE setMinimum )
46 Q_PROPERTY(
int maxValue READ maximum WRITE setMaximum )
47 Q_PROPERTY(
bool indent READ indent WRITE setIndent )
48 Q_PROPERTY( Qt::ArrowType arrowDirection READ arrowDirection WRITE setArrowDirection )
68 QRect contentsRect() const;
74 void setIndent(
bool i );
84 void setArrowDirection( Qt::ArrowType direction );
89 Qt::ArrowType arrowDirection() const;
98 virtual
void drawContents( QPainter * );
103 virtual
void drawArrow( QPainter *painter, const
QPoint &pos );
105 virtual
void paintEvent( QPaintEvent * );
106 virtual
void mousePressEvent( QMouseEvent *e );
107 virtual
void mouseMoveEvent( QMouseEvent *e );
108 virtual
void mouseReleaseEvent( QMouseEvent *e );
109 virtual
void wheelEvent( QWheelEvent * );
112 QPoint calcArrowPos(
int val );
113 void moveArrow( const
QPoint &pos );
117 friend class Private;
136 Q_PROPERTY(
QColor firstColor READ firstColor WRITE setFirstColor )
137 Q_PROPERTY(
QColor secondColor READ secondColor WRITE setSecondColor )
138 Q_PROPERTY(
QString firstText READ firstText WRITE setFirstText )
139 Q_PROPERTY(
QString secondText READ secondText WRITE setSecondText )
162 void setStops(const QGradientStops &stops);
168 QGradientStops stops() const;
173 void setColors( const
QColor &col1, const
QColor &col2 );
179 void setFirstColor( const
QColor &col );
180 void setSecondColor( const
QColor &col );
185 void setFirstText( const
QString &t );
186 void setSecondText( const
QString &t );
188 QColor firstColor() const;
189 QColor secondColor() const;
196 virtual
void drawContents( QPainter * );
197 virtual
QSize minimumSize() const;
200 class KGradientSelectorPrivate;
201 friend class KGradientSelectorPrivate;
202 KGradientSelectorPrivate * const d;
207 #endif // KSELECTOR_H
The KGradientSelector widget allows the user to choose from a one-dimensional range of colors which i...
KSelector is the base class for other widgets which provides the ability to choose from a one-dimensi...