Updraft
1.0
Open source glider flight visualisation tool.
|
Widget that shows the plot with flight data. More...
#include <plotwidget.h>
Signals | |
void | updateCurrentInfo (const QString &text) |
Sends text statistics of the fix the mouse is pointing at. | |
void | updateText () |
Send a signal that the vectors with the statistics texts (for points and segments) has been changed. | |
void | fixWasPicked (int index) |
A signal when a user pickes out a fix. | |
void | fixIsPointedAt (int index) |
A signal upon mouse move over fix. | |
void | clearMarkers () |
A signal when the users clears the picked fixes. | |
Public Member Functions | |
PlotWidget (SegmentInfo *segmentInfo, FixInfo *altitudeInfo, FixInfo *verticalSpeedInfo, FixInfo *groundSpeedInfo) | |
void | addPickedFix (int index) |
A fix of given index was picked. | |
void | addPickedLine (int x) |
User clicked on position x on the graph, and picked one of the fixes that is at that position. | |
QList< QString > * | getSegmentsStatTexts () |
QList< QString > * | getPointsStatTexts () |
Private Member Functions | |
void | paintEvent (QPaintEvent *paintEvent) |
void | mouseMoveEvent (QMouseEvent *mouseEvent) |
void | mousePressEvent (QMouseEvent *mouseEvent) |
void | leaveEvent (QEvent *leaveEvent) |
void | resizeEvent (QResizeEvent *resizeEvent) |
QSize | sizeHint () const |
void | redrawGraphPicture () |
QString | createPointStatText (int xLine, int fixListIndex) |
QString | createSegmentStatText (int startPointIndex, int endPointIndex) |
void | updatePickedTexts (int i) |
Update picked texts when a new fix was added at the position `i` in the `pickedFixes` list. | |
void | resetStats () |
Resets the statistics to the default version. | |
QTime | getTimeFromSecs (int timeInSecs) |
Create time from secs. The value of secs can be bigger than 24*3600. | |
int | chooseFixIndex (int start, int end) |
Pick out which fix of the fixes at given pixel should be picked out. | |
Private Attributes | |
int | xLine |
The coordinate to draw the vertical line where the mouse points. | |
QList< PickData > | pickedFixes |
The set of picked fixes. | |
QList< int > | pickedPositions |
Ordered list of the x coordinates of the picked positions. | |
QList< QString > | segmentsStatTexts |
Statistics texts for picked fixes. | |
QList< QString > | pickedFixesStatTexts |
Statistics texts for segments between picked fixes. | |
QImage * | graphPicture |
QVector< Label * > | labels |
PickedLabel * | pickedLabel |
PlotAxes * | altitudeAxes |
PlotAxes * | verticalSpeedAxes |
PlotAxes * | groundSpeedAxes |
AltitudePlotPainter * | altitudePlotPainter |
VerticalSpeedPlotPainter * | verticalSpeedPlotPainter |
GroundSpeedPlotPainter * | groundSpeedPlotPainter |
SegmentInfo * | segmentInfo |
FixInfo * | altitudeInfo |
FixInfo * | verticalSpeedInfo |
FixInfo * | groundSpeedInfo |
bool | mouseOver |
Whether the mouse if over the graph(!) - not widget. | |
Static Private Attributes | |
static const int | OFFSET_X = 15 |
Offset from the window border. | |
static const int | OFFSET_Y = 10 |
static const QColor | BG_COLOR = QColor(Qt::black) |
static const QPen | ALTITUDE_PEN = QPen(Qt::red) |
static const QPen | VERTICAL_SPEED_PEN = QPen(Qt::blue) |
static const QPen | GROUND_SPEED_PEN = QPen(Qt::yellow) |
static const QPen | MOUSE_LINE_PEN = QPen(QColor(150, 150, 150)) |
static const QPen | MOUSE_LINE_PICKED_PEN = QPen(QColor(200, 200, 200)) |
Widget that shows the plot with flight data.
Updraft::IgcViewer::PlotWidget::PlotWidget | ( | SegmentInfo * | segmentInfo, |
FixInfo * | altitudeInfo, | ||
FixInfo * | verticalSpeedInfo, | ||
FixInfo * | groundSpeedInfo | ||
) |
void Updraft::IgcViewer::PlotWidget::addPickedFix | ( | int | index | ) |
A fix of given index was picked.
void Updraft::IgcViewer::PlotWidget::addPickedLine | ( | int | x | ) |
User clicked on position x on the graph, and picked one of the fixes that is at that position.
Which fix is picked if multiple fixes are on that position is decided by the method chooseFixIndex(int start, int end);
int Updraft::IgcViewer::PlotWidget::chooseFixIndex | ( | int | start, |
int | end | ||
) | [private] |
Pick out which fix of the fixes at given pixel should be picked out.
void Updraft::IgcViewer::PlotWidget::clearMarkers | ( | ) | [signal] |
A signal when the users clears the picked fixes.
QString Updraft::IgcViewer::PlotWidget::createPointStatText | ( | int | xLine, |
int | fixListIndex | ||
) | [private] |
QString Updraft::IgcViewer::PlotWidget::createSegmentStatText | ( | int | startPointIndex, |
int | endPointIndex | ||
) | [private] |
void Updraft::IgcViewer::PlotWidget::fixIsPointedAt | ( | int | index | ) | [signal] |
A signal upon mouse move over fix.
void Updraft::IgcViewer::PlotWidget::fixWasPicked | ( | int | index | ) | [signal] |
A signal when a user pickes out a fix.
QList< QString > * Updraft::IgcViewer::PlotWidget::getPointsStatTexts | ( | ) |
QList< QString > * Updraft::IgcViewer::PlotWidget::getSegmentsStatTexts | ( | ) |
QTime Updraft::IgcViewer::PlotWidget::getTimeFromSecs | ( | int | timeInSecs | ) | [private] |
Create time from secs. The value of secs can be bigger than 24*3600.
void Updraft::IgcViewer::PlotWidget::leaveEvent | ( | QEvent * | leaveEvent | ) | [private] |
void Updraft::IgcViewer::PlotWidget::mouseMoveEvent | ( | QMouseEvent * | mouseEvent | ) | [private] |
void Updraft::IgcViewer::PlotWidget::mousePressEvent | ( | QMouseEvent * | mouseEvent | ) | [private] |
void Updraft::IgcViewer::PlotWidget::paintEvent | ( | QPaintEvent * | paintEvent | ) | [private] |
void Updraft::IgcViewer::PlotWidget::redrawGraphPicture | ( | ) | [private] |
void Updraft::IgcViewer::PlotWidget::resetStats | ( | ) | [private] |
Resets the statistics to the default version.
void Updraft::IgcViewer::PlotWidget::resizeEvent | ( | QResizeEvent * | resizeEvent | ) | [private] |
QSize Updraft::IgcViewer::PlotWidget::sizeHint | ( | ) | const [private] |
void Updraft::IgcViewer::PlotWidget::updateCurrentInfo | ( | const QString & | text | ) | [signal] |
Sends text statistics of the fix the mouse is pointing at.
void Updraft::IgcViewer::PlotWidget::updatePickedTexts | ( | int | i | ) | [private] |
Update picked texts when a new fix was added at the position `i` in the `pickedFixes` list.
void Updraft::IgcViewer::PlotWidget::updateText | ( | ) | [signal] |
Send a signal that the vectors with the statistics texts (for points and segments) has been changed.
const QPen Updraft::IgcViewer::PlotWidget::ALTITUDE_PEN = QPen(Qt::red) [static, private] |
const QColor Updraft::IgcViewer::PlotWidget::BG_COLOR = QColor(Qt::black) [static, private] |
QImage* Updraft::IgcViewer::PlotWidget::graphPicture [private] |
const QPen Updraft::IgcViewer::PlotWidget::GROUND_SPEED_PEN = QPen(Qt::yellow) [static, private] |
QVector<Label*> Updraft::IgcViewer::PlotWidget::labels [private] |
const QPen Updraft::IgcViewer::PlotWidget::MOUSE_LINE_PEN = QPen(QColor(150, 150, 150)) [static, private] |
const QPen Updraft::IgcViewer::PlotWidget::MOUSE_LINE_PICKED_PEN = QPen(QColor(200, 200, 200)) [static, private] |
bool Updraft::IgcViewer::PlotWidget::mouseOver [private] |
Whether the mouse if over the graph(!) - not widget.
const int Updraft::IgcViewer::PlotWidget::OFFSET_X = 15 [static, private] |
Offset from the window border.
const int Updraft::IgcViewer::PlotWidget::OFFSET_Y = 10 [static, private] |
QList<PickData> Updraft::IgcViewer::PlotWidget::pickedFixes [private] |
The set of picked fixes.
QList<QString> Updraft::IgcViewer::PlotWidget::pickedFixesStatTexts [private] |
Statistics texts for segments between picked fixes.
QList<int> Updraft::IgcViewer::PlotWidget::pickedPositions [private] |
Ordered list of the x coordinates of the picked positions.
QList<QString> Updraft::IgcViewer::PlotWidget::segmentsStatTexts [private] |
Statistics texts for picked fixes.
const QPen Updraft::IgcViewer::PlotWidget::VERTICAL_SPEED_PEN = QPen(Qt::blue) [static, private] |
int Updraft::IgcViewer::PlotWidget::xLine [private] |
The coordinate to draw the vertical line where the mouse points.