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;
104 void valueChanged(
int x,
int y );
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 );
184 Orientation orientation()
const
185 {
return _orientation; }
190 TQRect contentsRect()
const;
196 void setIndent(
bool i )
207 void setValue(
int value)
208 { TQRangeControl::setValue(value); }
214 {
return TQRangeControl::value(); }
219 void setMinValue(
int value)
220 { TQRangeControl::setMinValue(value); }
226 {
return TQRangeControl::minValue(); }
231 void setMaxValue(
int value)
232 { TQRangeControl::setMaxValue(value); }
238 {
return TQRangeControl::maxValue(); }
245 void valueChanged(
int value );
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(); }
328 void setFirstColor(
const TQColor &col )
329 { color1 = col; update(); }
330 void setSecondColor(
const TQColor &col )
331 { color2 = col; update(); }
336 void setFirstText(
const TQString &t )
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
354 virtual TQSize minimumSize()
const
355 {
return sizeHint(); }
365 virtual void virtual_hook(
int id,
void* data );
367 class KGradientSelectorPrivate;
368 KGradientSelectorPrivate *d;
372 #endif // __TDESELECT_H__