Qt Virtual Chart Table (QVCT)
|
[UI] Chart (view) More...
#include <charts/CChart.hpp>
Public Member Functions | |
CChart (const QString &_rqsFileName, QWidget *_pqParent=0) | |
virtual | ~CChart () |
void | addElevation (const QString &_rqsFileName) |
Add elevation model data to chart. More... | |
void | setDrawArea (QRectF _qRectFDrawArea) |
Sets the viewport draw area. More... | |
void | resetDrawArea () |
Resets the viewport draw area (to the widget's area) More... | |
void | setGeoPosition (const CDataPosition &_roGeoPosition) |
Sets the current (center) position (geographical coordinates) of the chart. More... | |
void | lockPosition (bool _bLock) |
Sets the position lock status. More... | |
void | setZoom (double _fdZoom) |
Sets the current zoom factor. More... | |
void | lockZoom (bool _bLock) |
Sets the zoom lock status. More... | |
void | showElevation (bool _bShow) |
Sets the elevation model show status. More... | |
QVCT::EStatus | getStatus () const |
Returns the internal status of the object. More... | |
QString | getFileName () const |
Returns the underlying chart (GDAL dataset) file name. More... | |
QRectF | getDrawArea () const |
Returns the viewport draw area. More... | |
CDataPosition | getGeoPositionCenter () const |
Returns the center position (geographical coordinates) of the chart. More... | |
CDataPosition | getGeoPosition () const |
Returns the current (center) position (geographical coordinates) of the chart. More... | |
QPointF | getDrawPositionCenter () const |
Returns the viewport draw area's center position. More... | |
QPointF | getDatPosition () const |
Returns the current (center) position (dataset coordinates) of the chart. More... | |
bool | isPositionLocked () const |
Returns the position lock status. More... | |
double | getZoom () const |
Returns the current zoom factor. More... | |
double | getZoomActual () const |
Returns the zoom factor corresponding to a 1:1 dataset/screen pixels ratio. More... | |
double | getZoomFit () const |
Returns the zoom factor allowing to view the entire chart. More... | |
double | getZoomArea (const CDataPosition &_roGeoPosition1, const CDataPosition &_roGeoPosition2) const |
Returns the zoom factor allowing to view the given geographical area (defined by its opposite corners) More... | |
bool | isZoomLocked () const |
Returns the zoom lock status. More... | |
bool | hasElevation () const |
Returns whether this chart has been associated elevation model data. More... | |
bool | isElevationShowed () const |
Returns the elevation model show status. More... | |
double | getResolution () const |
Returns the resolution of the chart at its current position, in meters per pixel [m/px]. More... | |
CDataPosition | toGeoPosition (const QPointF &_rqPointFDrawPosition) const |
Converts the given chart draw position to geographical position. More... | |
QPointF | toDrawPosition (const CDataPosition &_roGeoPosition) const |
Converts the given (geographical) position [long,lat,elev] to chart draw point [px]. More... | |
void | move (const QPointF &_rqPointFDrawPositionOffset) |
Move the current (center) chart position by specified offset (in the draw area) More... | |
void | print (QPrinter *_pqPrinter) |
Prints the chart. More... | |
void | parseQVCT (const QDomElement &_rqDomElement) |
Retrieves this object's content from the given QVCT source (file) More... | |
void | dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter) const |
Stores this object's content to the given QVCT destination (file) More... | |
Protected Member Functions | |
virtual void | paintEvent (QPaintEvent *_pqPaintEvent) |
void | draw () |
Draws the chart (on screen) More... | |
Private Attributes | |
CChartGDALRaster * | poChartGDALRaster |
GDAL chart (dataset) More... | |
CChartGDALElevation * | poChartGDALElevation |
GDAL data elevation model (dataset) More... | |
QRectF | qRectFDrawArea |
Viewport draw area. More... | |
QPointF | qPointFDatPosition |
Current (center) position in the GDAL dataset. More... | |
bool | bPositionLock |
Position lock status. More... | |
double | fdZoom |
Current zoom factor. More... | |
bool | bZoomLock |
Zoom lock status. More... | |
bool | bShowElevation |
Elevation model show status. More... | |
[UI] Chart (view)
This class wraps a CChartGDAL object and allows it to be manipulated and displayed in the "virtual" chart table.
Definition at line 43 of file CChart.hpp.
CChart::CChart | ( | const QString & | _rqsFileName, |
QWidget * | _pqParent = 0 |
||
) |
Definition at line 44 of file CChart.cpp.
|
virtual |
Definition at line 63 of file CChart.cpp.
void CChart::addElevation | ( | const QString & | _rqsFileName | ) |
Add elevation model data to chart.
Definition at line 69 of file CChart.cpp.
|
protectedvirtual |
Definition at line 84 of file CChart.cpp.
|
inline |
Sets the viewport draw area.
Definition at line 105 of file CChart.hpp.
void CChart::resetDrawArea | ( | ) |
Resets the viewport draw area (to the widget's area)
Definition at line 100 of file CChart.cpp.
void CChart::setGeoPosition | ( | const CDataPosition & | _roGeoPosition | ) |
Sets the current (center) position (geographical coordinates) of the chart.
Definition at line 105 of file CChart.cpp.
|
inline |
Sets the position lock status.
Definition at line 111 of file CChart.hpp.
|
inline |
Sets the current zoom factor.
Definition at line 113 of file CChart.hpp.
|
inline |
Sets the zoom lock status.
Definition at line 115 of file CChart.hpp.
void CChart::showElevation | ( | bool | _bShow | ) |
Sets the elevation model show status.
Definition at line 110 of file CChart.cpp.
QVCT::EStatus CChart::getStatus | ( | ) | const |
Returns the internal status of the object.
NOTE: Anything but QVCT::OK means the object is not usable.
Definition at line 128 of file CChart.cpp.
QString CChart::getFileName | ( | ) | const |
Returns the underlying chart (GDAL dataset) file name.
Definition at line 133 of file CChart.cpp.
|
inline |
Returns the viewport draw area.
Definition at line 127 of file CChart.hpp.
CDataPosition CChart::getGeoPositionCenter | ( | ) | const |
Returns the center position (geographical coordinates) of the chart.
Definition at line 138 of file CChart.cpp.
CDataPosition CChart::getGeoPosition | ( | ) | const |
Returns the current (center) position (geographical coordinates) of the chart.
Definition at line 143 of file CChart.cpp.
QPointF CChart::getDrawPositionCenter | ( | ) | const |
Returns the viewport draw area's center position.
Definition at line 148 of file CChart.cpp.
|
inline |
Returns the current (center) position (dataset coordinates) of the chart.
Definition at line 135 of file CChart.hpp.
|
inline |
Returns the position lock status.
Definition at line 137 of file CChart.hpp.
|
inline |
Returns the current zoom factor.
Definition at line 139 of file CChart.hpp.
|
inline |
Returns the zoom factor corresponding to a 1:1 dataset/screen pixels ratio.
Definition at line 141 of file CChart.hpp.
double CChart::getZoomFit | ( | ) | const |
Returns the zoom factor allowing to view the entire chart.
Definition at line 153 of file CChart.cpp.
double CChart::getZoomArea | ( | const CDataPosition & | _roGeoPosition1, |
const CDataPosition & | _roGeoPosition2 | ||
) | const |
Returns the zoom factor allowing to view the given geographical area (defined by its opposite corners)
Definition at line 161 of file CChart.cpp.
|
inline |
Returns the zoom lock status.
Definition at line 147 of file CChart.hpp.
|
inline |
Returns whether this chart has been associated elevation model data.
Definition at line 149 of file CChart.hpp.
|
inline |
Returns the elevation model show status.
Definition at line 151 of file CChart.hpp.
double CChart::getResolution | ( | ) | const |
Returns the resolution of the chart at its current position, in meters per pixel [m/px].
Definition at line 176 of file CChart.cpp.
CDataPosition CChart::toGeoPosition | ( | const QPointF & | _rqPointFDrawPosition | ) | const |
Converts the given chart draw position to geographical position.
Definition at line 185 of file CChart.cpp.
QPointF CChart::toDrawPosition | ( | const CDataPosition & | _roGeoPosition | ) | const |
Converts the given (geographical) position [long,lat,elev] to chart draw point [px].
Definition at line 192 of file CChart.cpp.
void CChart::move | ( | const QPointF & | _rqPointFDrawPositionOffset | ) |
Move the current (center) chart position by specified offset (in the draw area)
Definition at line 198 of file CChart.cpp.
|
protected |
Draws the chart (on screen)
Definition at line 203 of file CChart.cpp.
void CChart::print | ( | QPrinter * | _pqPrinter | ) |
Prints the chart.
Definition at line 253 of file CChart.cpp.
void CChart::parseQVCT | ( | const QDomElement & | _rqDomElement | ) |
Retrieves this object's content from the given QVCT source (file)
Definition at line 283 of file CChart.cpp.
void CChart::dumpQVCT | ( | QXmlStreamWriter & | _rqXmlStreamWriter | ) | const |
Stores this object's content to the given QVCT destination (file)
Definition at line 309 of file CChart.cpp.
|
private |
GDAL chart (dataset)
Definition at line 53 of file CChart.hpp.
|
private |
GDAL data elevation model (dataset)
Definition at line 56 of file CChart.hpp.
|
private |
Viewport draw area.
Definition at line 59 of file CChart.hpp.
|
private |
Current (center) position in the GDAL dataset.
Definition at line 62 of file CChart.hpp.
|
private |
Position lock status.
Definition at line 65 of file CChart.hpp.
|
private |
|
private |
|
private |
Elevation model show status.
Definition at line 74 of file CChart.hpp.