InfoDockWidget.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/qt/widgets/tools/InfoDockWidget.h
22 
23  \brief A dock widget used control the geographic data style using SE elements and a property browser to show its properties.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_INFODOCKWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_INFODOCKWIDGET_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
32 #endif
34 
35 // STL
36 #include <list>
37 
38 // Qt
39 #include <QDockWidget>
40 #include <QCursor>
41 
42 class QTabWidget;
43 class QComboBox;
44 class QTreeWidget;
45 class QCloseEvent;
46 
47 namespace te
48 {
49  namespace map
50  {
51  class AbstractLayer;
52  }
53 
54  namespace qt
55  {
56  namespace widgets
57  {
58  // Forward declarations
59  class Info;
60  class MapDisplay;
61 
62  /*!
63  \class InfoDockWidget
64 
65  \brief A dock widget used control the geographic data style using SE elements and a property browser to show its properties.
66  */
67  class TEQTWIDGETSEXPORT InfoDockWidget : public QDockWidget, public InterfaceController
68  {
69  Q_OBJECT
70 
71  public:
72 
73  /** @name Initializer Methods
74  * Methods related to instantiation and destruction.
75  */
76  //@{
77 
78  /*! \brief Constructs a InfoDockWidget. */
79  InfoDockWidget(QWidget* parent = 0, Qt::WindowFlags flags = 0);
80 
81  /*! \brief Destructor. */
82  virtual ~InfoDockWidget();
83 
84  /*!
85  \brief This method is used to set current layer
86 
87  */
88  virtual void layerSelected(te::map::AbstractLayerPtr layer) override;
89 
90  /*!
91  \brief This method is used to add a new layer
92 
93  */
94  virtual void layerAdded(te::map::AbstractLayerPtr layer) override;
95 
96  /*!
97  \brief This method is used to remove a layer
98 
99  */
100  virtual void layerRemoved(te::map::AbstractLayerPtr layer) override;
101 
102  QTreeWidget* getInfoTree();
103 
104  QComboBox* getModeCombo();
105 
106  protected:
107 
108  void updateUi();
109 
110  void buildUi();
111 
112  void buildTree();
113 
114  virtual void closeEvent(QCloseEvent* event);
115 
116  protected slots:
117 
119 
120  private:
121 
122  QComboBox* m_cmbMode;
123  QTreeWidget* m_infoTreeWidget; //!< Widget used to show the informations.
124  };
125 
126  } // end namespace widgets
127  } // end namespace qt
128 } // end namespace te
129 
130 #endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_INFODOCKWIDGET_H
A dock widget used control the geographic data style using SE elements and a property browser to show...
InfoDockWidget(QWidget *parent=0, Qt::WindowFlags flags=0)
Constructs a InfoDockWidget.
virtual void layerRemoved(te::map::AbstractLayerPtr layer) override
This method is used to remove a layer.
QTreeWidget * m_infoTreeWidget
Widget used to show the informations.
virtual void layerAdded(te::map::AbstractLayerPtr layer) override
This method is used to add a new layer.
virtual void layerSelected(te::map::AbstractLayerPtr layer) override
This method is used to set current layer.
virtual ~InfoDockWidget()
Destructor.
virtual void closeEvent(QCloseEvent *event)
A virtual class for non modal interfaces.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
Configuration flags for the TerraLib Qt Widgets.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
A virtual class for non modal interfaces.