digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DSelector Class Reference

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

+ Inheritance diagram for Digikam::DSelector:

Public Member Functions

 DSelector (Qt::Orientation o, QWidget *const parent=nullptr)
 
 DSelector (QWidget *const parent=nullptr)
 
Qt::ArrowType arrowDirection () const
 
QRect contentsRect () const
 
bool indent () const
 
void setArrowDirection (Qt::ArrowType direction)
 Sets the arrow direction.
 
void setIndent (bool i)
 Sets the indent option of the widget to i.
 

Protected Member Functions

virtual void drawArrow (QPainter *painter, const QPoint &pos)
 Override this function to draw the cursor which indicates the current value.
 
virtual void drawContents (QPainter *)
 Override this function to draw the contents of the control.
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void paintEvent (QPaintEvent *) override
 
void wheelEvent (QWheelEvent *) override
 

Properties

Qt::ArrowType arrowDirection
 
bool indent
 
int maxValue
 
int minValue
 
int value
 

Friends

class Private
 

Detailed Description

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.

Member Function Documentation

◆ arrowDirection()

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

◆ contentsRect()

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

◆ drawContents()

virtual void Digikam::DSelector::drawContents ( QPainter *  )
inlineprotectedvirtual

The default implementation does nothing.

Draw only within contentsRect().

Reimplemented in Digikam::DColorValueSelector.

◆ indent()

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

◆ setIndent()

void Digikam::DSelector::setIndent ( bool  i)

This determines whether a shaded frame is drawn.