20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
41 , bIgnoreUpdate( true )
70 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
74 __qFontHeader.setPixelSize( 16 );
75 __qFontHeader.setBold(
true );
76 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
77 QLabel* __pqLabelIcon =
new QLabel();
78 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/vessel_device.png" ) );
79 __pqLabelIcon->setToolTip( tr(
"Device") );
80 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
85 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
86 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
90 QTabWidget* __poTabWidget =
new QTabWidget();
91 __poTabWidget->setTabPosition( QTabWidget::South );
94 QWidget* __poWidgetPosition =
new QWidget();
95 QVBoxLayout* __pqVBoxLayoutPosition =
new QVBoxLayout();
96 __qFontData.setPixelSize( 20 );
118 __poWidgetPosition->setLayout( __pqVBoxLayoutPosition );
119 __poTabWidget->addTab( __poWidgetPosition, tr(
"Position") );
122 QWidget* __poWidgetCourse =
new QWidget();
123 QVBoxLayout* __pqVBoxLayoutCourse =
new QVBoxLayout();
124 __qFontData.setPixelSize( 20 );
133 poTextSpeed->setToolTip( tr(
"Speed (horizontal) & Error[m/s]") );
146 __poWidgetCourse->setLayout( __pqVBoxLayoutCourse );
147 __poTabWidget->addTab( __poWidgetCourse, tr(
"Course") );
150 QWidget* __poWidgetTime =
new QWidget();
151 QVBoxLayout* __pqVBoxLayoutTime =
new QVBoxLayout();
160 poTextTime->setToolTip( tr(
"Time & Error[s]") );
167 poTextTime2->setToolTip( tr(
"Time (alternate timezone)") );
173 __poWidgetTime->setLayout( __pqVBoxLayoutTime );
174 __poTabWidget->addTab( __poWidgetTime, tr(
"Time") );
177 QWidget* __poWidgetPrecision =
new QWidget();
178 QVBoxLayout* __pqVBoxLayoutPrecision =
new QVBoxLayout();
194 poTextDop->setToolTip( tr(
"HDOP / VDOP / TDOP") );
197 poTextDop->setAlignment( Qt::AlignHCenter );
199 __pqVBoxLayoutPrecision->addWidget(
poTextDop, 1 );
200 __poWidgetPrecision->setLayout( __pqVBoxLayoutPrecision );
201 __poTabWidget->addTab( __poWidgetPrecision, tr(
"Precision") );
204 QScrollArea* __poScrollAreaText =
new QScrollArea();
205 __poScrollAreaText->setStyleSheet(
".QScrollArea, .QWidget { BACKGROUND-COLOR: rgba(0, 0, 0, 0); BORDER: none; }" );
206 __poScrollAreaText->setWidgetResizable(
true );
207 QWidget* __poWidgetText =
new QWidget();
208 QVBoxLayout* __pqVBoxLayoutText =
new QVBoxLayout();
209 __qFontData.setPixelSize( 12 );
211 poText->setToolTip( tr(
"Additional Textual Data") );
212 poText->setFont( __qFontData );
214 poText->setWordWrap(
true );
216 __pqVBoxLayoutText->addWidget(
poText, 1 );
217 __poWidgetText->setLayout( __pqVBoxLayoutText );
218 __poScrollAreaText->setWidget( __poWidgetText );
219 __poTabWidget->addTab( __poScrollAreaText, tr(
"Text") );
222 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
225 QFrame* __pqFrameSeparator =
new QFrame();
226 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
227 __pqVBoxLayout->addWidget( __pqFrameSeparator );
230 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
234 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
237 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
259 ?
"("+QString::number( __poVesselPointDevice->
getErrorHorizontal(),
'f', 1 )+
")" :
"(n/a)";
273 ?
"("+QString::number( __poVesselPointDevice->
getErrorVertical(),
'f', 1 )+
")" :
"(n/a)";
283 ?
"("+QString::number( __poVesselPointDevice->
getErrorBearing(),
'f', 1 )+
")" :
"(n/a)";
290 ?
"("+QString::number( __poVesselPointDevice->
getErrorSpeed(),
'f', 1 )+
")" :
"(n/a)";
305 double __fdTime = __poVesselPointDevice->
getTime();
307 ?
"("+QString::number( __poVesselPointDevice->
getErrorTime(),
'f', 3 )+
")" :
"(n/a)";
328 double __fdDopTime = __poVesselPointDevice->
getDopTime();
344 bool __bDynamic = __poVesselPointDevice->
isDynamic();
349 pqPushButtonConnect->setIcon( QIcon( __bConnected ?
":icons/32x32/device_connect.png" :
":icons/32x32/device_disconnect.png" ) );
415 __pqMutexDataChange->lock();
419 __poVesselPoint->removeChild( __poVesselPointDevice );
420 delete __poVesselPointDevice;
421 QTreeWidgetItem* __pqTreeWidgetItem = __poVesselOverlay->currentItem();
422 if( __pqTreeWidgetItem ) __poVesselOverlay->
showDetail( __pqTreeWidgetItem );
425 __pqMutexDataChange->unlock();
void updateChart()
Update the (current) chart content (on screen)
double getSpeedVertical() const
Returns this course's vertical speed, in meters per second.
static constexpr double UNDEFINED_BEARING
Specific value for an undefined bearing.
static constexpr double UNDEFINED_SPEED
Specific value for an undefined speed.
double getBearing() const
Returns this course's bearing, in degrees.
double getSpeed() const
Returns this course's horizontal speed, in meters per second.
double getLongitude() const
Returns this position's longitude, in degrees.
static constexpr double UNDEFINED_LATITUDE
Specific value for an undefined latitude.
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 constexpr double UNDEFINED_VALUE
static const double UNDEFINED_VALUE
Specific value for an undefined component.
double getDopTime() const
Returns the time Dilution-of-Precision (TDOP)
double getDopHorizontal() const
Returns the horizontal position Dilution-of-Precision (HDOP)
double getDopVertical() const
Returns the vertical position Dilution-of-Precision (VDOP)
static QString getTypeString(int _eType)
int getSourcesSeen() const
Returns the seen sources count (most likely satellites)
double getErrorTime() const
Returns the time error, in seconds.
double getErrorVertical() const
Returns the vertical position error, in meters.
QString getText() const
Returns the additional textual data string.
double getErrorSpeed() const
Returns the horizontal speed error, in meters per second.
double getErrorHorizontal() const
Returns the horizontal position error, in meters.
double getErrorBearing() const
Returns the bearing error, in degrees.
double getErrorSpeedVertical() const
Returns the vertical speed error, in meters per second.
int getSourcesUsed() const
Returns the used sources count (most likely satellites)
QString getSourceName() const
Returns the source name.
[UI] Generic overlay object's detail view
COverlayObject * poOverlayObject
Overlay object being displayed.
QString getName() const
Returns this object's name.
[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)
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, 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, 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...
[UI] Vessel overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
COverlayText * poTextSources
[UI:Label] Sources (used/seen)
virtual void resetContent()
Resets (clears) the content of the underlying widget.
COverlayText * poTextDop
[UI:Label] DOP
void constructLayout()
Constructs the layout of the user-interface.
void slotRefreshContent()
[UI:Slot] Slot to refresh the view content
COverlayText * poTextTime
[UI:Label] Time
QPushButton * pqPushButtonDelete
[UI:Button] Delete
void slotConnect(bool)
[UI:Slot] Slot to connect (to the actual device)
COverlayText * poTextLongitude
[UI:Label] Longitude
bool bIgnoreUpdate
Flag that disables checkable buttons update.
CVesselPointDeviceDetailView(QWidget *_pqParent=0)
COverlayText * poTextDate
[UI:Label] Date
QPushButton * pqPushButtonConnect
[UI:Button] Connect (device)
virtual void enableContent()
Enables the content (controls) of the underlying widget.
COverlayText * poTextElevation
[UI:Label] Elevation
void slotDelete()
[UI:Slot] Slot to delete (this point/point)
COverlayText * poTextBearing
[UI:Label] Bearing
COverlayText * poText
[UI:Label] Additional textual data string
COverlayText * poTextName
[UI:Label] Name
QPushButton * pqPushButtonEdit
[UI:Button] Edit
virtual void refreshContent()
Refreshes the content of the underlying widget.
virtual void disableContent()
Disables the content (controls) of the underlying widget.
COverlayText * poTextSpeedVertical
[UI:Label] Vertical speed
COverlayText * poTextFixType
[UI:Label] Fix type
COverlayText * poTextSpeed
[UI:Label] Horizontal speed
COverlayText * poTextLatitude
[UI:Label] Latitude
void slotEdit()
[UI:Slot] Slot to display edit view
COverlayText * poTextTime2
[UI:Label] Time (alternate timezone)
bool isDynamic()
Returns whether the device is dynamically generated.
bool isDeviceConnected() const
Returns whether the actual device is connected.
void disconnectDevice()
Disconnects from the actual device.
bool connectDevice()
Connects to the actual device.
[UI] Vessel overlay point (item) / vessel
static CVesselOverlay * useVesselOverlay()
static QMutex * useMutexDataChange()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()