![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2008 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtTerrainContentsWidget.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtTerrainContentsWidget_H_ 00014 #define DtTerrainContentsWidget_H_ 00015 00016 #include <vrvCoreQt/vrvCoreQt.h> 00017 #include <vrvCoreQt/DtTerrainContentsInterface.h> 00018 00019 #include <QtGui/QWidget> 00020 00021 class QTreeWidget; 00022 class QTreeWidgetItem; 00023 class QHBoxLayout; 00024 class QPushButton; 00025 00026 namespace makVrv 00027 { 00028 class DtDe; 00029 class DtTerrainOperationRecord; 00030 00033 class DT_DLL_VRVCOREQT DtTerrainContentsWidget 00034 : public QWidget 00035 , public DtTerrainContentsInterface 00036 { 00037 00038 Q_OBJECT 00039 00040 public: 00041 00043 typedef std::map<int, QTreeWidgetItem*> ItemMap; 00044 00046 DtTerrainContentsWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0); 00047 00049 virtual ~DtTerrainContentsWidget(); 00050 00052 virtual void addItem(int id, QStringList strList); 00053 00055 virtual void removeItem(int id); 00056 00058 virtual void clear(); 00059 00060 inline QHBoxLayout* buttonLayout() { return myButtonLayout; } 00061 00063 inline QPushButton* addTerrainPatchButton() { return myAddTerrainPatchButton; } 00064 00066 inline QPushButton* addFeatureLayerButton() { return myAddFeatureLayerButton; } 00067 00068 inline DtDe& de() { return myDe; } 00069 00070 public: 00071 00072 static boost::signal<void (DtTerrainContentsWidget*)> signal_setupGui; 00073 00074 protected slots: 00075 00076 virtual void on_addTerrainPatchBtn_clicked(); 00077 virtual void on_addFeatureLayerBtn_clicked(); 00078 virtual void on_addPropsBtn_clicked(); 00079 virtual void on_removeBtn_clicked(); 00080 00081 protected: 00082 00084 void setupGui(); 00085 00086 protected: 00087 00088 const static int theInputTypeColumn = 0; 00089 const static int theNameColumn = 1; 00090 00091 DtDe& myDe; 00092 ItemMap myItemMap; 00093 QTreeWidget* myContentsTreeWidget; 00094 00095 QHBoxLayout* myButtonLayout; 00096 00098 QPushButton* myAddTerrainPatchButton; 00099 00101 QPushButton* myAddFeatureLayerButton; 00102 }; 00103 } 00104 00105 #endif 00106