ObservationPropertiesWidget.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/st/ObservationPropertiesWidget.h
22 
23  \brief A widget used to adjust a Observation layer's properties
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_OBSERVATIONPROPERTIESWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_OBSERVATIONPROPERTIESWIDGET_H
28 
29 //TerraLib
30 #include "../../../dataaccess/dataset/DataSetType.h"
31 #include "../Config.h"
32 
33 // Qt
34 #include <QWidget>
35 
36 //STL
37 #include <memory>
38 
39 namespace Ui { class ObservationPropertiesWidgetForm; }
40 
41 namespace te
42 {
43  namespace qt
44  {
45  namespace widgets
46  {
47 
48  class DoubleListWidget;
49 
50  /*!
51  \class ObservationPropertiesWidget
52 
53  \brief A widget used to adjust a Observation layer's properties
54  */
56  {
57 
58  Q_OBJECT
59 
60  public:
61 
62  /*!
63  \brief Constructor
64 
65  \param dataSetType The datasetType that will be used to generate a ObservationLayer.
66  \param parent this widget's parent
67  \param f Window flags used to configure this widget
68  */
69  ObservationPropertiesWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
71  /*!
72  \brief Destructor
73  */
75 
76  /*!
77  \brief Returns a pointer to the widget's form
78 
79  \return A ObservationPropertiesWidgetForm type pointer to the widget's form.
80  \note The caller will not take ownership of the returned pointer.
81  */
82  Ui::ObservationPropertiesWidgetForm* getForm();
83 
84  /*!
85  \brief Returns a vector containing the indexes of the observed properties
86 
87  \return A vector containing the indexes of the observed properties.
88  */
89  std::vector<int> getOutputValues();
90 
91  /*!
92  \brief Returns a vector containing the names of the observed properties
93 
94  \return A vector containing the names of the observed properties.
95  */
96  std::vector<std::string> getOutputPropNames();
97 
98  /*!
99  \brief Returns the name of the property that holds the geometry
100 
101  \return The name of the property that holds the geometry
102 .
103  */
104  std::string getGeometryPropName();
105 
106  /*!
107  \brief Returns the index of the temporal property geometry
108 
109  \return The index of the temporal property geometry
110  \note Will return an invalid index if the dataSeType hasn't been given.
111  */
112  int getGeometryId();
113 
114  /*!
115  \brief Returns the name of the property that holds the observation ID
116 
117  \return The name of the property that holds the observation ID
118 .
119  */
120  std::string getIdPropName();
121 
122  /*!
123  \brief Returns the index of the observation ID
124 
125  \return The index of the observation ID
126  \note Will return an invalid index if the dataSeType hasn't been given.
127  */
128  int getIdIndex();
129 
130  /*!
131  \brief Adjusts the widget's components based on the given datasettype
132 
133  \param dataType The datasetType that will be used to configure the widget.
134  */
135  void setUp(const te::da::DataSetTypePtr dataType);
136 
137  private:
138 
139  std::auto_ptr<DoubleListWidget> m_obsWidget; //!< The widget used to select the observed properties.
140  std::auto_ptr<Ui::ObservationPropertiesWidgetForm> m_ui; //!< The widget's form.
141  te::da::DataSetTypePtr m_dataType; //!< The datasetType that will be used to generate the spatio-temporal layer.
142  };
143  } // end namespace widgets
144  } // end namespace qt
145 } // end namespace te
146 
147 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_OBSERVATIONPROPERTIESWIDGET_H
A widget used to adjust a Observation layer's properties.
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
std::auto_ptr< Ui::ObservationPropertiesWidgetForm > m_ui
The widget's form.
te::da::DataSetTypePtr m_dataType
The datasetType that will be used to generate the spatio-temporal layer.
URI C++ Library.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
std::auto_ptr< DoubleListWidget > m_obsWidget
The widget used to select the observed properties.