20 #include <QDialogButtonBox>
21 #include <QFormLayout>
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 QFormLayout* __pqFormLayout =
new QFormLayout();
65 poTextName->setToolTip( tr(
"Device name (matching one of the defined devices)") );
67 __pqFormLayout->addRow( tr(
"Name")+
":",
poTextName );
71 pqSpinBoxTTL->setToolTip( tr(
"Vessels Time-To-Live (after which vessels are automatically deleted if no corresponding data are received), in seconds [s]") );
75 __pqVBoxLayout->addLayout( __pqFormLayout );
78 QDialogButtonBox* __pqDialogButtonBox =
new QDialogButtonBox( QDialogButtonBox::Cancel|QDialogButtonBox::Save, Qt::Horizontal );
79 QDialog::connect( __pqDialogButtonBox, SIGNAL(accepted()),
this, SLOT(
accept()) );
80 QDialog::connect( __pqDialogButtonBox, SIGNAL(rejected()),
this, SLOT(reject()) );
81 __pqVBoxLayout->addWidget( __pqDialogButtonBox );
84 COverlayObjectEditView::setLayout( __pqVBoxLayout );
[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& )
void constructLayout()
Constructs the layout of the user-interface.
COverlayText * poTextName
[UI:Label] Name
CVesselContainerDeviceEditView(CVesselContainerDevice *_poVesselContainerDevice)
QSpinBox * pqSpinBoxTTL
[UI:SpinBox] (Vessels) Time-to-live
int getTTL() const
Returns the (vessels) time-to-live.
void setTTL(int _iTTL)
Sets the (vessels) time-to-live (seconds)