VR-Forces 4.1.1 Class Documentation
DtTerrainContentsWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtTerrainContentsWidget.h,v $ $Revision: 1.10 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtTerrainContentsWidget_H_
14 #define DtTerrainContentsWidget_H_
15 
16 #include <vrvCoreQt/vrvCoreQt.h>
19 
20 #include <QtGui/QWidget>
21 
22 class QTreeWidget;
23 class QTreeWidgetItem;
24 class QHBoxLayout;
25 class QVBoxLayout;
26 class QPushButton;
27 
28 namespace makVrv
29 {
30  class DtDe;
31  class DtTerrainOperationRecord;
32 
36  : public QWidget
38  {
39 
40  Q_OBJECT
41 
42  public:
43 
45  typedef std::map<int, QTreeWidgetItem*> ItemMap;
46 
48  virtual ~DtTerrainContentsWidget();
49 
51  virtual void addItem(int id, LayerType layerType, const DtUnicode& name, bool visualized );
52 
54  virtual void removeItem(int id);
55 
57  virtual void clear();
58 
59  inline QHBoxLayout* buttonLayout() { return myButtonLayout; }
60 
61  inline QVBoxLayout* mainLayout() { return myMainLayout; }
62 
64  inline QPushButton* addTerrainPatchButton() { return myAddTerrainPatchButton; }
65 
67  inline QPushButton* addFeatureLayerButton() { return myAddFeatureLayerButton; }
68 
69  inline DtDe& de() { return myDe; }
70 
71  inline QTreeWidget* contentsTreeWidget() { return myContentsTreeWidget; }
72 
73  public:
74 
75  static boost::signal<void (DtTerrainContentsWidget*)> signal_setupGui;
76 
77  protected slots:
78 
79  virtual void on_addTerrainPatchBtn_clicked();
80  virtual void on_addFeatureLayerBtn_clicked();
81  virtual void on_addPropsBtn_clicked();
82  virtual void on_removeBtn_clicked();
83 
84  protected:
85 
88 
90  DtTerrainContentsWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
91 
93  void setupGui();
94 
95  protected:
96 
97  const static int theInputTypeColumn = 0;
98  const static int theNameColumn = 1;
99  const static int theStatusColumn = 2;
100 
104 
105  QHBoxLayout* myButtonLayout;
106 
107  QVBoxLayout* myMainLayout;
108 
111 
114  };
115 
119  {
120 
121  public:
123  static DtTerrainContentsWidgetCreator& instance(DtDe& de);
124 
126  static void registerInstance(DtDe& de,DtTerrainContentsWidgetCreator* anInstance);
127 
129  virtual DtTerrainContentsWidget* create(DtDe& de, QWidget * parent = NULL,
130  const Qt::WindowFlags& flags = 0);
131  };
132 }
133 
134 #endif
135 

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)