kstars
AVTPlotWidget Class Reference
An extension of the KStarsPlotWidget for the AltVsTime tool. More...
#include <altvstime.h>

Public Member Functions | |
AVTPlotWidget (double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, QWidget *parent=0, const char *name=0) | |
void | setSunRiseSetTimes (double sr, double ss) |
Protected Member Functions | |
void | mouseMoveEvent (QMouseEvent *e) |
void | mousePressEvent (QMouseEvent *e) |
void | paintEvent (QPaintEvent *e) |
Detailed Description
An extension of the KStarsPlotWidget for the AltVsTime tool.The biggest difference is that in addition to the plot objects, it draws the "ground" below Alt=0 and draws the sky light blue for day times, and black for night times. The transition between day and night is drawn with a gradient, and the position follows the actual sunrise/sunset times of the given date/location. Also, this plot widget provides two time axes (local time along the bottom, and local sideral time along the top).
- Version:
- 1.0
Definition at line 48 of file altvstime.h.
Constructor & Destructor Documentation
AVTPlotWidget::AVTPlotWidget | ( | double | x1 = 0.0 , |
|
double | x2 = 1.0 , |
|||
double | y1 = 0.0 , |
|||
double | y2 = 1.0 , |
|||
QWidget * | parent = 0 , |
|||
const char * | name = 0 | |||
) |
Member Function Documentation
void AVTPlotWidget::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected] |
Handle mouse move events.
If the mouse button is down, draw crosshair lines centered at the cursor position. This allows the user to pinpoint specific position sin the plot.
Definition at line 510 of file altvstime.cpp.
void AVTPlotWidget::mousePressEvent | ( | QMouseEvent * | e | ) | [protected] |
void AVTPlotWidget::paintEvent | ( | QPaintEvent * | e | ) | [protected] |
void AVTPlotWidget::setSunRiseSetTimes | ( | double | sr, | |
double | ss | |||
) | [inline] |
Set the fractional positions of the Sunrise and Sunset positions, in units where last midnight was 0.0, and next midnight is 1.0.
i.e., if Sunrise is at 06:00, then we set it as 0.25 in this function. Likewise, if Sunset is at 18:00, then we set it as 0.75 in this function.
- Parameters:
-
sr the fractional position of Sunrise ss the fractional position of Sunset
Definition at line 64 of file altvstime.h.
The documentation for this class was generated from the following files: