digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::DPointSelect Class Reference
+ Inheritance diagram for Digikam::DPointSelect:

Signals

void valueChanged (int x, int y)
 This signal is emitted whenever the user chooses a value, e.g.
 

Public Member Functions

 DPointSelect (QWidget *const parent)
 Constructs a two-dimensional selector widget which has a value range of [0..100] in both directions.
 
QRect contentsRect () const
 
QSize minimumSizeHint () const override
 Reimplemented to give the widget a minimum size.
 
void setMarkerColor (const QColor &col)
 Sets the color used to draw the marker.
 
void setRange (int minX, int minY, int maxX, int maxY)
 Sets the range of possible values.
 
void setValues (int xPos, int yPos)
 Sets the current values in horizontal and vertical direction.
 
void setXValue (int xPos)
 Sets the current horizontal value.
 
void setYValue (int yPos)
 Sets the current vertical value.
 
int xValue () const
 
int yValue () const
 

Protected Member Functions

virtual void drawContents (QPainter *)
 Override this function to draw the contents of the widget.
 
virtual void drawMarker (QPainter *p, int xp, int yp)
 Override this function to draw the marker which indicates the currently selected value pair.
 
void mouseMoveEvent (QMouseEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void paintEvent (QPaintEvent *e) override
 
void valuesFromPosition (int x, int y, int &xVal, int &yVal) const
 Converts a pixel position to its corresponding values.
 
void wheelEvent (QWheelEvent *) override
 

Properties

int xValue
 
int yValue
 

Friends

class Private
 

Member Function Documentation

◆ contentsRect()

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

◆ drawContents()

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

The default implementation does nothing.

Draw within contentsRect() only.

Reimplemented in Digikam::DHueSaturationSelector.

◆ setMarkerColor()

void Digikam::DPointSelect::setMarkerColor ( const QColor &  col)
Parameters
colthe color

◆ setValues()

void Digikam::DPointSelect::setValues ( int  xPos,
int  yPos 
)
Parameters
xPosthe horizontal value
yPosthe vertical value

◆ setXValue()

void Digikam::DPointSelect::setXValue ( int  xPos)
Parameters
xPosthe horizontal value

◆ setYValue()

void Digikam::DPointSelect::setYValue ( int  yPos)
Parameters
yPosthe vertical value

◆ valueChanged

void Digikam::DPointSelect::valueChanged ( int  x,
int  y 
)
signal

by clicking with the mouse on the widget.

◆ xValue()

int Digikam::DPointSelect::xValue ( ) const
Returns
the current value in horizontal direction.

◆ yValue()

int Digikam::DPointSelect::yValue ( ) const
Returns
the current value in vertical direction.