|
Updraft
1.0
Open source glider flight visualisation tool.
|
X and Y axis for graph plotting. More...
#include <plotaxes.h>

Signals | |
| void | geometryChanged () |
Public Member Functions | |
| PlotAxes (bool drawTimeTicks=true, bool drawAxisX=true) | |
| qreal | placeX (qreal x) |
| Get the X coordinate for drawing. | |
| qreal | getInverseX (qreal x) |
| Get the inverse value for "placeX". | |
| qreal | placeY (qreal y) |
| Get the Y coordinate for drawing. | |
| qreal | getInverseY (qreal y) |
| Get the inverse value for "placeY". | |
| void | setLimits (qreal min, qreal max, qreal minTime, qreal maxTime) |
| Set the limits for drawing and recalculate all cached values. | |
| void | draw (QPainter *painter) |
| Draw the axes to the painter. | |
| qreal | getBase () |
| Returns the Y coordinate of base axis: the Y coordinate of value 0. | |
| qreal | getStep () |
| Returns the value of the vertical step. | |
| qreal | getFirst () |
| Returns the value of the first vertical tick. | |
| int | getTimeInterval () |
| Returns the value of time interval in seconds. | |
| qreal | getStartTimeTick () |
| Returns the value of the time start in seconds. | |
| int | getVerticalTicks () |
| Returns the number of the vertical ticks. | |
| int | getFirstHour () |
| Returns the value of the time start in seconds. | |
| int | getLastHour () |
| Returns the number of the vertical ticks. | |
| Qt::Orientations | expandingDirections () const |
| Overridden from QLayoutItem. | |
| bool | isEmpty () const |
| QRect | geometry () const |
| QSize | maximumSize () const |
| QSize | minimumSize () const |
| QSize | sizeHint () const |
| void | setGeometry (const QRect &rect) |
Private Member Functions | |
| void | emitGeometryChanged () |
| Signal change of geometry. | |
| qreal | findTickIncrement (qreal range, qreal width, qreal minTickSpacing) |
| Return tick value increment in vertical axis. | |
| qreal | findTimeTickIncrement (qreal range, qreal width, qreal minTickSpacing) |
| Return tick value increment in vertical axis. | |
Private Attributes | |
| Util::LinearFunc | linX |
| Linear functions for placing points. | |
| Util::LinearFunc | linY |
| Util::LinearFunc | tickX |
| Util::LinearFunc | tickY |
| int | tickCountX |
| int | tickCountY |
| QRect | rect |
| qreal | min |
| qreal | max |
| qreal | maxTime |
| qreal | minTime |
| bool | drawTimeTicks |
| Draw time ticks. | |
| bool | drawAxisX |
| Whether to draw the X axis. | |
| qreal | base |
| Position (in drawing cordinates) of the X base. | |
| qreal | step |
| A step in vertical axis. | |
| qreal | first |
| The value of the first vertical tick. | |
| int | timeInterval |
| The step in time axis in seconds. | |
| int | startTimeTick |
| The start time in seconds. | |
| int | firstHour |
| First and last hour for labels. | |
| int | lastHour |
| QVector< int > | timeIntervalValues |
| Predefined time interval values. | |
Static Private Attributes | |
| static const int | TICK_SPACING_X = 10 |
| Smallest distance between ticks. | |
| static const int | TICK_SPACING_Y = 10 |
| static const int | TIME_TICK_HEIGHT = 10 |
| static const QPen | AXES_PEN = QPen(QBrush(Qt::gray), 2) |
| static const QPen | TICKS_PEN = QPen(QBrush(Qt::gray), 0, Qt::DotLine) |
| static const QPen | TIME_TICKS_PEN = QPen(QBrush(Qt::gray), 1) |
X and Y axis for graph plotting.
| Updraft::IgcViewer::PlotAxes::PlotAxes | ( | bool | drawTimeTicks = true, |
| bool | drawAxisX = true |
||
| ) | [explicit] |
| void Updraft::IgcViewer::PlotAxes::draw | ( | QPainter * | painter | ) |
Draw the axes to the painter.
| void Updraft::IgcViewer::PlotAxes::emitGeometryChanged | ( | ) | [private] |
Signal change of geometry.
| Qt::Orientations Updraft::IgcViewer::PlotAxes::expandingDirections | ( | ) | const |
Overridden from QLayoutItem.
| qreal Updraft::IgcViewer::PlotAxes::findTickIncrement | ( | qreal | range, |
| qreal | width, | ||
| qreal | minTickSpacing | ||
| ) | [private] |
Return tick value increment in vertical axis.
| qreal Updraft::IgcViewer::PlotAxes::findTimeTickIncrement | ( | qreal | range, |
| qreal | width, | ||
| qreal | minTickSpacing | ||
| ) | [private] |
Return tick value increment in vertical axis.
| QRect Updraft::IgcViewer::PlotAxes::geometry | ( | ) | const |
| void Updraft::IgcViewer::PlotAxes::geometryChanged | ( | ) | [signal] |
| qreal Updraft::IgcViewer::PlotAxes::getBase | ( | ) |
Returns the Y coordinate of base axis: the Y coordinate of value 0.
| qreal Updraft::IgcViewer::PlotAxes::getFirst | ( | ) |
Returns the value of the first vertical tick.
Returns the value of the time start in seconds.
| qreal Updraft::IgcViewer::PlotAxes::getInverseX | ( | qreal | x | ) |
Get the inverse value for "placeX".
| qreal Updraft::IgcViewer::PlotAxes::getInverseY | ( | qreal | y | ) |
Get the inverse value for "placeY".
Returns the number of the vertical ticks.
Returns the value of the time start in seconds.
| qreal Updraft::IgcViewer::PlotAxes::getStep | ( | ) |
Returns the value of the vertical step.
Returns the value of time interval in seconds.
Returns the number of the vertical ticks.
| bool Updraft::IgcViewer::PlotAxes::isEmpty | ( | ) | const |
| QSize Updraft::IgcViewer::PlotAxes::maximumSize | ( | ) | const |
| QSize Updraft::IgcViewer::PlotAxes::minimumSize | ( | ) | const |
| qreal Updraft::IgcViewer::PlotAxes::placeX | ( | qreal | x | ) |
Get the X coordinate for drawing.
| qreal Updraft::IgcViewer::PlotAxes::placeY | ( | qreal | y | ) |
Get the Y coordinate for drawing.
| void Updraft::IgcViewer::PlotAxes::setGeometry | ( | const QRect & | rect | ) |
time axis:
vertical axis:
| void Updraft::IgcViewer::PlotAxes::setLimits | ( | qreal | min, |
| qreal | max, | ||
| qreal | minTime, | ||
| qreal | maxTime | ||
| ) |
Set the limits for drawing and recalculate all cached values.
| QSize Updraft::IgcViewer::PlotAxes::sizeHint | ( | ) | const |
const QPen Updraft::IgcViewer::PlotAxes::AXES_PEN = QPen(QBrush(Qt::gray), 2) [static, private] |
qreal Updraft::IgcViewer::PlotAxes::base [private] |
Position (in drawing cordinates) of the X base.
bool Updraft::IgcViewer::PlotAxes::drawAxisX [private] |
Whether to draw the X axis.
bool Updraft::IgcViewer::PlotAxes::drawTimeTicks [private] |
Draw time ticks.
qreal Updraft::IgcViewer::PlotAxes::first [private] |
The value of the first vertical tick.
int Updraft::IgcViewer::PlotAxes::firstHour [private] |
First and last hour for labels.
int Updraft::IgcViewer::PlotAxes::lastHour [private] |
Linear functions for placing points.
qreal Updraft::IgcViewer::PlotAxes::max [private] |
qreal Updraft::IgcViewer::PlotAxes::maxTime [private] |
qreal Updraft::IgcViewer::PlotAxes::min [private] |
qreal Updraft::IgcViewer::PlotAxes::minTime [private] |
QRect Updraft::IgcViewer::PlotAxes::rect [private] |
int Updraft::IgcViewer::PlotAxes::startTimeTick [private] |
The start time in seconds.
qreal Updraft::IgcViewer::PlotAxes::step [private] |
A step in vertical axis.
const int Updraft::IgcViewer::PlotAxes::TICK_SPACING_X = 10 [static, private] |
Smallest distance between ticks.
const int Updraft::IgcViewer::PlotAxes::TICK_SPACING_Y = 10 [static, private] |
int Updraft::IgcViewer::PlotAxes::tickCountX [private] |
int Updraft::IgcViewer::PlotAxes::tickCountY [private] |
const QPen Updraft::IgcViewer::PlotAxes::TICKS_PEN = QPen(QBrush(Qt::gray), 0, Qt::DotLine) [static, private] |
const int Updraft::IgcViewer::PlotAxes::TIME_TICK_HEIGHT = 10 [static, private] |
const QPen Updraft::IgcViewer::PlotAxes::TIME_TICKS_PEN = QPen(QBrush(Qt::gray), 1) [static, private] |
int Updraft::IgcViewer::PlotAxes::timeInterval [private] |
The step in time axis in seconds.
QVector<int> Updraft::IgcViewer::PlotAxes::timeIntervalValues [private] |
Predefined time interval values.