20 #include <QDialogButtonBox>
21 #include <QFormLayout>
22 #include <QHBoxLayout>
26 #include <QVBoxLayout>
47 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
51 __qFontHeader.setPixelSize( 16 );
52 __qFontHeader.setBold(
true );
53 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
54 QLabel* __pqLabelIcon =
new QLabel();
55 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/route_point.png" ) );
56 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
57 QLabel* __pqLabelEdit =
new QLabel( tr(
"Edit")+
"..." );
58 __pqLabelEdit->setFont( __qFontHeader );
59 __pqHBoxLayoutHeader->addWidget( __pqLabelEdit, 1 );
61 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
65 QFormLayout* __pqFormLayout =
new QFormLayout();
75 QHBoxLayout* __pqHBoxLayoutPosition =
new QHBoxLayout();
88 __pqFormLayout->addRow( tr(
"Position")+
":", __pqHBoxLayoutPosition );
91 QHBoxLayout* __pqHBoxLayoutTypeSymbol =
new QHBoxLayout();
100 __pqFormLayout->addRow( tr(
"Type & Symbol")+
":", __pqHBoxLayoutTypeSymbol );
123 __pqVBoxLayout->addLayout( __pqFormLayout );
126 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
127 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
128 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
129 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
132 COverlayObjectEditView::setLayout( __pqVBoxLayout );
179 __poRoutePoint->
setPosition( __fdLongitude, __fdLatitude, __fdElevation );
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 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.
void constructLayout()
Constructs the layout of the user-interface.
QLineEdit * pqLineEditLatitude
[UI:LineEdit] Latitude
QLineEdit * pqLineEditType
[UI:LineEdit] Type
QLineEdit * pqLineEditSymbol
[UI:LineEdit] Symbol
QLineEdit * pqLineEditLongitude
[UI:LineEdit] Longitude
QLineEdit * pqLineEditUrl
[UI:LineEdit] URL
QTextEdit * pqTextEditComment
[UI:TextEdit] Comment
QTextEdit * pqTextEditDescription
[UI:TextEdit] Description
QLineEdit * pqLineEditElevation
[UI:LineEdit] Elevation
CRoutePointEditView(CRoutePoint *_poRoutePoint)
QLineEdit * pqLineEditName
[UI:LineEdit] Name
[UI] Route overlay point (item) / waypoint
void setSymbol(const QString &_rqsSymbol)
Sets this waypoint's symbol.
void setUrl(const QString &_rqsUrl)
Sets this waypoint's URL.
void setType(const QString &_rqsType)
Sets this waypoint's type.
QString getComment() const
Returns this waypoint's comment.
void setDescription(const QString &_rqsDescription)
Sets this waypoint's description.
QString getDescription() const
Returns this waypoint's description.
void setComment(const QString &_rqsComment)
Sets this waypoint's comment.
QString getType() const
Returns this waypoint's type.
QString getUrl() const
Returns this waypoint's URL.
QString getSymbol() const
Returns this waypoint's symbol.
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 CMainWindow * useMainWindow()