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