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

Public Member Functions

Qt::ArrowType arrowDirection () const
 
DColorChooserMode chooserMode () const
 
int colorValue () const
 
QRect contentsRect () const
 
 DColorValueSelector (Qt::Orientation o, QWidget *const parent=nullptr)
 
 DColorValueSelector (QWidget *const parent=nullptr)
 
int hue () const
 
bool indent () const
 
int saturation () const
 
void setArrowDirection (Qt::ArrowType direction)
 
void setChooserMode (DColorChooserMode chooserMode)
 
void setColorValue (int colorValue)
 
void setHue (int hue)
 
void setIndent (bool i)
 
void setSaturation (int saturation)
 
void updateContents ()
 
 ~DColorValueSelector () override
 

Protected Member Functions

virtual void drawArrow (QPainter *painter, const QPoint &pos)
 
void drawContents (QPainter *) override
 
virtual void drawPalette (QPixmap *)
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void paintEvent (QPaintEvent *) override
 
void resizeEvent (QResizeEvent *) override
 
void wheelEvent (QWheelEvent *) override
 

Properties

Qt::ArrowType arrowDirection
 
int colorValue
 
int hue
 
bool indent
 
int maxValue
 
int minValue
 
int saturation
 
int value
 

Friends

class Private
 

Constructor & Destructor Documentation

◆ DColorValueSelector() [1/2]

Digikam::DColorValueSelector::DColorValueSelector ( QWidget *const  parent = nullptr)
explicit

◆ DColorValueSelector() [2/2]

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

◆ ~DColorValueSelector()

Digikam::DColorValueSelector::~DColorValueSelector ( )
override

Member Function Documentation

◆ arrowDirection()

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

◆ chooserMode()

DColorChooserMode Digikam::DColorValueSelector::chooserMode ( ) const

Returns the current chooser mode.

Returns
The chooser mode (one of the DColorChooserMode constants)

Referenced by drawPalette().

◆ colorValue()

int Digikam::DColorValueSelector::colorValue ( ) const

Returns the current color value.

Returns
The color value (0-255)

◆ contentsRect()

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

References Digikam::DSelector::arrowDirection, and Digikam::DSelector::indent.

Referenced by drawContents(), and drawPalette().

◆ drawArrow()

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

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

Referenced by Digikam::DSelector::paintEvent().

◆ drawContents()

void Digikam::DColorValueSelector::drawContents ( QPainter *  painter)
overrideprotectedvirtual

Reimplemented from DSelector. The drawing is buffered in a pixmap here. As real drawing routine, drawPalette() is used.

Reimplemented from Digikam::DSelector.

References Digikam::DSelector::contentsRect().

◆ drawPalette()

void Digikam::DColorValueSelector::drawPalette ( QPixmap *  pixmap)
protectedvirtual

Draws the contents of the widget on a pixmap, which is used for buffering.

References Digikam::ChooserHue, chooserMode(), colorValue, Digikam::DSelector::contentsRect(), hue, saturation, and Digikam::setComponentValue().

Referenced by updateContents().

◆ hue()

int Digikam::DColorValueSelector::hue ( ) const

Returns the current hue value.

Returns
The hue value (0-359)

◆ indent()

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

◆ mouseMoveEvent()

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

◆ mousePressEvent()

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

◆ mouseReleaseEvent()

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

◆ paintEvent()

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

◆ resizeEvent()

void Digikam::DColorValueSelector::resizeEvent ( QResizeEvent *  )
overrideprotected

References updateContents().

◆ saturation()

int Digikam::DColorValueSelector::saturation ( ) const

Returns the current saturation value.

Returns
The saturation value (0-255)

◆ setArrowDirection()

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

Sets the arrow direction.

Referenced by Digikam::DSelector::DSelector().

◆ setChooserMode()

void Digikam::DColorValueSelector::setChooserMode ( DColorChooserMode  chooserMode)

Sets the chooser mode. Doesn't automatically update the widget; you have to call updateContents manually.

Parameters
chooserModeSets the chooser mode (one of the DColorChooserMode constants)

References Digikam::ChooserHue.

◆ setColorValue()

void Digikam::DColorValueSelector::setColorValue ( int  colorValue)

Sets the color value. Doesn't automatically update the widget; you have to call updateContents manually.

Parameters
colorValueSets the color value (0-255)

References colorValue.

◆ setHue()

void Digikam::DColorValueSelector::setHue ( int  hue)

Sets the hue value. Doesn't automatically update the widget; you have to call updateContents manually.

Parameters
hueSets the hue value (0-359)

References hue.

◆ setIndent()

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

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

◆ setSaturation()

void Digikam::DColorValueSelector::setSaturation ( int  saturation)

Sets the saturation value. Doesn't automatically update the widget; you have to call updateContents manually.

Parameters
saturationSets the saturation value (0-255)

References saturation.

◆ updateContents()

void Digikam::DColorValueSelector::updateContents ( )

Updates the widget's contents.

References drawPalette().

Referenced by resizeEvent().

◆ wheelEvent()

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

Friends And Related Function Documentation

◆ Private

friend class Private
friend

Property Documentation

◆ arrowDirection

Qt::ArrowType Digikam::DSelector::arrowDirection
readwriteinherited

◆ colorValue

int Digikam::DColorValueSelector::colorValue
readwrite

Referenced by drawPalette(), and setColorValue().

◆ hue

int Digikam::DColorValueSelector::hue
readwrite

Referenced by drawPalette(), and setHue().

◆ indent

bool Digikam::DSelector::indent
readwriteinherited

◆ maxValue

int Digikam::DSelector::maxValue
readwriteinherited

◆ minValue

int Digikam::DSelector::minValue
readwriteinherited

◆ saturation

int Digikam::DColorValueSelector::saturation
readwrite

Referenced by drawPalette(), and setSaturation().

◆ value


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