20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
92 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
96 __qFontHeader.setPixelSize( 16 );
97 __qFontHeader.setBold(
true );
98 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
99 QLabel* __pqLabelIcon =
new QLabel();
100 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/route_point.png" ) );
101 __pqLabelIcon->setToolTip( tr(
"Waypoint") );
102 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
107 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
112 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
116 QTabWidget* __poTabWidget =
new QTabWidget();
117 __poTabWidget->setTabPosition( QTabWidget::South );
118 __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
121 QWidget* __poWidgetPosition =
new QWidget();
122 QVBoxLayout* __pqVBoxLayoutPosition =
new QVBoxLayout();
123 __qFontData.setPixelSize( 20 );
145 __poWidgetPosition->setLayout( __pqVBoxLayoutPosition );
146 __poTabWidget->addTab( __poWidgetPosition, tr(
"Position") );
149 QScrollArea* __poScrollAreaInfo =
new QScrollArea();
150 __poScrollAreaInfo->setStyleSheet(
".QScrollArea, .QWidget { BACKGROUND-COLOR: rgba(0, 0, 0, 0); BORDER: none; }" );
151 __poScrollAreaInfo->setWidgetResizable(
true );
152 QWidget* __poWidgetInfo =
new QWidget();
153 QVBoxLayout* __pqVBoxLayoutInfo =
new QVBoxLayout();
154 __qFontData.setPixelSize( 12 );
155 __qFontData.setBold(
true );
162 __qFontData.setBold(
false );
170 __qFontData.setPixelSize( 10 );
179 poUrl->setToolTip( tr(
"URL") );
180 poUrl->setFont( __qFontData );
181 poUrl->setIndent( 10 );
182 poUrl->setWordWrap(
true );
184 __pqVBoxLayoutInfo->addWidget(
poUrl, 1 );
185 __poWidgetInfo->setLayout( __pqVBoxLayoutInfo );
186 __poScrollAreaInfo->setWidget( __poWidgetInfo );
187 __poTabWidget->addTab( __poScrollAreaInfo, tr(
"Info") );
190 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
193 QFrame* __pqFrameSeparator =
new QFrame();
194 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
195 __pqVBoxLayout->addWidget( __pqFrameSeparator );
198 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
205 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
208 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
225 QString __qsSymbol = __poRoutePoint->
getSymbol();
309 bool __bVisible = __poRoutePoint->
isVisible();
311 if( __bVisible != __poRoutePoint->
isVisible() )
354 __pqMutexDataChange->lock();
355 __poRouteContainer->removeChild( __poRoutePoint );
356 __pqMutexDataChange->unlock();
357 delete __poRoutePoint;
358 QTreeWidgetItem* __pqTreeWidgetItem = __poRouteOverlay->currentItem();
359 if( __pqTreeWidgetItem ) __poRouteOverlay->
showDetail( __pqTreeWidgetItem );
370 if( !__poLandmarkContainer )
return;
374 if( !__poLandmarkPoint )
return;
380 __poLandmarkOverlay->setCurrentItem( __poLandmarkPoint );
void setOverlayPointMove(COverlayPoint *_poOverlayPoint)
Sets the overlay point to be moved (and lock all other actions while it is ongoing)
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.
[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)
void setType(const QString &_rqsType)
Sets this landmark's type.
virtual void showEdit()
Displays this object's edit widget/view.
void setDescription(const QString &_rqsDescription)
Sets this landmark's description.
void setComment(const QString &_rqsComment)
Sets this landmark's comment.
void setSymbol(const QString &_rqsSymbol)
Sets this landmark's symbol.
void setUrl(const QString &_rqsUrl)
Sets this landmark's URL.
[UI] Application main window
QPixmap symbolPixmap(const QString &_rqsSymbol)
Returns pixmap matching the given symbol (loaded from the application's symbol directory)
bool symbolExists(const QString &_rqsSymbol)
Returns whether the given symbol exists (in the application's symbol directory)
[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& )
void resetText()
Resets (clears) the underlying QLabel's text.
[UI] Overlay-specific URL label
void setText(const QString &_rqsText)
bool isVisible() const
Returns the point's (marker) visibility status.
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
[UI] Route overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
@ VISIBLE
Route visibility status.
COverlayText * poTextLatitude
[UI:Label] Latitude
void slotAddLandmark()
[UI:Slot] Slot to add new landmark
virtual void disableContent()
Disables the content (controls) of the underlying widget.
QLabel * pqLabelSymbol
[UI:Label] Symbol
COverlayText * poTextElevation
[UI:Label] Elevation
CRoutePointDetailView(QWidget *_pqParent=0)
void constructLayout()
Constructs the layout of the user-interface.
QPushButton * pqPushButtonDelete
[UI:Button] Delete
QPushButton * pqPushButtonVisible
[UI:Button] Visibility status
COverlayText * poTextComment
[UI:Label] Comment
void slotDelete()
[UI:Slot] Slot to delete (this item/point)
void slotToggleVisible()
[UI:Slot] Slot to modify the visibility status
COverlayUrl * poUrl
[UI:Label] URL
QPushButton * pqPushButtonMove
[UI:Button] Move (change position)
COverlayText * poTextName
[UI:Label] Name
void slotEdit()
[UI:Slot] Slot to display edit view
void slotPositionCenter()
[UI:Slot] Slot to center chart (on item's position)
virtual void refreshContent()
Refreshes the content of the underlying widget.
virtual void resetContent()
Resets (clears) the content of the underlying widget.
COverlayText * poTextType
[UI:Label] Type
COverlayText * poTextDescription
[UI:Label] Description
QPushButton * pqPushButtonEdit
[UI:Button] Edit
COverlayText * poTextLongitude
[UI:Label] Longitude
QPushButton * pqPushButtonAddLandmark
[UI:Button] Add new landmark
virtual void enableContent()
Enables the content (controls) of the underlying widget.
QPushButton * pqPushButtonCenter
[UI:Button] Center (on chart)
void slotMove(bool _bEnable)
[UI:Slot] Slot to enable/disable move (position change)
[UI] Route overlay point (item) / waypoint
virtual void toggleVisibility()
QString getComment() const
Returns this waypoint's comment.
QString getDescription() const
Returns this waypoint's description.
QString getType() const
Returns this waypoint's type.
QString getUrl() const
Returns this waypoint's URL.
virtual COverlay * useOverlay()
Returns this object's (base) overlay.
QString getSymbol() const
Returns this waypoint's symbol.
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 CPointerOverlay * usePointerOverlay()
static QMutex * useMutexDataChange()
static CRouteOverlay * useRouteOverlay()
static COverlayListView * useOverlayListView()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()
static CLandmarkOverlay * useLandmarkOverlay()