21 #include <QDialogButtonBox>
22 #include <QFormLayout>
23 #include <QHBoxLayout>
26 #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/device.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();
70 __pqFormLayout->addRow( tr(
"Name")+
":", __poTextName );
73 pqLineEditHost->setToolTip( tr(
"SBS-1 service host (hostname or IP address)") );
83 pqComboBoxTimeZone->setToolTip( tr(
"Whether this SBS-1 service uses UTC or local date/time data") );
89 pqCheckBoxCallsignLookup->setToolTip( tr(
"Whether to perform aircrafts callsign lookup (based on previous ad-hoc SBS-1 messages)\nor display the aircrafts hexadecimal identifier") );
98 __pqVBoxLayout->addLayout( __pqFormLayout );
101 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
102 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
103 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
104 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
107 COverlayObjectEditView::setLayout( __pqVBoxLayout );
124 if( !__bOK || __iPort <= 0 || __iPort > 65535 )
135 __poDeviceTcpSbs1->
setPort( __iPort );
QLineEdit * pqLineEditPort
[UI:LineEdit] Port
void constructLayout()
Constructs the layout of the user-interface.
QLineEdit * pqLineEditHost
[UI:LineEdit] Host
QCheckBox * pqCheckBoxGroundTraffic
[UI:CheckBox] Ground traffic
CDeviceTcpSbs1EditView(CDeviceTcpSbs1 *_poDeviceTcpSbs1)
QComboBox * pqComboBoxTimeZone
[UI:ComboBox] Time zone
QCheckBox * pqCheckBoxCallsignLookup
[UI:CheckBox] Callsign lookup
SBS-1 protocol (TCP socket) navigation device.
void setGroundTraffic(bool _bGroundTraffic)
void setHost(const QString &_rqsHost)
CUnitTimeZone::EUnit getTimeZone()
void setTimeZone(CUnitTimeZone::EUnit _eTimeZone)
QVCT::EStatus setOperatingMode(CDevice::EOperatingMode _eOperatingMode)
Sets the device's operating mode.
void setCallsignLookup(bool _bCallsignLookup)
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.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
static EUnit fromSymbol(const QString &_rqsSymbol)
Returns the format/unit ID corresponding to the given human-readable symbol.
static QString toSymbol(EUnit _eUnit)
Returns the human-readable symbol corresponding to the given format/unit ID.
static const QMap< EUnit, QString > & symbols()
Returns the list of supported human-readable format/unit symbols.
static CMainWindow * useMainWindow()