20 #include <QDialogButtonBox>
21 #include <QGridLayout>
24 #include <QVBoxLayout>
44 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
48 __qFontHeader.setPixelSize( 16 );
49 __qFontHeader.setBold(
true );
50 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
51 QLabel* __pqLabelIcon =
new QLabel();
52 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/vessel_device.png" ) );
53 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
54 QLabel* __pqLabelEdit =
new QLabel( tr(
"Edit")+
"..." );
55 __pqLabelEdit->setFont( __qFontHeader );
56 __pqHBoxLayoutHeader->addWidget( __pqLabelEdit, 1 );
58 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
62 QGridLayout* __pqGridLayout =
new QGridLayout();
67 __pqGridLayout->addWidget(
new QLabel( tr(
"Device/Source")+
":" ), __iRow, 0 );
69 poTextName->setToolTip( tr(
"Device name (matching one of the defined devices)") );
71 __pqGridLayout->addWidget(
poTextName, __iRow, 1, Qt::AlignHCenter );
73 poTextSourceName->setToolTip( tr(
"Source name/filter (exactly matching the device provided source name)") );
79 __pqGridLayout->addWidget(
new QLabel(
"<B>"+tr(
"Synchronize/Update")+
"</B>" ), __iRow, 2, Qt::AlignHCenter );
83 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Position")+
"</I>" ), __iRow, 1, Qt::AlignHCenter );
84 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Elevation")+
"</I>" ), __iRow, 2, Qt::AlignHCenter );
85 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Time")+
"</I>" ), __iRow, 3, Qt::AlignHCenter );
89 __pqGridLayout->addWidget(
new QLabel( tr(
"Position & Time")+
":" ), __iRow, 0 );
91 pqCheckBoxPosition->setToolTip( tr(
"Whether to use this device to update the vessel position (longitude/latitude)") );
95 pqCheckBoxElevation->setToolTip( tr(
"Whether to use this device to update the vessel elevation") );
99 pqCheckBoxTime->setToolTip( tr(
"Whether to use this device to update the vessel time") );
101 __pqGridLayout->addWidget(
pqCheckBoxTime, __iRow, 3, Qt::AlignHCenter );
105 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Bearing")+
"</I>" ), __iRow, 1, Qt::AlignHCenter );
106 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Speed (horizontal)")+
"</I>" ), __iRow, 2, Qt::AlignHCenter );
107 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Speed (vertical)")+
"</I>" ), __iRow, 3, Qt::AlignHCenter );
111 __pqGridLayout->addWidget(
new QLabel( tr(
"Ground Course")+
":" ), __iRow, 0 );
113 pqCheckBoxGroundBearing->setToolTip( tr(
"Whether to use this device to update the vessel ground (true) bearing") );
117 pqCheckBoxGroundSpeed->setToolTip( tr(
"Whether to use this device to update the vessel ground (true) horizontal speed") );
127 __pqGridLayout->addWidget(
new QLabel( tr(
"Apparent Course")+
":" ), __iRow, 0 );
129 pqCheckBoxApparentBearing->setToolTip( tr(
"Whether to use this device to update the vessel apparent (relative) bearing") );
133 pqCheckBoxApparentSpeed->setToolTip( tr(
"Whether to use this device to update the vessel apparent (relative) horizontal speed") );
143 __pqGridLayout->addWidget(
new QLabel(
"<I>"+tr(
"Additional Text")+
"</I>" ), __iRow, 1, Qt::AlignHCenter );
147 __pqGridLayout->addWidget(
new QLabel( tr(
"Other")+
":" ), __iRow, 0 );
149 pqCheckBoxText->setToolTip( tr(
"Whether to use this device to update the vessel additional textual information") );
151 __pqGridLayout->addWidget(
pqCheckBoxText, __iRow, 1, Qt::AlignHCenter );
154 __pqVBoxLayout->addLayout( __pqGridLayout );
157 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
158 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
159 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
160 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
163 COverlayObjectEditView::setLayout( __pqVBoxLayout );
QString getSourceName() const
Returns the source name.
[UI] Generic overlay object's edit view
const COverlayObject * poOverlayObject
Overlay object being edited.
QString getName() const
Returns this object's name.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
QCheckBox * pqCheckBoxApparentSpeedVertical
[UI:CheckBox] Synchronize apparent vertical speed
COverlayText * poTextName
[UI:Label] Name
QCheckBox * pqCheckBoxElevation
[UI:CheckBox] Synchronize elevation
QCheckBox * pqCheckBoxGroundBearing
[UI:CheckBox] Synchronize ground bearing
QCheckBox * pqCheckBoxPosition
[UI:CheckBox] Synchronize position
QCheckBox * pqCheckBoxText
[UI:CheckBox] Synchronize additional textual data string
QCheckBox * pqCheckBoxTime
[UI:CheckBox] Synchronize time
QCheckBox * pqCheckBoxGroundSpeedVertical
[UI:CheckBox] Synchronize ground vertical speed
QCheckBox * pqCheckBoxApparentBearing
[UI:CheckBox] Synchronize apparent bearing
QCheckBox * pqCheckBoxGroundSpeed
[UI:CheckBox] Synchronize ground horizontal speed
CVesselPointDeviceEditView(CVesselPointDevice *_poVesselPointDevice)
COverlayText * poTextSourceName
[UI:Label] Source name
void constructLayout()
Constructs the layout of the user-interface.
QCheckBox * pqCheckBoxApparentSpeed
[UI:CheckBox] Synchronize apparent horizontal speed
bool isSynchronizedElevation()
Returns whether this device/source is used to synchronize the vessel's elevation.
bool isSynchronizedApparentBearing()
Returns whether this device/source is used to synchronize the vessel's apparent bearing.
bool isSynchronizedGroundBearing()
Returns whether this device/source is used to synchronize the vessel's ground bearing.
bool isSynchronizedPosition()
Returns whether this device/source is used to synchronize the vessel's position.
void setSynchronized(bool _bSynchronizePosition, bool _bSynchronizeElevation, bool _bSynchronizeTime, bool _bSynchronizeGroundBearing, bool _bSynchronizeGroundSpeed, bool _bSynchronizeGroundSpeedVertical, bool _bSynchronizeApparentBearing, bool _bSynchronizeApparentSpeed, bool _bSynchronizeApparentSpeedVertical, bool _bSynchronizeText)
Sets the synchronizazion flags.
bool isSynchronizedGroundSpeed()
Returns whether this device/source is used to synchronize the vessel's ground horizontal speed.
bool isSynchronizedTime()
Returns whether this device/source is used to synchronize the vessel's time.
bool isSynchronizedApparentSpeed()
Returns whether this device/source is used to synchronize the vessel's apparent horizontal speed.
bool isSynchronizedGroundSpeedVertical()
Returns whether this device/source is used to synchronize the vessel's ground vertical speed.
bool isSynchronizedText()
Returns whether this device/source is used to synchronize the vessel's additional textual data string...
bool isSynchronizedApparentSpeedVertical()
Returns whether this device/source is used to synchronize the vessel's apparent vertical speed.