20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
86 pqPushButtonAddRoute->setToolTip( tr(
"Create a new (route) waypoint at the landmark position") );
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/landmark_point.png" ) );
101 __pqLabelIcon->setToolTip( tr(
"Landmark") );
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 = __poLandmarkPoint->
getSymbol();
309 bool __bVisible = __poLandmarkPoint->
isVisible();
311 if( __bVisible != __poLandmarkPoint->
isVisible() )
354 __pqMutexDataChange->lock();
355 __poLandmarkContainer->removeChild( __poLandmarkPoint );
356 __pqMutexDataChange->unlock();
357 delete __poLandmarkPoint;
358 QTreeWidgetItem* __pqTreeWidgetItem = __poLandmarkOverlay->currentItem();
359 if( __pqTreeWidgetItem ) __poLandmarkOverlay->
showDetail( __pqTreeWidgetItem );
370 if( !__poRouteContainer )
return;
374 if( !__poRoutePoint )
return;
380 __poRouteOverlay->setCurrentItem( __poRoutePoint );
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
[UI] Landmark overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
@ VISIBLE
Landmark visibility status.
CLandmarkPointDetailView(QWidget *_pqParent=0)
COverlayText * poTextComment
[UI:Label] Comment
void constructLayout()
Constructs the layout of the user-interface.
virtual void enableContent()
Enables the content (controls) of the underlying widget.
void slotPositionCenter()
[UI:Slot] Slot to center chart (on item's position)
QPushButton * pqPushButtonAddRoute
[UI:Button] Add new (route) waypoint
virtual void disableContent()
Disables the content (controls) of the underlying widget.
COverlayText * poTextLatitude
[UI:Label] Latitude
QPushButton * pqPushButtonCenter
[UI:Button] Center (on chart)
COverlayText * poTextElevation
[UI:Label] Elevation
COverlayText * poTextDescription
[UI:Label] Description
QPushButton * pqPushButtonEdit
[UI:Button] Edit
void slotMove(bool _bEnable)
[UI:Slot] Slot to enable/disable move (position change)
QLabel * pqLabelSymbol
[UI:Label] Symbol
COverlayText * poTextType
[UI:Label] Type
QPushButton * pqPushButtonDelete
[UI:Button] Delete
virtual void refreshContent()
Refreshes the content of the underlying widget.
void slotAddRoute()
[UI:Slot] Slot to add new (route) waypoint
COverlayText * poTextLongitude
[UI:Label] Longitude
COverlayText * poTextName
[UI:Label] Name
void slotToggleVisible()
[UI:Slot] Slot to modify the visibility status
QPushButton * pqPushButtonMove
[UI:Button] Move (change position)
void slotDelete()
[UI:Slot] Slot to delete (this item/point)
COverlayUrl * poUrl
[UI:Label] URL
void slotEdit()
[UI:Slot] Slot to display edit view
QPushButton * pqPushButtonVisible
[UI:Button] Visibility status
virtual void resetContent()
Resets (clears) the content of the underlying widget.
[UI] Landmark overlay point (item)
QString getSymbol() const
Returns this landmark's symbol.
QString getComment() const
Returns this landmark's comment.
virtual COverlay * useOverlay()
Returns this object's (base) overlay.
virtual void toggleVisibility()
QString getType() const
Returns this landmark's type.
QString getUrl() const
Returns this landmark's URL.
QString getDescription() const
Returns this landmark's description.
[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
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
void setSymbol(const QString &_rqsSymbol)
Sets this waypoint's symbol.
void setUrl(const QString &_rqsUrl)
Sets this waypoint's URL.
void setType(const QString &_rqsType)
Sets this waypoint's type.
void setDescription(const QString &_rqsDescription)
Sets this waypoint's description.
virtual void showEdit()
Displays this object's edit widget/view.
void setComment(const QString &_rqsComment)
Sets this waypoint's comment.
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()