• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • 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 <kselector.h>

Inheritance diagram for KSelector:
KColorValueSelector KGradientSelector

List of all members.

Public Member Functions

Qt::ArrowType arrowDirection () const
QRect contentsRect () const
bool indent () const
 KSelector (Qt::Orientation o, QWidget *parent=0)
 KSelector (QWidget *parent=0)
void setArrowDirection (Qt::ArrowType direction)
void setIndent (bool i)
 ~KSelector ()

Protected Member Functions

virtual void drawArrow (QPainter *painter, const QPoint &pos)
virtual void drawContents (QPainter *)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void paintEvent (QPaintEvent *)
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 40 of file kselector.h.


Constructor & Destructor Documentation

KSelector::KSelector ( QWidget *  parent = 0  )  [explicit]

Constructs a horizontal one-dimensional selection widget.

Definition at line 66 of file kselector.cpp.

KSelector::KSelector ( Qt::Orientation  o,
QWidget *  parent = 0 
) [explicit]

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

Definition at line 73 of file kselector.cpp.

KSelector::~KSelector (  ) 

Definition at line 82 of file kselector.cpp.


Member Function Documentation

Qt::ArrowType KSelector::arrowDirection (  )  const
Returns:
the current arrow direction

Definition at line 269 of file kselector.cpp.

QRect KSelector::contentsRect (  )  const
Returns:
the rectangle on which subclasses should draw.

Definition at line 97 of file kselector.cpp.

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

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

Definition at line 291 of file kselector.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 KColorValueSelector, and KGradientSelector.

Definition at line 288 of file kselector.cpp.

bool KSelector::indent (  )  const
Returns:
whether the indent option is set.

Definition at line 92 of file kselector.cpp.

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

Definition at line 166 of file kselector.cpp.

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

Definition at line 160 of file kselector.cpp.

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

Definition at line 171 of file kselector.cpp.

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

Definition at line 126 of file kselector.cpp.

void KSelector::setArrowDirection ( Qt::ArrowType  direction  ) 

Sets the arrow direction.

Definition at line 232 of file kselector.cpp.

void KSelector::setIndent ( bool  i  ) 

Sets the indent option of the widget to i.

This determines whether a shaded frame is drawn.

Definition at line 87 of file kselector.cpp.

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

Definition at line 177 of file kselector.cpp.


Property Documentation

int KSelector::maxValue [read, write]

Definition at line 45 of file kselector.h.

int KSelector::minValue [read, write]

Definition at line 44 of file kselector.h.

int KSelector::value [read, write]

Definition at line 43 of file kselector.h.


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

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
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