![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2011 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 00008 00010 00011 #pragma once 00012 00013 #include <vrfGuiCoreQt/vrfGuiCoreQt.h> 00014 #include <vrfGuiCoreQt/environmentControlAreaInterface.h> 00015 00016 #include <vrvCoreQt/DtToolbar.h> 00017 #include <vrvCoreQt/DtWidgetBuilder.h> 00018 00019 #include <QtGui/QWidget> 00020 00021 class QHBoxLayout; 00022 class QLabel; 00023 class QToolButton; 00024 00025 namespace makVrv 00026 { 00027 class DtDe; 00028 } 00029 00030 namespace makVrf 00031 { 00032 class DtVrfBackendState; 00033 00034 class DT_DLL_VRFGUICOREQT DtToDImageWidget : public QWidget 00035 { 00036 00037 Q_OBJECT 00038 00039 public: 00040 00042 DtToDImageWidget(QWidget* parent=0); 00043 00045 virtual ~DtToDImageWidget(); 00046 00048 virtual void setPixmap(QPixmap p); 00049 00051 virtual void mouseReleaseEvent( QMouseEvent* event ); 00052 00054 virtual void paintEvent(QPaintEvent *); 00055 00061 virtual void createDisabledPixmap(const char* filename); 00062 00063 signals: 00064 00066 void clicked(); 00067 00068 protected: 00069 00070 QPixmap myToDPixmap; 00073 QPixmap myDisabledPixmap; 00074 00075 }; 00076 00077 class DtEnvironmentControlAreaLogic; 00078 00081 class DT_DLL_VRFGUICOREQT DtEnvironmentControlAreaToolbar : public makVrv::DtToolbar 00082 { 00083 public: 00084 00086 DtEnvironmentControlAreaToolbar(makVrv::DtDe&); 00087 00089 virtual ~DtEnvironmentControlAreaToolbar(); 00090 00092 virtual QToolBar* createToolbar(makVrv::DtDe&, QWidget* parent); 00093 00094 }; 00095 00097 class DT_DLL_VRFGUICOREQT DtEnvironmentControlAreaWidget : public QWidget, public DtEnvironmentControlAreaInterface 00098 { 00099 Q_OBJECT 00100 00101 public: 00103 DtEnvironmentControlAreaWidget( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0); 00104 00106 virtual ~DtEnvironmentControlAreaWidget(); 00107 00112 void updateEnabledStatus(); 00113 00114 protected: 00115 00117 void setupUi(QWidget* p); 00118 00120 virtual void setTimeOfDay(int hours, int mins, int secs); 00121 00124 virtual bool eventFilter(QObject* obj, QEvent * event); 00125 00127 virtual void slot_backendUpdated(const DtVrfBackendState&, int); 00128 00129 protected slots: 00130 00132 virtual void slot_onToDImageClicked(); 00133 00134 protected: 00135 makVrv::DtDe& myDe; 00136 DtEnvironmentControlAreaLogic* myLogic; 00137 QHBoxLayout* myMainLayout; 00138 QLabel* myToDLabel; 00139 DtToDImageWidget* myToDImageWidget; 00140 00141 }; 00142 00143 class DT_DLL_VRFGUICOREQT DtEnvironmentControlAreaWidgetBuilder : public makVrv::DtWidgetBuilder 00144 { 00145 00146 public: 00147 00148 DtEnvironmentControlAreaWidgetBuilder(); 00149 00150 virtual ~DtEnvironmentControlAreaWidgetBuilder(); 00151 00152 virtual QWidget* create( makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags); 00153 }; 00154 } 00155