cut 3.3.0
Loading...
Searching...
No Matches
QeRadialItemPlot Class Reference

Base class for QeDartBoard and QePreFocalStation. More...

#include <CutWidgets.h>

Inheritance diagram for QeRadialItemPlot:
QeDartBoard QePreFocalStation taurus.taurusdartboard.TaurusDartBoard taurus.taurusprefocalstation.TaurusPreFocalStation

Public Slots

void setIsClockwise (bool newValue)
 Changes the direction of radial values distribution.
 
void setDegRadNumericDisplay (bool newValue)
 Changes the units used to display the values.
 
void setShowGrid (bool newValue)
 Changes the grid visibility indicator.
 
void updateBackground ()
 Updates the m_backgroundUpdateNeeded internal flag to signal a significant change was detect, and the cache needs to be rebuild.
 

Signals

void isClockwiseChanged (bool newValue)
 Indicates that the direction of values distribution chanegd.
 
void degRadNumericDisplayTriggered (bool newValue)
 Indicates that the numerical unit representation has changed.
 
void showGridChanged (bool newValue)
 Indicates that the numerical unit representation has changed.
 

Public Member Functions

 QeRadialItemPlot (QWidget *parent=Q_NULLPTR)
 Constructor that is used to set a parent relationship with.
 
bool getIsClockwise ()
 Gets the value the flag that determines if radial values change clockwise or counterclockwise.
 
bool getDegRadNumericDisplay ()
 Returns the true if using radians to display numerical values.
 
bool getShowGrid ()
 Returns the true if grid is displayed.
 
QPixmap getBackgroundPixmap ()
 Returns background QPixmap that is stored in unique ptr.
 

Protected Member Functions

void changeEvent (QEvent *event) override
 Overrides QWidget::changeEvent to catch when certain QWidget's properties has changed.
 
void resizeEvent (QResizeEvent *event) override
 Overrides QWidget::resizeEvent to catch when the size has changed.
 
virtual void paintDartBoard (QPainter *painter)
 Uses a QPainter to draw the dartboard (mostly static) background.
 
void cacheBackground (QPainter *painter)
 Stores in a pointer the new background cache.
 
void setDirectionIndicatorSigns (QString vertical, QString horizontal)
 Sets indicators' symbols for directions arrows painted in top right corner.
 
void setDirectionIndicatorVisible (bool isVisible)
 Sets directions indicator (painted in the top right corner of the widget) visible.
 
void drawValues (QPainter *painter)
 Draws numeric values around the radial plot in a desired direction (eiher clockwise or counterclockwise)
 

Properties

bool isClockwise
 Flag that determines if radial coordinates of the plot change clockwise (true) or counterclockwise (false) The property is true by default (clockwise)
 
bool degRadNumericDisplay
 Degrees/Radians numerical indicators representation (0 - Degrees, 1 - Radians)
 
bool showGrid
 Show/hide grid.
 

Detailed Description

Base class for QeDartBoard and QePreFocalStation.

Constructor & Destructor Documentation

◆ QeRadialItemPlot()

QeRadialItemPlot::QeRadialItemPlot ( QWidget * parent = Q_NULLPTR)
explicit

Constructor that is used to set a parent relationship with.

Parameters
parentQWidget used as parent for this QeDartBoard.

Member Function Documentation

◆ cacheBackground()

void QeRadialItemPlot::cacheBackground ( QPainter * painter)
protected

Stores in a pointer the new background cache.

Parameters
painterQPainter in which the background was drawn.

◆ changeEvent()

void QeRadialItemPlot::changeEvent ( QEvent * event)
overrideprotected

Overrides QWidget::changeEvent to catch when certain QWidget's properties has changed.

It is used to determine when the background pixmap caches needs an update.

Parameters
eventCarries the information of what properties has changed in the QWidget.

◆ degRadNumericDisplayTriggered

void QeRadialItemPlot::degRadNumericDisplayTriggered ( bool newValue)
signal

Indicates that the numerical unit representation has changed.

Parameters
newValueNew numerical unit representation trigger, true for radians, false for sexagesimal degrees.

◆ drawValues()

void QeRadialItemPlot::drawValues ( QPainter * painter)
protected

Draws numeric values around the radial plot in a desired direction (eiher clockwise or counterclockwise)

Parameters
painterQPainter in which the background was drawn.

◆ getBackgroundPixmap()

QPixmap QeRadialItemPlot::getBackgroundPixmap ( )

Returns background QPixmap that is stored in unique ptr.

This is a helper method for Python version of this class (Shiboken cannot wrap std::unique_ptr so it has to be hidden; to access the pointer getter has to defined)

Returns
current value of the flag

◆ getDegRadNumericDisplay()

bool QeRadialItemPlot::getDegRadNumericDisplay ( )

Returns the true if using radians to display numerical values.

Returns
true if radians are used to render numerical values, or false for sexagesimal degrees.

◆ getIsClockwise()

bool QeRadialItemPlot::getIsClockwise ( )

Gets the value the flag that determines if radial values change clockwise or counterclockwise.

Returns
current value of the flag

◆ getShowGrid()

bool QeRadialItemPlot::getShowGrid ( )

Returns the true if grid is displayed.

Returns
current value of the flag

◆ isClockwiseChanged

void QeRadialItemPlot::isClockwiseChanged ( bool newValue)
signal

Indicates that the direction of values distribution chanegd.

Parameters
newValueNew direction of radial values (true for clockwise, false for counterclockwise)

◆ paintDartBoard()

virtual void QeRadialItemPlot::paintDartBoard ( QPainter * painter)
protectedvirtual

Uses a QPainter to draw the dartboard (mostly static) background.

Parameters
painterQPainter used to perform the raster instructions on.

Reimplemented in QeDartBoard, and QePreFocalStation.

◆ resizeEvent()

void QeRadialItemPlot::resizeEvent ( QResizeEvent * event)
overrideprotected

Overrides QWidget::resizeEvent to catch when the size has changed.

It is used to determine when the background pixmap caches needs an update.

Parameters
eventQResizeEvent carries the size changes.

◆ setDegRadNumericDisplay

void QeRadialItemPlot::setDegRadNumericDisplay ( bool newValue)
slot

Changes the units used to display the values.

Parameters
newValuetrue uses radians, false uses sexagesimal degrees.

◆ setDirectionIndicatorSigns()

void QeRadialItemPlot::setDirectionIndicatorSigns ( QString vertical,
QString horizontal )
protected

Sets indicators' symbols for directions arrows painted in top right corner.

Parameters
verticalindicator for vertical arrow
horizontalindicator for horizontal arrow

◆ setDirectionIndicatorVisible()

void QeRadialItemPlot::setDirectionIndicatorVisible ( bool isVisible)
protected

Sets directions indicator (painted in the top right corner of the widget) visible.

Parameters
isVisiblebool indicator to be set

◆ setIsClockwise

void QeRadialItemPlot::setIsClockwise ( bool newValue)
slot

Changes the direction of radial values distribution.

Parameters
newValuetrue uses clockwise values, false uses counterclockwise values.

◆ setShowGrid

void QeRadialItemPlot::setShowGrid ( bool newValue)
slot

Changes the grid visibility indicator.

Parameters
newValuetrue is the grid should be visible

◆ showGridChanged

void QeRadialItemPlot::showGridChanged ( bool newValue)
signal

Indicates that the numerical unit representation has changed.

Parameters
newValueNew grid visibility indicator. True if grid is visible

Property Documentation

◆ degRadNumericDisplay

bool QeRadialItemPlot::degRadNumericDisplay
readwrite

Degrees/Radians numerical indicators representation (0 - Degrees, 1 - Radians)

Accessors:
getDegRadNumericDisplay(), setDegRadNumericDisplay()

◆ isClockwise

bool QeRadialItemPlot::isClockwise
readwrite

Flag that determines if radial coordinates of the plot change clockwise (true) or counterclockwise (false) The property is true by default (clockwise)

Accessors:
getIsClockwise(), setIsClockwise(bool)

◆ showGrid

bool QeRadialItemPlot::showGrid
readwrite

Show/hide grid.

If true, draws lines that intersect the center of the plot and numerical indicator

Accessors:
getShowGrid(), setShowGrid()

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