![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtBackEndSelectionList.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00011 00013 00014 #pragma once 00015 00016 #include <vrvCoreQt/DtToolbar.h> 00017 #include <vrvCoreQt/DtWidgetBuilder.h> 00018 00019 #include <vrfGuiCoreQt/vrfGuiCoreQt.h> 00020 #include <vrfGuiCoreQt/DtBackEndSelectionListInterface.h> 00021 00022 #include <QtGui/QWidget> 00023 00024 class QComboBox; 00025 class QTreeWidget; 00026 class QVBoxLayout; 00027 class QHBoxLayout; 00028 class QLabel; 00029 00030 namespace makVrv 00031 { 00032 class DtDe; 00033 } 00034 00035 namespace makVrf 00036 { 00037 class DtBackEndSelectionListLogic; 00038 00042 class DT_DLL_VRFGUICOREQT DtBackEndSelectionListToolbar : public makVrv::DtToolbar 00043 { 00044 public: 00045 00047 DtBackEndSelectionListToolbar(makVrv::DtDe&); 00048 00050 virtual ~DtBackEndSelectionListToolbar(); 00051 00053 virtual QToolBar* createToolbar(makVrv::DtDe&, QWidget* parent); 00054 00055 }; 00056 00058 class DT_DLL_VRFGUICOREQT DtBackEndSelectionList 00059 : public QWidget 00060 , public DtBackEndSelectionListInterface 00061 { 00062 Q_OBJECT 00063 00064 public: 00066 DtBackEndSelectionList( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0); 00067 00069 virtual ~DtBackEndSelectionList(); 00070 00071 protected: 00073 void setupUi(QWidget* p); 00074 00075 protected: 00076 virtual void addBackend(const std::string& backend, const DtBackend&); 00077 virtual void removeBackend(const std::string& backend); 00078 00079 virtual std::string statusFor(const std::string& backend); 00080 virtual void setStatusFor(const std::string& backend, const std::string& status); 00081 00082 protected slots: 00083 virtual void onItemSelectionChanged(); 00084 00085 protected: 00086 makVrv::DtDe& myDe; 00087 DtBackEndSelectionListLogic* myLogic; 00088 00089 public: 00090 QVBoxLayout* myMainLayout; 00091 QTreeWidget* myBackEnds; 00092 }; 00093 00095 class DT_DLL_VRFGUICOREQT DtBackEndSelectionCombo 00096 : public QWidget 00097 , public DtBackEndSelectionListInterface 00098 { 00099 Q_OBJECT 00100 00101 public: 00103 DtBackEndSelectionCombo( makVrv::DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0); 00104 00106 virtual ~DtBackEndSelectionCombo(); 00107 00108 protected: 00110 void setupUi(QWidget* p); 00111 00112 protected: 00113 virtual void addBackend(const std::string& backend, const DtBackend&); 00114 virtual void removeBackend(const std::string& backend); 00115 00116 virtual std::string statusFor(const std::string& backend); 00117 virtual void setStatusFor(const std::string& backend, const std::string& status); 00118 00119 protected slots: 00120 virtual void onItemSelectionChanged(); 00121 00122 protected: 00123 makVrv::DtDe& myDe; 00124 DtBackEndSelectionListLogic* myLogic; 00125 00126 public: 00127 QHBoxLayout* myMainLayout; 00128 QLabel* myLabel; 00129 QComboBox* myBackEnds; 00130 }; 00131 00132 class DT_DLL_VRFGUICOREQT DtBackEndSelectionListBuilder : public makVrv::DtWidgetBuilder 00133 { 00134 00135 public: 00136 00137 DtBackEndSelectionListBuilder(); 00138 00139 virtual ~DtBackEndSelectionListBuilder(); 00140 00141 virtual QWidget* create( makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags); 00142 }; 00143 } 00144