digiKam
Digikam::DSelector Class Reference
+ Inheritance diagram for Digikam::DSelector:

Public Member Functions

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

Protected Member Functions

virtual void drawArrow (QPainter *painter, const QPoint &pos)
 
virtual void drawContents (QPainter *)
 
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

DSelector 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.

Constructor & Destructor Documentation

◆ DSelector() [1/2]

Digikam::DSelector::DSelector ( QWidget *  parent = nullptr)
explicit

◆ DSelector() [2/2]

Digikam::DSelector::DSelector ( Qt::Orientation  o,
QWidget *const  parent = nullptr 
)
explicit

References setArrowDirection().

◆ ~DSelector()

Digikam::DSelector::~DSelector ( )
override

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.

References arrowDirection, and indent.

Referenced by Digikam::DColorValueSelector::drawContents(), and Digikam::DColorValueSelector::drawPalette().

◆ drawArrow()

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

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

Referenced by paintEvent().

◆ drawContents()

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

Override this function to draw the contents of the control. The default implementation does nothing.

Draw only within contentsRect().

Reimplemented in Digikam::DColorValueSelector.

Referenced by paintEvent().

◆ indent()

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

◆ mouseMoveEvent()

void Digikam::DSelector::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

◆ mousePressEvent()

void Digikam::DSelector::mousePressEvent ( QMouseEvent *  e)
overrideprotected

◆ mouseReleaseEvent()

void Digikam::DSelector::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

◆ paintEvent()

void Digikam::DSelector::paintEvent ( QPaintEvent *  )
overrideprotected

References drawArrow(), drawContents(), indent, and value.

◆ setArrowDirection()

void Digikam::DSelector::setArrowDirection ( Qt::ArrowType  direction)

Sets the arrow direction.

Referenced by DSelector().

◆ setIndent()

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

Sets the indent option of the widget to i. This determines whether a shaded frame is drawn.

◆ wheelEvent()

void Digikam::DSelector::wheelEvent ( QWheelEvent *  e)
overrideprotected

References value.

Friends And Related Function Documentation

◆ Private

friend class Private
friend

Property Documentation

◆ arrowDirection

Qt::ArrowType Digikam::DSelector::arrowDirection
readwrite

Referenced by contentsRect().

◆ indent

bool Digikam::DSelector::indent
readwrite

Referenced by contentsRect(), and paintEvent().

◆ maxValue

int Digikam::DSelector::maxValue
readwrite

◆ minValue

int Digikam::DSelector::minValue
readwrite

◆ value


The documentation for this class was generated from the following files: