20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
42 , bIgnoreUpdate( true )
71 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
75 __qFontHeader.setPixelSize( 16 );
76 __qFontHeader.setBold(
true );
77 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
78 QLabel* __pqLabelIcon =
new QLabel();
79 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/vessel_device.png" ) );
80 __pqLabelIcon->setToolTip( tr(
"Device") );
81 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
86 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
87 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
91 QTabWidget* __poTabWidget =
new QTabWidget();
92 __poTabWidget->setTabPosition( QTabWidget::South );
95 QWidget* __poWidgetText =
new QWidget();
96 QVBoxLayout* __pqVBoxLayoutText =
new QVBoxLayout();
97 __qFontData.setPixelSize( 12 );
98 QLabel* __pqLabel =
new QLabel();
99 __pqLabel->setToolTip( tr(
"Dynamic Flotilla Device") );
100 __pqLabel->setFont( __qFontData );
101 __pqLabel->setIndent( 10 );
102 __pqLabel->setWordWrap(
true );
103 __pqLabel->setText( tr(
"This device is used to dynamically create vessels as they appear \"on the wire\"") );
104 __pqVBoxLayoutText->addWidget( __pqLabel );
105 __poWidgetText->setLayout( __pqVBoxLayoutText );
106 __poTabWidget->addTab( __poWidgetText, tr(
"Device") );
109 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
112 QFrame* __pqFrameSeparator =
new QFrame();
113 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
114 __pqVBoxLayout->addWidget( __pqFrameSeparator );
117 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
121 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
124 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
143 pqPushButtonConnect->setIcon( QIcon( __bConnected ?
":icons/32x32/device_connect.png" :
":icons/32x32/device_disconnect.png" ) );
198 __pqMutexDataChange->lock();
202 QTreeWidgetItem* __pqTreeWidgetItem = __poVesselOverlay->currentItem();
203 if( __pqTreeWidgetItem ) __poVesselOverlay->
showDetail( __pqTreeWidgetItem );
206 __pqMutexDataChange->unlock();
void updateChart()
Update the (current) chart content (on screen)
[UI] Generic overlay object's detail view
COverlayObject * poOverlayObject
Overlay object being displayed.
QString getName() const
Returns this object's name.
[UI] Overlay-specific text label
void setText(const QString &_rqsText)
[override] QLabel::setText( const QString& )
void resetText()
Resets (clears) the underlying QLabel's text.
void forceRedraw()
Forces this overlay's rendering (not matter its cache content)
void slotRefreshContent()
[UI:Slot] Slot to refresh the view content
virtual void resetContent()
Resets (clears) the content of the underlying widget.
QPushButton * pqPushButtonConnect
[UI:Button] Connect (device)
bool bIgnoreUpdate
Flag that disables checkable buttons update.
QPushButton * pqPushButtonEdit
[UI:Button] Edit
void slotEdit()
[UI:Slot] Slot to display edit view
virtual void disableContent()
Disables the content (controls) of the underlying widget.
void slotDelete()
[UI:Slot] Slot to delete (this container/container)
virtual void enableContent()
Enables the content (controls) of the underlying widget.
virtual void refreshContent()
Refreshes the content of the underlying widget.
void constructLayout()
Constructs the layout of the user-interface.
COverlayText * poTextName
[UI:Label] Name
QPushButton * pqPushButtonDelete
[UI:Button] Delete
CVesselContainerDeviceDetailView(QWidget *_pqParent=0)
void slotConnect(bool)
[UI:Slot] Slot to connect (to the actual device)
int getTTL() const
Returns the (vessels) time-to-live.
bool connectDevice()
Connects to the actual device.
bool isDeviceConnected() const
Returns whether the actual device is connected.
void disconnectDevice()
Dicconnects from the actual device.
[UI] Vessel overlay container / flotilla
void clearDevice()
Clears the device set to dynamically generate this flotilla.
[UI] Vessel overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
static CVesselOverlay * useVesselOverlay()
static QMutex * useMutexDataChange()
static CMainWindow * useMainWindow()
static CChartTable * useChartTable()