21 #include <QDialogButtonBox>
22 #include <QFormLayout>
23 #include <QHBoxLayout>
27 #include <QVBoxLayout>
48 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
52 __qFontHeader.setPixelSize( 16 );
53 __qFontHeader.setBold(
true );
54 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
55 QLabel* __pqLabelIcon =
new QLabel();
56 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/vessel_point.png" ) );
57 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
58 QLabel* __pqLabelEdit =
new QLabel( tr(
"Edit")+
"..." );
59 __pqLabelEdit->setFont( __qFontHeader );
60 __pqHBoxLayoutHeader->addWidget( __pqLabelEdit, 1 );
62 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
66 QFormLayout* __pqFormLayout =
new QFormLayout();
76 QHBoxLayout* __pqHBoxLayoutPosition =
new QHBoxLayout();
99 __pqFormLayout->addRow( tr(
"Position")+
":", __pqHBoxLayoutPosition );
102 QHBoxLayout* __pqHBoxLayoutDate =
new QHBoxLayout();
116 __pqFormLayout->addRow( tr(
"Date & Time")+
":", __pqHBoxLayoutDate );
119 QHBoxLayout* __pqHBoxLayoutGroundCourse =
new QHBoxLayout();
147 __pqFormLayout->addRow( tr(
"Ground Course")+
":", __pqHBoxLayoutGroundCourse );
150 QHBoxLayout* __pqHBoxLayoutApparentCourse =
new QHBoxLayout();
178 __pqFormLayout->addRow( tr(
"Apparent Course")+
":", __pqHBoxLayoutApparentCourse );
181 QHBoxLayout* __pqHBoxLayoutTypeSymbol =
new QHBoxLayout();
190 __pqFormLayout->addRow( tr(
"Type & Symbol")+
":", __pqHBoxLayoutTypeSymbol );
220 __pqVBoxLayout->addLayout( __pqFormLayout );
223 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
224 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
225 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
226 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
229 COverlayObjectEditView::setLayout( __pqVBoxLayout );
364 __poVesselPoint->
setPosition( __fdLongitude, __fdLatitude, __fdElevation );
370 __poVesselPoint->
setTime( __fdTime );
374 __poVesselPoint->
GroundCourse.
setCourse( __fdGroundBearing, __fdGroundSpeed, __fdGroundSpeedVertical );
381 __poVesselPoint->
ApparentCourse.
setCourse( __fdApparentBearing, __fdApparentSpeed, __fdApparentSpeedVertical );
CDataCourse ApparentCourse
Apparent course.
CDataCourse GroundCourse
Ground course.
CDataCourseValidity GroundCourseValidity
Ground course validity.
CDataCourseValidity ApparentCourseValidity
Apparent course validity.
void setValiditySpeed(double _fdTimeLastSpeed, double _fdErrorSpeed, bool _bInvalidSpeed=false)
Sets the horizontal speed's validity parameters.
void setValiditySpeedVertical(double _fdTimeLastSpeedVertical, double _fdErrorSpeedVertical, bool _bInvalidSpeedVertical=false)
Sets the vertical speed's validity parameters.
void setValidityBearing(double _fdTimeLastBearing, double _fdErrorBearing, bool _bInvalidBearing=false)
Sets the bearing's validity parameters.
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.
void setCourse(double _fdBearing, double _fdSpeed, double _fdSpeedVertical=UNDEFINED_SPEED)
Sets course values.
double getBearing() const
Returns this course's bearing, in degrees.
double getSpeed() const
Returns this course's horizontal speed, in meters per second.
void setValidityElevation(double _fdTimeLastElevation, double _fdErrorElevation, bool _bInvalidElevation=false)
Sets the elevation's validity parameters.
void setValidityPosition(double _fdTimeLastPosition, double _fdErrorPosition, bool _bInvalidPosition=false)
Sets the position's validity parameters.
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 const CDataPosition UNDEFINED
Specific value for an undefined position.
static constexpr double UNDEFINED_LONGITUDE
Specific value for an undefined longitude.
void setPosition(double _fdLongitude, double _fdLatitude, double _fdElevation=UNDEFINED_ELEVATION)
Sets new coordinates.
static constexpr double UNDEFINED_ELEVATION
Specific value for an undefined elevation.
void setValidityTime(double _fdTimeLastTime, double _fdErrorTime, bool _bInvalidTime=false)
Sets the time's validity parameters.
void setTime(double _fdTime)
Sets the time, in seconds from Unix epoch.
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
void parseError(const QString &_rqsString)
Displays a generic error message for an invalid parsing operation.
[UI] Generic overlay object's edit view
const COverlayObject * poOverlayObject
Overlay object being edited.
QString getName() const
Returns this object's name.
static double fromString(const QString &_rqString, EUnit _eUnit=UNDEFINED, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
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 double fromString(const QString &_rqString, CUnitTimeZone::EUnit _eUnitTimeZone, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
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 double fromString(const QString &_rqString, EUnit _eUnit=UNDEFINED, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
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 double fromString(const QString &_rqString, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
static double fromString(const QString &_rqString, EUnit _eUnit, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
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 double fromString(const QString &_rqString, EUnit _eUnit, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
static double fromString(const QString &_rqString, double _fdDate, CUnitTimeZone::EUnit _eUnitTimeZone, bool *_pbOK=0)
Returns the numeric value corresponding (parsed) from the string.
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...
QCheckBox * pqCheckBoxValidityApparentBearing
[UI:CheckBox] Apparent bearing validity
QLineEdit * pqLineEditType
[UI:LineEdit] Type
QLineEdit * pqLineEditGroundSpeedVertical
[UI:LineEdit] Ground vertical speed
QLineEdit * pqLineEditGroundBearing
[UI:LineEdit] Ground bearing
QLineEdit * pqLineEditApparentBearing
[UI:LineEdit] Apparent bearing
QCheckBox * pqCheckBoxValidityGroundSpeed
[UI:CheckBox] Ground horizontal speed validity
QCheckBox * pqCheckBoxValidityTime
[UI:CheckBox] Time validity
QCheckBox * pqCheckBoxValidityApparentSpeed
[UI:CheckBox] Apparent horizontal speed validity
CVesselPointEditView(CVesselPoint *_poVesselPoint)
QLineEdit * pqLineEditSymbol
[UI:LineEdit] Symbol
QCheckBox * pqCheckBoxValidityPosition
[UI:CheckBox] Position validity
QCheckBox * pqCheckBoxValidityElevation
[UI:CheckBox] Elevation validity
QLineEdit * pqLineEditTime
[UI:LineEdit] Time
QCheckBox * pqCheckBoxValidityGroundSpeedVertical
[UI:CheckBox] Ground vertical speed validity
QLineEdit * pqLineEditName
[UI:LineEdit] Name
QLineEdit * pqLineEditLatitude
[UI:LineEdit] Latitude
QCheckBox * pqCheckBoxValidityApparentSpeedVertical
[UI:CheckBox] Apparent vertical speed validity
QLineEdit * pqLineEditUrl
[UI:LineEdit] URL
QCheckBox * pqCheckBoxValidityGroundBearing
[UI:CheckBox] Ground bearing validity
void constructLayout()
Constructs the layout of the user-interface.
QTextEdit * pqTextEditComment
[UI:TextEdit] Comment
QLineEdit * pqLineEditApparentSpeed
[UI:LineEdit] Apparent horizontal speed
QLineEdit * pqLineEditGroundSpeed
[UI:LineEdit] Ground horizontal speed
QSpinBox * pqSpinBoxTrackRecordRate
[UI:SpinBox] Track recroding rate
QLineEdit * pqLineEditApparentSpeedVertical
[UI:LineEdit] Apparent vertical speed
QTextEdit * pqTextEditDescription
[UI:TextEdit] Description
QLineEdit * pqLineEditElevation
[UI:LineEdit] Elevation
QLineEdit * pqLineEditDate
[UI:LineEdit] Date
QLineEdit * pqLineEditLongitude
[UI:LineEdit] Longitude
[UI] Vessel overlay point (item) / vessel
void setType(const QString &_rqsType)
Sets this vessel's type.
QString getSymbol() const
Returns this vessel's symbol.
void setDescription(const QString &_rqsDescription)
Sets this vessel's description.
QString getComment() const
Returns this vessel's comment.
QString getUrl() const
Returns this vessel's URL.
int getTrackRecordRate()
Returns this vessel's track recording rate, in seconds.
void setComment(const QString &_rqsComment)
Sets this vessel's comment.
void setUrl(const QString &_rqsUrl)
Sets this vessel's URL.
void setTrackRecordRate(int _iTrackRecordRate)
Sets this vessel's track recording rate, in seconds.
QString getDescription() const
Returns this vessel's description.
QString getType() const
Returns this vessel's type.
void setSymbol(const QString &_rqsSymbol)
Sets this vessel's symbol.
static CMainWindow * useMainWindow()
double microtime()
Returns the system time with microseconds resolution, in seconds.