20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
81 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
85 __qFontHeader.setPixelSize( 16 );
86 __qFontHeader.setBold(
true );
87 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
88 QLabel* __pqLabelIcon =
new QLabel();
89 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/track_point.png" ) );
90 __pqLabelIcon->setToolTip( tr(
"Point") );
91 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
96 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
97 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
101 QTabWidget* __poTabWidget =
new QTabWidget();
102 __poTabWidget->setTabPosition( QTabWidget::South );
103 __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
106 QWidget* __poWidgetPosition =
new QWidget();
107 QVBoxLayout* __pqVBoxLayoutPosition =
new QVBoxLayout();
108 __qFontData.setPixelSize( 20 );
130 __poWidgetPosition->setLayout( __pqVBoxLayoutPosition );
131 __poTabWidget->addTab( __poWidgetPosition, tr(
"Position") );
134 QWidget* __poWidgetTime =
new QWidget();
135 QVBoxLayout* __pqVBoxLayoutTime =
new QVBoxLayout();
151 poTextTime2->setToolTip( tr(
"Time (alternate timezone)") );
157 __poWidgetTime->setLayout( __pqVBoxLayoutTime );
158 __poTabWidget->addTab( __poWidgetTime, tr(
"Time") );
161 QWidget* __poWidgetPrecision =
new QWidget();
162 QVBoxLayout* __pqVBoxLayoutPrecision =
new QVBoxLayout();
178 poTextDop->setToolTip( tr(
"HDOP / VDOP") );
181 poTextDop->setAlignment( Qt::AlignHCenter );
183 __pqVBoxLayoutPrecision->addWidget(
poTextDop, 1 );
184 __poWidgetPrecision->setLayout( __pqVBoxLayoutPrecision );
185 __poTabWidget->addTab( __poWidgetPrecision, tr(
"Precision") );
188 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
191 QFrame* __pqFrameSeparator =
new QFrame();
192 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
193 __pqVBoxLayout->addWidget( __pqFrameSeparator );
196 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
201 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
204 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
243 double __fdTime = __poTrackPoint->
getTime();
327 __pqMutexDataChange->lock();
328 __poTrackContainer->removeChild( __poTrackPoint );
329 __pqMutexDataChange->unlock();
330 delete __poTrackPoint;
331 QTreeWidgetItem* __pqTreeWidgetItem = __poTrackOverlay->currentItem();
332 if( __pqTreeWidgetItem ) __poTrackOverlay->
showDetail( __pqTreeWidgetItem );
343 if( !__poLandmarkContainer )
return;
346 if( !__poLandmarkPoint )
return;
347 __poLandmarkOverlay->setCurrentItem( __poLandmarkPoint );
363 if( !__poRouteContainer )
return;
366 if( !__poRoutePoint )
return;
367 __poRouteOverlay->setCurrentItem( __poRoutePoint );
void setProjectModified()
Sets the status of the project to modified (data have changed and need saving)
void updateChart()
Update the (current) chart content (on screen)
void setGeoPosition(const CDataPosition &_roGeoPosition, bool _bSkipCurrent=false)
Sets the reference chart (geographical) position.
double getLongitude() const
Returns this position's longitude, in degrees.
static constexpr double UNDEFINED_LATITUDE
Specific value for an undefined latitude.
void resetPosition()
Resets all coordinates (to an undefined position)
double getElevation() const
Returns this position's elevation, in meters.
double getLatitude() const
Returns this position's latitude, in degrees.
static constexpr double UNDEFINED_LONGITUDE
Specific value for an undefined longitude.
static constexpr double UNDEFINED_ELEVATION
Specific value for an undefined elevation.
double getTime() const
Returns this time's time, in seconds from Unix epoch.
static constexpr double UNDEFINED_TIME
Specific value for an undefined time.
static const double UNDEFINED_VALUE
Specific value for an undefined component.
[UI] Landmark overlay container
CLandmarkPoint * addPoint(const QString &_rqsName, const CDataPosition &_roDataPosition=CDataPosition::UNDEFINED)
Add a new landmark (item/point) to this container.
[UI] Landmark overlay container
CLandmarkContainer * pickContainer()
Pick (select) a container among the available ones (0 if none is selected)
[UI] Landmark overlay point (item)
virtual void showEdit()
Displays this object's edit widget/view.
[UI] Generic overlay object's detail view
COverlayObject * poOverlayObject
Overlay object being displayed.
QString getName() const
Returns this object's name.
QString newChildName(const QString &_rqsName, int _iZeroPrefix=0, bool _bForceSuffix=false) const
Returns a valid (non-duplicate) name for a new sibling of this object.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
const QString & emptyString()
Returns the string corresponding to undefined (empty) content ("n/a" in English)
void resetText()
Resets (clears) the underlying QLabel's text.
void forceRedraw()
Forces this overlay's rendering (not matter its cache content)
CPointerPoint * usePointerPoint()
Returns the pointer point corresponding to the mouse pointer.
[UI] Pointer overlay point (item)
[UI] Route overlay container
CRoutePoint * addPoint(const QString &_rqsName, const CDataPosition &_roDataPosition=CDataPosition::UNDEFINED, bool _bMinimizeLength=false)
Add a new route (item/point) to this container.
[UI] Route overlay container
CRouteContainer * pickContainer()
Pick (select) a route (container) among the available ones (0 if none is selected)
[UI] Route overlay point (item) / waypoint
virtual void showEdit()
Displays this object's edit widget/view.
[UI] Track overlay container
[UI] Track overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
COverlayText * poTextDate
[UI:Label] Date
void constructLayout()
Constructs the layout of the user-interface.
QPushButton * pqPushButtonCenter
[UI:Button] Center (on chart)
COverlayText * poTextElevation
[UI:Label] Elevation
COverlayText * poTextSatellite
[UI:Label] Satellite
CTrackPointDetailView(QWidget *_pqParent=0)
virtual void disableContent()
Disables the content (controls) of the underlying widget.
void slotAddRoute()
[UI:Slot] Slot to add new (route) waypoint
virtual void enableContent()
Enables the content (controls) of the underlying widget.
QPushButton * pqPushButtonAddRoute
[UI:Button] Add new (route) waypoint
COverlayText * poTextTime
[UI:Label] Time
QPushButton * pqPushButtonAddLandmark
[UI:Button] Add new landmark
COverlayText * poTextName
[UI:Label] Name
COverlayText * poTextLatitude
[UI:Label] Latitude
COverlayText * poTextDop
[UI:Label] DOP
COverlayText * poTextFixType
[UI:Label] Fix type
QPushButton * pqPushButtonDelete
[UI:Button] Delete
void slotAddLandmark()
[UI:Slot] Slot to add new landmark
COverlayText * poTextLongitude
[UI:Label] Longitude
virtual void resetContent()
Resets (clears) the content of the underlying widget.
void slotPositionCenter()
[UI:Slot] Slot to center chart (on item's position)
virtual void refreshContent()
Refreshes the content of the underlying widget.
COverlayText * poTextTime2
[UI:Label] Time (alternate timezone)
void slotDelete()
[UI:Slot] Slot to delete (this item/point)
[UI] Track overlay point (item)
double getDopHorizontal()
Sets this track point's horizontal Dilution-of-Precision (HDOP)
int getSatelliteCount()
Sets this track point's satellite count.
double getDopVertical()
Sets this track point's vertical Dilution-of-Precision (VDOP)
QString getFixType()
Sets this track point's fix type.
static QString toString(double _fdValue, CUnitTimeZone::EUnit _eUnitTimeZone, EUnit _eUnit)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static QString toString(double _fdValue, EUnit _eUnit, int _iPrecision=0)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static QString toString(double _fdValue, EType _eType, EUnit _eUnit, int _iPrecision=0)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static QString toString(double _fdValue, CUnitTimeZone::EUnit _eUnitTimeZone, EUnit _eUnit, int _iPrecision=0)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static CPointerOverlay * usePointerOverlay()
static QMutex * useMutexDataChange()
static CRouteOverlay * useRouteOverlay()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()
static CLandmarkOverlay * useLandmarkOverlay()
static CTrackOverlay * useTrackOverlay()