21 #include <QHBoxLayout>
23 #include <QPushButton>
24 #include <QScrollArea>
25 #include <QStackedWidget>
27 #include <QVBoxLayout>
61 pqPushButtonCenter->setToolTip( tr(
"Center chart on this landmarks set's mean position") );
90 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
94 __qFontHeader.setPixelSize( 16 );
95 __qFontHeader.setBold(
true );
96 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
97 QLabel* __pqLabelIcon =
new QLabel();
98 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/landmark.png" ) );
99 __pqLabelIcon->setToolTip( tr(
"Landmarks set") );
100 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
105 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
106 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
110 QTabWidget* __poTabWidget =
new QTabWidget();
111 __poTabWidget->setTabPosition( QTabWidget::South );
112 __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
115 QWidget* __poWidgetSummary =
new QWidget();
116 QVBoxLayout* __pqVBoxLayoutSummary =
new QVBoxLayout();
117 __qFontData.setPixelSize( 20 );
125 __poWidgetSummary->setLayout( __pqVBoxLayoutSummary );
126 __poTabWidget->addTab( __poWidgetSummary, tr(
"Summary") );
129 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
132 QFrame* __pqFrameSeparator =
new QFrame();
133 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
134 __pqVBoxLayout->addWidget( __pqFrameSeparator );
137 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
144 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
147 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
161 poTextContent->
setText( QString::number( __poLandmarkContainer->childCount() )+
" "+tr(
"Landmark(s)") );
206 bool __bVisible = __poLandmarkContainer->
isVisible();
208 if( __bVisible != __poLandmarkContainer->
isVisible() )
237 if( __qsFilename.isEmpty() )
return;
238 QFileInfo __qFileInfo( __qsFilename );
239 if( __qFileInfo.suffix().isEmpty() ) __qsFilename +=
".qvct";
240 QStringList __qsListExtensions; __qsListExtensions <<
"qvct" <<
"gpx";
252 __pqMutexDataChange->lock();
253 __poLandmarkOverlay->removeChild( __poLandmarkContainer );
254 __pqMutexDataChange->unlock();
255 delete __poLandmarkContainer;
256 QTreeWidgetItem* __pqTreeWidgetItem = __poLandmarkOverlay->currentItem();
257 if( __pqTreeWidgetItem ) __poLandmarkOverlay->
showDetail( __pqTreeWidgetItem );
268 if( !__poLandmarkPoint )
return;
void setProjectModified()
Sets the status of the project to modified (data have changed and need saving)
void setScaleArea(const CDataPosition &_roGeoPosition1, const CDataPosition &_roGeoPosition2, double _fdScaleCorrection=1.0)
Sets the reference scale factor to display the given (geographical) area (defined by its opposite cor...
void updateChart()
Update the (current) chart content (on screen)
void setGeoPosition(const CDataPosition &_roGeoPosition, bool _bSkipCurrent=false)
Sets the reference chart (geographical) position.
(Geographical) Position data [long,lat,elev]
void slotSave()
[UI:Slot] Slot to save this container to file
QPushButton * pqPushButtonCenter
[UI:Button] Center (on chart)
QPushButton * pqPushButtonDelete
[UI:Button] Delete
void slotEdit()
[UI:Slot] Slot to display edit view
QPushButton * pqPushButtonVisible
[UI:Button] Visibility status
void slotAddPoint()
[UI:Slot] Slot to add new (landmark) point
void slotDelete()
[UI:Slot] Slot to delete (this container)
COverlayText * poTextName
[UI:Label] Name
QPushButton * pqPushButtonEdit
[UI:Button] Edit
void constructLayout()
Constructs the layout of the user-interface.
QPushButton * pqPushButtonSave
[UI:Button] Save
CLandmarkContainerDetailView(QWidget *_pqParent=0)
void slotToggleVisible()
[UI:Slot] Slot to modify the visibility status
COverlayText * poTextContent
[UI:Label] Content (items summary)
virtual void enableContent()
Enables the content (controls) of the underlying widget.
void slotPositionCenter()
[UI:Slot] Slot to center chart (on container's items position)
QPushButton * pqPushButtonAddPoint
[UI:Button] Add new (landmark) point
virtual void resetContent()
Resets (clears) the content of the underlying widget.
virtual void disableContent()
Disables the content (controls) of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
[UI] Landmark overlay container
virtual void toggleVisibility()
virtual COverlay * useOverlay()
Returns this object's (base) overlay.
[UI] Landmark overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
void save(const QString &_rqsFilename, CLandmarkContainer *_poLandmarkContainer=0) const
Save this object's content (container) to the given file (all selected items if no container is given...
@ VISIBLE
Landmark visibility status.
[UI] Landmark overlay point (item)
virtual void showEdit()
Displays this object's edit widget/view.
QString fileDialog(QVCT::EFileOperation _eFileOperation, const QString &_rqsTitle, const QString &_rqsFilter)
Displays a generic dialog to pick a file for the given operation (open/save)
[UI] Generic overlay object's detail view
COverlayObject * poOverlayObject
Overlay object being displayed.
virtual COverlay * useOverlay()=0
Returns this object's (base) overlay.
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.
static int getPositionBox(const QTreeWidgetItem *_pqTreeWidgetItem, CDataPosition *_poDataPositionLower, CDataPosition *_poDataPositionUpper, int _iIndexMin=0, int _iIndexMax=-1)
Returns the minimal geographical positions box containing the points in the given overlay/container.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
void resetText()
Resets (clears) the underlying QLabel's text.
bool isVisible() const
Returns the point's (marker) visibility status.
void forceRedraw()
Forces this overlay's rendering (not matter its cache content)
static QMutex * useMutexDataChange()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()
static CLandmarkOverlay * useLandmarkOverlay()