20 #include <QHBoxLayout>
22 #include <QPushButton>
23 #include <QScrollArea>
24 #include <QStackedWidget>
25 #include <QVBoxLayout>
41 , bIgnoreUpdate( true )
84 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
88 __qFontHeader.setPixelSize( 16 );
89 __qFontHeader.setBold(
true );
90 QHBoxLayout* __pqHBoxLayoutHeader =
new QHBoxLayout();
91 QLabel* __pqLabelIcon =
new QLabel();
92 __pqLabelIcon->setPixmap( QPixmap(
":icons/32x32/device.png" ) );
93 __pqLabelIcon->setToolTip( tr(
"Device") );
94 __pqHBoxLayoutHeader->addWidget( __pqLabelIcon, 0, Qt::AlignTop );
99 __pqHBoxLayoutHeader->addWidget(
poTextName, 1 );
100 __pqVBoxLayout->addLayout( __pqHBoxLayoutHeader );
104 QTabWidget* __poTabWidget =
new QTabWidget();
105 __poTabWidget->setTabPosition( QTabWidget::South );
106 __poTabWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum );
109 QWidget* __poWidgetSummary =
new QWidget();
110 QVBoxLayout* __pqVBoxLayoutSummary =
new QVBoxLayout();
111 __qFontData.setPixelSize( 20 );
125 __poWidgetSummary->setLayout( __pqVBoxLayoutSummary );
126 __poTabWidget->addTab( __poWidgetSummary, tr(
"Summary") );
129 __pqVBoxLayout->addWidget( __poTabWidget, 1 );
132 QFrame* __pqFrameSeparator =
new QFrame();
133 __pqFrameSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken );
134 __pqVBoxLayout->addWidget( __pqFrameSeparator );
137 QHBoxLayout* __pqHBoxLayoutButtons =
new QHBoxLayout();
143 __pqVBoxLayout->addLayout( __pqHBoxLayoutButtons );
146 COverlayObjectDetailView::setLayout( __pqVBoxLayout );
222 static double __fdTimestampLast = 0;
224 if( __fdTimestampNow - __fdTimestampLast < 0.1 )
return;
226 __fdTimestampLast = __fdTimestampNow;
240 __pqMutexDataChange->lock();
243 __poDeviceOverlay->removeChild( __poDevice );
245 QTreeWidgetItem* __pqTreeWidgetItem = __poDeviceOverlay->currentItem();
246 if( __pqTreeWidgetItem ) __poDeviceOverlay->
showDetail( __pqTreeWidgetItem );
247 __pqMutexDataChange->unlock();
bool bIgnoreUpdate
Flag that disables checkable buttons update.
void slotPause()
[UI:Slot] Slot to pause the device
void slotEdit()
[UI:Slot] Slot to edit the device configuration
void slotActivity()
[Slot] Slot to handle activity signal emitted by device
QPushButton * pqPushButtonStart
[UI:Button] Start
void slotOperatingMode(CDevice::EOperatingMode _eOperatingMode)
[Slot] Slot to handle operating mode changes
virtual void resetContent()
Resets (clears) the content of the underlying widget.
CDeviceDetailView(QWidget *_pqParent=0)
virtual void enableContent()
Enables the content (controls) of the underlying widget.
QPushButton * pqPushButtonDelete
[UI:Button] Delete
void slotStart()
[UI:Slot] Start to start the device
QPushButton * pqPushButtonEdit
[UI:Button] Edit
virtual void disableContent()
Disables the content (controls) of the underlying widget.
QLabel * pqLabelActivity
[UI:Label] Activity
void slotDelete()
[UI:Slot] Slot to delete the device
void constructLayout()
Constructs the layout of the user-interface.
QPushButton * pqPushButtonPause
[UI:Button] Pause
void slotStop()
[UI:Slot] Slot to stop the device
COverlayText * poTextName
[UI:Label] Name
virtual void refreshContent()
Refreshes the content of the underlying widget.
QPushButton * pqPushButtonStop
[UI:Button] Stop
COverlayText * poTextDriver
[UI:Label] Driver
static QString toName(EDriver _eDriver)
Returns the human-readable name corresponding to the given device driver ID.
[UI] Device overlay container
virtual void showDetail(const QTreeWidgetItem *_pqTreeWidgetItem) const
Displays the given overlay object's details (in the appropriate widget/view)
Generic navigation device (GPS, speedometer, compass, etc.)
virtual CDeviceDriver::EDriver getDriver() const =0
Returns the device's driver ID.
EOperatingMode
Device operating mode (stop, start, pause)
virtual EOperatingMode getOperatingMode()
Returns the device's operating mode.
[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.
static CDeviceOverlay * useDeviceOverlay()
static QMutex * useMutexDataChange()
static CMainWindow * useMainWindow()
double microtime()
Returns the system time with microseconds resolution, in seconds.