23 #ifndef __TDESELECT_H__
24 #define __TDESELECT_H__
27 #include <tqrangecontrol.h>
30 #include <tdelibs_export.h>
46 TQ_PROPERTY(
int xValue READ xValue WRITE setXValue )
47 TQ_PROPERTY(
int yValue READ yValue WRITE setYValue )
54 KXYSelector( TQWidget *parent=0,
const char *name=0 );
66 void setValues(
int xPos,
int yPos );
72 void setXValue(
int xPos );
78 void setYValue(
int yPos );
83 void setRange(
int minX,
int minY,
int maxX,
int maxY );
97 TQRect contentsRect()
const;
113 virtual void drawContents( TQPainter * );
118 virtual void drawCursor( TQPainter *p,
int xp,
int yp );
120 virtual void paintEvent( TQPaintEvent *e );
121 virtual void mousePressEvent( TQMouseEvent *e );
122 virtual void mouseMoveEvent( TQMouseEvent *e );
123 virtual void wheelEvent( TQWheelEvent * );
128 void valuesFromPosition(
int x,
int y,
int& xVal,
int& yVal )
const;
131 void setPosition(
int xp,
int yp );
143 virtual void virtual_hook(
int id,
void* data );
145 class KXYSelectorPrivate;
146 KXYSelectorPrivate *d;
159 class TDEUI_EXPORT
TDESelector :
public TQWidget,
public TQRangeControl
162 TQ_PROPERTY(
int value READ value WRITE setValue )
163 TQ_PROPERTY(
int minValue READ minValue WRITE setMinValue )
164 TQ_PROPERTY(
int maxValue READ maxValue WRITE setMaxValue )
170 TDESelector( TQWidget *parent=0,
const char *name=0 );
175 TDESelector( Orientation o, TQWidget *parent = 0L,
const char *name = 0L );
185 {
return _orientation; }
190 TQRect contentsRect()
const;
208 { TQRangeControl::setValue(value); }
214 {
return TQRangeControl::value(); }
220 { TQRangeControl::setMinValue(value); }
226 {
return TQRangeControl::minValue(); }
232 { TQRangeControl::setMaxValue(value); }
238 {
return TQRangeControl::maxValue(); }
254 virtual void drawContents( TQPainter * );
262 virtual void drawArrow( TQPainter *painter,
bool show,
const TQPoint &pos );
264 virtual void valueChange();
265 virtual void paintEvent( TQPaintEvent * );
266 virtual void mousePressEvent( TQMouseEvent *e );
267 virtual void mouseMoveEvent( TQMouseEvent *e );
268 virtual void wheelEvent( TQWheelEvent * );
271 TQPoint calcArrowPos(
int val );
272 void moveArrow(
const TQPoint &pos );
274 Orientation _orientation;
278 virtual void virtual_hook(
int id,
void* data );
280 class TDESelectorPrivate;
281 TDESelectorPrivate *d;
297 TQ_PROPERTY( TQColor firstColor READ firstColor WRITE setFirstColor )
298 TQ_PROPERTY( TQColor secondColor READ secondColor WRITE setSecondColor )
299 TQ_PROPERTY( TQString firstText READ firstText WRITE setFirstText )
300 TQ_PROPERTY( TQString secondText READ secondText WRITE setSecondText )
320 void setColors(
const TQColor &col1,
const TQColor &col2 )
321 { color1 = col1; color2 = col2; update();}
322 void setText(
const TQString &t1,
const TQString &t2 )
323 { text1 = t1; text2 = t2; update(); }
329 { color1 = col; update(); }
330 void setSecondColor(
const TQColor &col )
331 { color2 = col; update(); }
337 { text1 = t; update(); }
338 void setSecondText(
const TQString &t )
339 { text2 = t; update(); }
341 const TQColor firstColor()
const
343 const TQColor secondColor()
const
346 const TQString firstText()
const
348 const TQString secondText()
const
353 virtual void drawContents( TQPainter * );
354 virtual TQSize minimumSize()
const
355 {
return sizeHint(); }
365 virtual void virtual_hook(
int id,
void* data );
367 class KGradientSelectorPrivate;
368 KGradientSelectorPrivate *d;
The KGradientSelector widget allows the user to choose from a one-dimensional range of colors which i...
void setFirstColor(const TQColor &col)
Set each color on its own.
void setFirstText(const TQString &t)
Set each description on its own.
void setColors(const TQColor &col1, const TQColor &col2)
Sets the two colors which span the gradient.
KXYSelector is the base class for other widgets which provides the ability to choose from a two-dimen...
void valueChanged(int x, int y)
This signal is emitted whenever the user chooses a value, e.g.
TDESelector is the base class for other widgets which provides the ability to choose from a one-dimen...
Orientation orientation() const
void valueChanged(int value)
This signal is emitted whenever the user chooses a value, e.g.
void setMinValue(int value)
Sets the min value.
void setValue(int value)
Sets the value.
void setIndent(bool i)
Sets the indent option of the widget to i.
void setMaxValue(int value)
Sets the max value.