TimeSeriesPropertiesWidget.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/TimeSeriesPropertiesWidget.h
22 
23  \brief A widget used to adjust a time series layer's properties
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_TIMESERIESWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_TIMESERIESWIDGET_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 TimeSeriesPropertiesWidgetForm; }
42 
43 namespace te
44 {
45  namespace qt
46  {
47  namespace widgets
48  {
49  /*!
50  \class TimeSeriesPropertiesWidget
51 
52  \brief A widget used to adjust a time series layer's properties
53  */
55  {
56 
57  Q_OBJECT
58 
59  public:
60 
61  /*!
62  \brief Constructor
63 
64  \param dataSet The dataset that will be used to generate a TemporalLayer.
65  \param parent this widget's parent
66  \param f Window flags used to configure this widget
67  */
68  TimeSeriesPropertiesWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
69 
70  /*!
71  \brief Destructor
72  */
74 
75  /*!
76  \brief Returns the name of the property that holds the ID of each timeSeries in the dataset
77 
78  \return The name of the property that holds the ID of each timeSeries in the dataset
79 .
80  */
81  std::string getIdPropName();
82 
83  /*!
84  \brief Returns the index of the ID of each timeSeries in the dataset
85 
86  \return The index of the ID of each timeSeries in the dataset
87  \note Will return an invalid index if the dataSeType hasn't been given.
88  */
89  int getIdIndex();
90 
91  /*!
92  \brief Returns the name of the property that holds the attribute values associated to each time series in the dataset
93 
94  \return The name of the property that holds the the attribute values associated to each time series in the dataset
95 .
96  */
97  std::string getValuePropName();
98 
99  /*!
100  \brief Returns the index of the attribute values associated to each time series in the dataset
101 
102  \return The index of the attribute values associated to each time series in the dataset
103  \note Will return an invalid index if the dataSeType hasn't been given.
104  */
105  int getValueIndex();
106 
107  /*!
108  \brief Returns the name of the property that holds the geometry
109 
110  \return The name of the property that holds the geometry
111 .
112  */
113  std::string getGeometryPropName();
114 
115  /*!
116  \brief Returns the index of the temporal property geometry
117 
118  \return The index of the temporal property geometry
119  \note Will return an invalid index if the dataSeType hasn't been given.
120  */
121  int getGeometryId();
122 
123 
124 
125 
126  /*!
127  \brief Returns a pointer to the widget's form
128 
129  \return A TimeSeriesPropertiesWidgetForm type pointer to the widget's form.
130  \note The caller will not take ownership of the returned pointer.
131  */
132  Ui::TimeSeriesPropertiesWidgetForm* getForm();
133 
134  /*!
135  \brief Adjusts the widget's components based on the given datasettype
136 
137  \param dataType The datasetType that will be used to configure the widget.
138  */
139  void setUp(const te::da::DataSetTypePtr dataType);
140 
141  protected slots:
142 
143  void onPropertyComboBoxIndexChanged(QString text);
144 
145  private:
146 
147  std::auto_ptr<Ui::TimeSeriesPropertiesWidgetForm> m_ui; //!< The widget's form.
148  te::da::DataSetTypePtr m_dataType; //!< The datasetType that will be used to generate the spatio-temporal layer.
149  };
150  } // end namespace widgets
151  } // end namespace qt
152 } // end namespace te
153 
154 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_TIMESERIESWIDGET_H
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
A widget used to adjust a time series layer's properties.
URI C++ Library.
std::auto_ptr< Ui::TimeSeriesPropertiesWidgetForm > m_ui
The widget's form.
te::da::DataSetTypePtr m_dataType
The datasetType that will be used to generate the spatio-temporal layer.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63