20 #include <QDialogButtonBox>
21 #include <QFormLayout>
22 #include <QHBoxLayout>
25 #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/device.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();
69 __pqFormLayout->addRow( tr(
"Name")+
":", __poTextName );
72 pqLineEditHost->setToolTip( tr(
"GPS daemon host (hostname or IP address)") );
82 pqLineEditSource->setToolTip( tr(
"GPS daemon source (device pathname) filter (exact match)") );
86 __pqVBoxLayout->addLayout( __pqFormLayout );
89 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
90 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
91 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
92 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
95 COverlayObjectEditView::setLayout( __pqVBoxLayout );
112 if( !__bOK || __iPort <= 0 || __iPort > 65535 )
123 __poDeviceGpsdGps->
setPort( __iPort );
QLineEdit * pqLineEditPort
[UI:LineEdit] Port
QLineEdit * pqLineEditSource
[UI:LineEdit] Source
CDeviceGpsdGpsEditView(CDeviceGpsdGps *_poDeviceGpsdGps)
void constructLayout()
Constructs the layout of the user-interface.
QLineEdit * pqLineEditHost
[UI:LineEdit] Host
GPSD daemon (GPS mode) navigation device.
void setHost(const QString &_rqsHost)
QVCT::EStatus setOperatingMode(CDevice::EOperatingMode _eOperatingMode)
Sets the device's operating mode.
void setSource(const QString &_rqsSource)
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 CMainWindow * useMainWindow()