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

Dartboard widget. More...

#include <CutWidgets.h>

Inheritance diagram for QeDartBoard:
QeRadialItemPlot taurus.taurusdartboard.TaurusDartBoard

Public Slots

void setCurrentAlt (double newValue)
 Sets the value of the current altitude property.
 
void setCurrentAz (double newValue)
 Sets the value of the current azimuth property.
 
void setTargetAlt (double newValue)
 Sets the value of the target altitude property.
 
void setTargetAz (double newValue)
 Sets the value of the target azimuth property.
 
void setTelescopeLat (double newValue)
 Sets the value of the latitude of the telescope.
 
void setTelescopeLong (double newValue)
 Sets the value of the longitude of the telescope.
 
void setWindDirection (double newValue)
 Sets the value of the latitude of the telescope.
 
- Public Slots inherited from QeRadialItemPlot
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 currentAltChanged (double newValue)
 Indicates that the current altitude value has changed.
 
void currentAzChanged (double newValue)
 Indicates that the current azimuth value has changed.
 
void targetAltChanged (double newValue)
 Indicates that the target altitude value has changed.
 
void targetAzChanged (double newValue)
 Indicates that the target azimuth value has changed.
 
void telescopeLatChanged (double newValue)
 Indicates that telescope latitude has changed.
 
void telescopeLongChanged (double newValue)
 Indicates that telescope longitude has changed.
 
void windDirectionChanged (double newValue)
 Indicates that the wind direction has changed.
 
- Signals inherited from QeRadialItemPlot
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

 QeDartBoard (QWidget *parent=Q_NULLPTR)
 Constructor that is used to set a parent relationship with.
 
double getCurrentAlt ()
 Gets the value of the current altitude the widget has.
 
double getCurrentAz ()
 Gets the value of the current azimuth the widget has.
 
double getTargetAlt ()
 Gets the value of the target altitude the widget has.
 
double getTargetAz ()
 Gets the value of the target azimuth the widget has.
 
double getTelescopeLat ()
 Gets the value of the telescope latitude the widget has.
 
double getTelescopeLong ()
 Gets the value of the telescope longitude the widget has.
 
double getWindDirection ()
 Gets the value of the wind direction the widget has.
 
- Public Member Functions inherited from QeRadialItemPlot
 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 paintEvent (QPaintEvent *event) override
 Overrides QWidget::paintEvent to implement its own rendering instructions.
 
void paintDartBoard (QPainter *painter) override
 Uses a QPainter to draw the dartboard (mostly static) background.
 
- Protected Member Functions inherited from QeRadialItemPlot
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.
 
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

double currentAlt
 Altitude coordinate of the current position in radians.
 
double currentAz
 Azimuth coordinate of the current position in radians.
 
double targetAlt
 Altitude coordinate of the target position in radians.
 
double targetAz
 Azimuth coordinate of the target position in radians.
 
double telescopeLat
 Telescope Latitude position – currently not used.
 
double telescopeLong
 Telescope Longitude position – currently not used.
 
double windDirection
 Wind direction – currently not used.
 
- Properties inherited from QeRadialItemPlot
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

Dartboard widget.

It renders a target and a current position in an Alt/Az radial view.

The Dartboard is a custom widget that renders in radial coordinates the Altitude and Azimuth of two positions: the target, and the current.

Values in the radial axis range from Pi/2 radians at the center, to 0 at the outer border. Values in the angular axis start with 0 radians from the South position, and increase starting counter-clockwise up to 2*Pi radians.

The target is rendered in red, and the current position in blue.

Todo

Update to Control GUI Guidelines colors.

Implement wind direction display

Implement sky visibility according to telescope longitude, latitude and time.

Constructor & Destructor Documentation

◆ QeDartBoard()

QeDartBoard::QeDartBoard ( 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

◆ currentAltChanged

void QeDartBoard::currentAltChanged ( double newValue)
signal

Indicates that the current altitude value has changed.

Parameters
newValueNew value for the current altitude in radians.

◆ currentAzChanged

void QeDartBoard::currentAzChanged ( double newValue)
signal

Indicates that the current azimuth value has changed.

Parameters
newValueNew value for the current azimuth in radians, 0 is south, increases eastward.

◆ getCurrentAlt()

double QeDartBoard::getCurrentAlt ( )

Gets the value of the current altitude the widget has.

Returns
current altitude in radians

◆ getCurrentAz()

double QeDartBoard::getCurrentAz ( )

Gets the value of the current azimuth the widget has.

Returns
current azimuth in radians, 0 is south, increases eastward.

◆ getTargetAlt()

double QeDartBoard::getTargetAlt ( )

Gets the value of the target altitude the widget has.

Returns
target altitude in radians

◆ getTargetAz()

double QeDartBoard::getTargetAz ( )

Gets the value of the target azimuth the widget has.

Returns
target azimuth in radians, 0 is south, increases eastward.

◆ getTelescopeLat()

double QeDartBoard::getTelescopeLat ( )

Gets the value of the telescope latitude the widget has.

Note
not in use
Returns
telescope latitude in radians.

◆ getTelescopeLong()

double QeDartBoard::getTelescopeLong ( )

Gets the value of the telescope longitude the widget has.

Note
not in use
Returns
telescope latitude in radians

◆ getWindDirection()

double QeDartBoard::getWindDirection ( )

Gets the value of the wind direction the widget has.

Note
not in use
Returns
wind direction latitude in radians, 0 is south, increases eastward.

◆ paintDartBoard()

void QeDartBoard::paintDartBoard ( QPainter * painter)
overrideprotectedvirtual

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

Parameters
painterQPainter used to perform the raster instructions on.

Reimplemented from QeRadialItemPlot.

◆ paintEvent()

void QeDartBoard::paintEvent ( QPaintEvent * event)
overrideprotected

Overrides QWidget::paintEvent to implement its own rendering instructions.

This method implements most of the rendering logic.

Parameters
eventQPaintEvent, ignored.

◆ setCurrentAlt

void QeDartBoard::setCurrentAlt ( double newValue)
slot

Sets the value of the current altitude property.

Parameters
newValueAltitude in radians

◆ setCurrentAz

void QeDartBoard::setCurrentAz ( double newValue)
slot

Sets the value of the current azimuth property.

Parameters
newValueAzimuth in radians, 0 is south, increases eastward.

◆ setTargetAlt

void QeDartBoard::setTargetAlt ( double newValue)
slot

Sets the value of the target altitude property.

Parameters
newValueAltitude in radians

◆ setTargetAz

void QeDartBoard::setTargetAz ( double newValue)
slot

Sets the value of the target azimuth property.

Parameters
newValueAzimuth in radians, 0 is south, increases eastward.

◆ setTelescopeLat

void QeDartBoard::setTelescopeLat ( double newValue)
slot

Sets the value of the latitude of the telescope.

Note
Not in use
Parameters
newValueLatitude in radians

◆ setTelescopeLong

void QeDartBoard::setTelescopeLong ( double newValue)
slot

Sets the value of the longitude of the telescope.

Note
Not in use
Parameters
newValueLongitude in radians

◆ setWindDirection

void QeDartBoard::setWindDirection ( double newValue)
slot

Sets the value of the latitude of the telescope.

Note
Not in use
Parameters
newValueDirection in radians, 0 is south, increases eastward.

◆ targetAltChanged

void QeDartBoard::targetAltChanged ( double newValue)
signal

Indicates that the target altitude value has changed.

Parameters
newValueNew value for the target altitude in radians.

◆ targetAzChanged

void QeDartBoard::targetAzChanged ( double newValue)
signal

Indicates that the target azimuth value has changed.

Parameters
newValueNew value for the target azimuth in radians, 0 is south, increases eastward.

◆ telescopeLatChanged

void QeDartBoard::telescopeLatChanged ( double newValue)
signal

Indicates that telescope latitude has changed.

Note
Not in use
Parameters
newValueNew value telescope latitude.

◆ telescopeLongChanged

void QeDartBoard::telescopeLongChanged ( double newValue)
signal

Indicates that telescope longitude has changed.

Note
Not in use
Parameters
newValueNew value telescope longitude.

◆ windDirectionChanged

void QeDartBoard::windDirectionChanged ( double newValue)
signal

Indicates that the wind direction has changed.

Note
Not in use
Parameters
newValueNew value for the wind direction in radians, 0 is south, increases eastward.

Property Documentation

◆ currentAlt

double QeDartBoard::currentAlt
readwrite

Altitude coordinate of the current position in radians.

Accessors:
getCurrentAlt(), setCurrentAlt(double)

◆ currentAz

double QeDartBoard::currentAz
readwrite

Azimuth coordinate of the current position in radians.

Accessors:
getCurrentAz(), setCurrentAz(double)

◆ targetAlt

double QeDartBoard::targetAlt
readwrite

Altitude coordinate of the target position in radians.

Accessors:
getTargetAlt(), setTargetAlt(double)

◆ targetAz

double QeDartBoard::targetAz
readwrite

Azimuth coordinate of the target position in radians.

Accessors:
getTargetAz(), setTargetAz(double)

◆ telescopeLat

double QeDartBoard::telescopeLat
readwrite

Telescope Latitude position – currently not used.

Accessors:
getTelescopeLat(), setTelescopeLat(double)

◆ telescopeLong

double QeDartBoard::telescopeLong
readwrite

Telescope Longitude position – currently not used.

Accessors:
getTelescopeLong(), setTelescopeLong()

◆ windDirection

double QeDartBoard::windDirection
readwrite

Wind direction – currently not used.

Accessors:
getWindDirection(), setWindDirection()

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