• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | Protected Member Functions | Properties | List of all members
KSelector Class Reference

#include <kselector.h>

Inheritance diagram for KSelector:
KColorValueSelector KGradientSelector

Public Member Functions

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

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

Qt::ArrowType arrowDirection
 
bool indent
 
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 41 of file kselector.h.

Constructor & Destructor Documentation

◆ KSelector() [1/2]

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

Constructs a horizontal one-dimensional selection widget.

Definition at line 65 of file kselector.cpp.

◆ KSelector() [2/2]

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

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

Definition at line 72 of file kselector.cpp.

◆ ~KSelector()

KSelector::~KSelector ( )

Definition at line 81 of file kselector.cpp.

Member Function Documentation

◆ arrowDirection()

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

Definition at line 268 of file kselector.cpp.

◆ contentsRect()

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

Definition at line 96 of file kselector.cpp.

◆ drawArrow()

void KSelector::drawArrow ( QPainter *  painter,
const QPoint &  pos 
)
protectedvirtual

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

Definition at line 290 of file kselector.cpp.

◆ drawContents()

void KSelector::drawContents ( QPainter *  )
protectedvirtual

Override this function to draw the contents of the control.

The default implementation does nothing.

Draw only within contentsRect().

Reimplemented in KGradientSelector, and KColorValueSelector.

Definition at line 287 of file kselector.cpp.

◆ indent()

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

Definition at line 91 of file kselector.cpp.

◆ mouseMoveEvent()

void KSelector::mouseMoveEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 165 of file kselector.cpp.

◆ mousePressEvent()

void KSelector::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 159 of file kselector.cpp.

◆ mouseReleaseEvent()

void KSelector::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Definition at line 170 of file kselector.cpp.

◆ paintEvent()

void KSelector::paintEvent ( QPaintEvent *  )
protectedvirtual

Definition at line 125 of file kselector.cpp.

◆ setArrowDirection()

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

Sets the arrow direction.

Definition at line 231 of file kselector.cpp.

◆ setIndent()

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 86 of file kselector.cpp.

◆ wheelEvent()

void KSelector::wheelEvent ( QWheelEvent *  e)
protectedvirtual

Definition at line 176 of file kselector.cpp.

Property Documentation

◆ arrowDirection

Qt::ArrowType KSelector::arrowDirection
readwrite

Definition at line 1 of file kselector.h.

◆ indent

bool KSelector::indent
readwrite

Definition at line 1 of file kselector.h.

◆ maxValue

int KSelector::maxValue
readwrite

Definition at line 1 of file kselector.h.

◆ minValue

int KSelector::minValue
readwrite

Definition at line 1 of file kselector.h.

◆ value

int KSelector::value
readwrite

Definition at line 1 of file kselector.h.


The documentation for this class was generated from the following files:
  • kselector.h
  • kselector.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal