20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
69 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
73 __qFontHeader.setPixelSize( 16 );
74 __qFontHeader.setBold(
true );
75 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
76 QLabel* __pqLabelIcon =
new QLabel();
77 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/track.png" ) );
78 __pqLabelIcon->setToolTip( tr(
"Segment") );
79 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
84 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
85 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
89 QTabWidget* __poTabWidget =
new QTabWidget();
90 __poTabWidget->setTabPosition( QTabWidget::South );
91 __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
94 QWidget* __poWidgetSummary =
new QWidget();
95 QVBoxLayout* __pqVBoxLayoutSummary =
new QVBoxLayout();
96 __qFontData.setPixelSize( 20 );
105 poTextLengthRL->setToolTip( tr(
"Length (rhumb-lines along segment)") );
118 __poWidgetSummary->setLayout( __pqVBoxLayoutSummary );
119 __poTabWidget->addTab( __poWidgetSummary, tr(
"Summary") );
122 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
125 QFrame* __pqFrameSeparator =
new QFrame();
126 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
127 __pqVBoxLayout->addWidget( __pqFrameSeparator );
130 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
134 __pqHBoxLayoutButtons->addWidget(
new QLabel(), 1, Qt::AlignRight );
135 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
138 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
152 poTextContent->
setText( QString::number( __poTrackSubContainer->childCount() )+
" "+tr(
"Point(s)") );
195 bool __bVisible = __poTrackSubContainer->
isVisible();
197 if( __bVisible != __poTrackSubContainer->
isVisible() )
223 __pqMutexDataChange->lock();
224 __poTrackContainer->removeChild( __poTrackSubContainer );
225 __pqMutexDataChange->unlock();
226 delete __poTrackSubContainer;
227 QTreeWidgetItem* __pqTreeWidgetItem = __poTrackOverlay->currentItem();
228 if( __pqTreeWidgetItem ) __poTrackOverlay->
showDetail( __pqTreeWidgetItem );
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]
[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.
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)
[UI] Track overlay container
[UI] Track overlay container
@ VISIBLE
Track visibility status.
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
virtual void disableContent()
Disables the content (controls) of the underlying widget.
QPushButton * pqPushButtonDelete
[UI:Button] Delete
COverlayText * poTextLengthRL
[UI:Label] Length (rhumb-line)
QPushButton * pqPushButtonCenter
[UI:Button] Center (on chart)
COverlayText * poTextContent
[UI:Label] Content (items summary)
void slotPositionCenter()
[UI:Slot] Slot to center chart (on sub-container's items position)
QPushButton * pqPushButtonVisible
[UI:Button] Visibility status
COverlayText * poTextTimeElapsed
[UI:Label] Elapsed time
void slotDelete()
[UI:Slot] Slot to delete (this sub-container)
virtual void enableContent()
Enables the content (controls) of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
void slotToggleVisible()
[UI:Slot] Slot to modify the visibility status
void constructLayout()
Constructs the layout of the user-interface.
CTrackSubContainerDetailView(QWidget *_pqParent=0)
COverlayText * poTextName
[UI:Label] Name
virtual void resetContent()
Resets (clears) the content of the underlying widget.
[UI] Track overlay sub-container
double getLengthRL()
Returns the track's (rhumb-line) length.
virtual COverlay * useOverlay()
Returns this object's (base) overlay.
double getTimeElapsed()
Returns the track's elapsed time.
virtual void toggleVisibility()
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, EUnit _eUnit, int _iPrecision=0)
Returns the formatted represention of the given value, using the specified format/unit and decimal pr...
static QMutex * useMutexDataChange()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()