• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kdeui

KSelector Class Reference

KSelector is the base class for other widgets which provides the ability to choose from a one-dimensional range of values. More...

#include <kselect.h>

Inheritance diagram for KSelector:

Inheritance graph
[legend]

List of all members.


Signals

void valueChanged (int value)

Public Member Functions

QRect contentsRect () const
bool indent () const
 KSelector (Orientation o, QWidget *parent=0L, const char *name=0L)
 KSelector (QWidget *parent=0, const char *name=0)
int maxValue () const
int minValue () const
Orientation orientation () const
void setIndent (bool i)
void setMaxValue (int value)
void setMinValue (int value)
void setValue (int value)
int value () const
 ~KSelector ()

Protected Member Functions

virtual void drawArrow (QPainter *painter, bool show, const QPoint &pos)
virtual void drawContents (QPainter *)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void paintEvent (QPaintEvent *)
virtual void valueChange ()
virtual void virtual_hook (int id, void *data)
virtual void wheelEvent (QWheelEvent *)

Properties

int maxValue
int minValue
int value

Detailed Description

KSelector is the base class for other widgets which provides the ability to choose from a one-dimensional range of values.

An example is the KGradientSelector which allows to choose from a range of colors.

A custom drawing routine for the widget surface has to be provided by the subclass.

Definition at line 159 of file kselect.h.


Constructor & Destructor Documentation

KSelector::KSelector ( QWidget *  parent = 0,
const char *  name = 0 
)

Constructs a horizontal one-dimensional selection widget.

Definition at line 238 of file kselect.cpp.

KSelector::KSelector ( Orientation  o,
QWidget *  parent = 0L,
const char *  name = 0L 
)

Constructs a one-dimensional selection widget with a given orientation.

Definition at line 245 of file kselect.cpp.

KSelector::~KSelector (  ) 

Definition at line 253 of file kselect.cpp.


Member Function Documentation

QRect KSelector::contentsRect (  )  const

Returns:
the rectangle on which subclasses should draw.

Definition at line 257 of file kselect.cpp.

void KSelector::drawArrow ( QPainter *  painter,
bool  show,
const QPoint &  pos 
) [protected, virtual]

Override this function to draw the cursor which indicates the current value.

This function is always called twice, once with argument show=false to clear the old cursor, once with argument show=true to draw the new one.

Definition at line 370 of file kselect.cpp.

void KSelector::drawContents ( QPainter *   )  [protected, virtual]

Override this function to draw the contents of the control.

The default implementation does nothing.

Draw only within contentsRect().

Reimplemented in KValueSelector, and KGradientSelector.

Definition at line 367 of file kselect.cpp.

bool KSelector::indent (  )  const [inline]

Returns:
whether the indent option is set.

Definition at line 201 of file kselect.h.

int KSelector::maxValue (  )  const [inline]

Returns:
the max value.

Reimplemented from QRangeControl.

Definition at line 237 of file kselect.h.

int KSelector::minValue (  )  const [inline]

Returns:
the min value.

Reimplemented from QRangeControl.

Definition at line 225 of file kselect.h.

void KSelector::mouseMoveEvent ( QMouseEvent *  e  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 300 of file kselect.cpp.

void KSelector::mousePressEvent ( QMouseEvent *  e  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 295 of file kselect.cpp.

Orientation KSelector::orientation (  )  const [inline]

Returns:
the orientation of the widget.

Definition at line 184 of file kselect.h.

void KSelector::paintEvent ( QPaintEvent *   )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 267 of file kselect.cpp.

void KSelector::setIndent ( bool  i  )  [inline]

Sets the indent option of the widget to i.

This determines whether a shaded frame is drawn.

Definition at line 196 of file kselect.h.

void KSelector::setMaxValue ( int  value  )  [inline]

Sets the max value.

Reimplemented from QRangeControl.

Definition at line 231 of file kselect.h.

void KSelector::setMinValue ( int  value  )  [inline]

Sets the min value.

Reimplemented from QRangeControl.

Definition at line 219 of file kselect.h.

void KSelector::setValue ( int  value  )  [inline]

Sets the value.

Reimplemented from QRangeControl.

Definition at line 207 of file kselect.h.

int KSelector::value (  )  const [inline]

Returns:
the value.

Reimplemented from QRangeControl.

Definition at line 213 of file kselect.h.

void KSelector::valueChange (  )  [protected, virtual]

Reimplemented from QRangeControl.

Definition at line 311 of file kselect.cpp.

void KSelector::valueChanged ( int  value  )  [signal]

This signal is emitted whenever the user chooses a value, e.g.

by clicking with the mouse on the widget.

void KSelector::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented in KValueSelector, and KGradientSelector.

Definition at line 527 of file kselect.cpp.

void KSelector::wheelEvent ( QWheelEvent *  e  )  [protected, virtual]

Reimplemented from QWidget.

Definition at line 305 of file kselect.cpp.


Property Documentation

int KSelector::maxValue [read, write]

Definition at line 164 of file kselect.h.

int KSelector::minValue [read, write]

Definition at line 163 of file kselect.h.

int KSelector::value [read, write]

Definition at line 162 of file kselect.h.


The documentation for this class was generated from the following files:
  • kselect.h
  • kselect.cpp

kdeui

Skip menu "kdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal