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 #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 TimeSeriesPropertiesWidgetForm; }
40 
41 namespace te
42 {
43  namespace qt
44  {
45  namespace widgets
46  {
47  /*!
48  \class TimeSeriesPropertiesWidget
49 
50  \brief A widget used to adjust a time series layer's properties
51  */
53  {
54 
55  Q_OBJECT
56 
57  public:
58 
59  /*!
60  \brief Constructor
61 
62  \param dataSet The dataset that will be used to generate a TemporalLayer.
63  \param parent this widget's parent
64  \param f Window flags used to configure this widget
65  */
66  TimeSeriesPropertiesWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
67 
68  /*!
69  \brief Destructor
70  */
72 
73  /*!
74  \brief Returns the name of the property that holds the ID of each timeSeries in the dataset
75 
76  \return The name of the property that holds the ID of each timeSeries in the dataset
77 .
78  */
79  std::string getIdPropName();
80 
81  /*!
82  \brief Returns the index of the ID of each timeSeries in the dataset
83 
84  \return The index of the ID of each timeSeries in the dataset
85  \note Will return an invalid index if the dataSeType hasn't been given.
86  */
87  int getIdIndex();
88 
89  /*!
90  \brief Returns the name of the property that holds the attribute values associated to each time series in the dataset
91 
92  \return The name of the property that holds the the attribute values associated to each time series in the dataset
93 .
94  */
95  std::string getValuePropName();
96 
97  /*!
98  \brief Returns the index of the attribute values associated to each time series in the dataset
99 
100  \return The index of the attribute values associated to each time series in the dataset
101  \note Will return an invalid index if the dataSeType hasn't been given.
102  */
103  int getValueIndex();
104 
105  /*!
106  \brief Returns the name of the property that holds the geometry
107 
108  \return The name of the property that holds the geometry
109 .
110  */
111  std::string getGeometryPropName();
112 
113  /*!
114  \brief Returns the index of the temporal property geometry
115 
116  \return The index of the temporal property geometry
117  \note Will return an invalid index if the dataSeType hasn't been given.
118  */
119  int getGeometryId();
120 
121 
122 
123 
124  /*!
125  \brief Returns a pointer to the widget's form
126 
127  \return A TimeSeriesPropertiesWidgetForm type pointer to the widget's form.
128  \note The caller will not take ownership of the returned pointer.
129  */
130  Ui::TimeSeriesPropertiesWidgetForm* getForm();
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  protected slots:
140 
141  void onPropertyComboBoxIndexChanged(QString text);
142 
143  private:
144 
145  std::auto_ptr<Ui::TimeSeriesPropertiesWidgetForm> m_ui; //!< The widget's form.
146  te::da::DataSetTypePtr m_dataType; //!< The datasetType that will be used to generate the spatio-temporal layer.
147  };
148  } // end namespace widgets
149  } // end namespace qt
150 } // end namespace te
151 
152 #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