24 #include <QDockWidget>
41 , bContentDisplayed( false )
43 QDockWidget::setObjectName(
"VesselTarget" );
44 QDockWidget::setAllowedAreas( Qt::AllDockWidgetAreas );
46 QObject::connect(
this, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)),
this, SLOT(
slotLocationChanged(Qt::DockWidgetArea) ) );
47 QObject::connect(
this, SIGNAL(topLevelChanged(
bool)),
this, SLOT(
slotTopLevelChanged(
bool) ) );
65 poTextEte->setToolTip( tr(
"Estimated Time En-Route (ETE)") );
66 poTextEte->setAlignment( Qt::AlignCenter );
70 poTextEta->setToolTip( tr(
"Estimated Time of Arrival (ETA)") );
71 poTextEta->setAlignment( Qt::AlignCenter );
111 bool __bTimeValid =
false;
118 double __fdSpeedCosine = __fdSpeed * cos( ( __fdBearingCourse - __fdBearingTarget ) *
QVCT::DEG2RAD );
119 if( __fdSpeedCosine <= 0 )
break;
120 double __fdDuration = __fdDistance / __fdSpeedCosine;
121 if( __fdDuration > 86400 )
break;
122 QDateTime __qDateTime = QDateTime::currentDateTime();
123 double __fdTime = __qDateTime.toUTC().toTime_t()+__qDateTime.time().msec()/1000.0;
CDataCourse GroundCourse
Ground course.
CDataCourseValidity GroundCourseValidity
Ground course validity.
bool isValidSpeed() const
Returns the horizontal speed's (global) validity status.
bool isValidBearing() const
Returns the bearing's (global) validity status.
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.
bool isValidPosition() const
Returns the position's (global) validity status.
double getLongitude() const
Returns this position's longitude, in degrees.
static constexpr double UNDEFINED_LATITUDE
Specific value for an undefined latitude.
static double bearingRL(const CDataPosition &_roPosition1, const CDataPosition &_roPosition2)
Returns the rhumb-line (constant) bearing between two points, in degrees.
static double distanceRL(const CDataPosition &_roPosition1, const CDataPosition &_roPosition2)
Returns the rhumb-line distance between two points, in meters.
double getLatitude() const
Returns this position's latitude, in degrees.
static const CDataPosition UNDEFINED
Specific value for an undefined position.
static constexpr double UNDEFINED_LONGITUDE
Specific value for an undefined longitude.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
void resetText()
Resets (clears) the underlying QLabel's text.
CPointerPoint * usePointerTarget()
Returns the pointer point corresponding to the target.
[UI] Pointer overlay point (item)
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 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...
void constructLayout()
Constructs the layout of the user-interface.
COverlayText * poTextBearing
[UI:Label] Bearing
COverlayText * poTextEte
[UI:Label] Estimated Time En-Route (ETE)
COverlayText * poTextDistance
[UI:Label] Distance
virtual void resetContent()
Resets (clears) the content of the underlying widget.
COverlayText * poTextEta
[UI:Label] Estimated Time of Arrival (ETA)
bool bContentDisplayed
Flag to track whether content data are currently displayed.
CVesselTarget(QWidget *_pqParent=0)
virtual void setFont(QFont _qFont)
Sets the font for the content of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
static CPointerOverlay * usePointerOverlay()
static constexpr double DEG2RAD