TrajectoryPropertiesWidget.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/TrajectoryPropertiesWidget.h
22 
23  \brief A widget used to adjust a Trajectory layer's properties
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_TRAJECTORYPROPERTIESWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_TRAJECTORYPROPERTIESWIDGET_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 TrajectoryPropertiesWidgetForm; }
42 
43 namespace te
44 {
45  namespace qt
46  {
47  namespace widgets
48  {
49  /*!
50  \class TrajectoryPropertiesWidget
51 
52  \brief A widget used to adjust a Trajectory layer's properties
53  */
55  {
56 
57  Q_OBJECT
58 
59  public:
60 
61  /*!
62  \brief Constructor
63 
64  \param dataSetType The datasetType that will be used to generate a TrajectoryLayer.
65  \param parent this widget's parent
66  \param f Window flags used to configure this widget
67  */
68  TrajectoryPropertiesWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
69 
70  /*!
71  \brief Destructor
72  */
74 
75  /*!
76  \brief Returns a pointer to the widget's form
77 
78  \return A TrajectoryPropertiesWidgetForm type pointer to the widget's form.
79  \note The caller will not take ownership of the returned pointer.
80  */
81  Ui::TrajectoryPropertiesWidgetForm* getForm();
82 
83  /*!
84  \brief Returns the index of the temporal property id
85 
86  \return The temporal property id
87  \note Will return an invalid index if the dataSeType hasn't been given.
88  */
89  int getId();
90 
91  /*!
92  \brief Returns the name of the property that holds the temporal property geometry
93 
94  \return The name of the property that holds the temporal property geometry
95  */
96  std::string getGeometryId();
97 
98  /*!
99  \brief Adjusts the widget's components based on the given datasettype
100 
101  \param dataType The datasetType that will be used to configure the widget.
102  */
103  void setUp(const te::da::DataSetTypePtr dataType);
104 
105  protected slots:
106 
107  void onPropertyComboBoxIndexChanged(QString text);
108 
109  private:
110 
111  std::auto_ptr<Ui::TrajectoryPropertiesWidgetForm> m_ui; //!< The widget's form.
112  te::da::DataSetTypePtr m_dataType; //!< The datasetType that will be used to generate the spatio-temporal layer.
113  };
114  } // end namespace widgets
115  } // end namespace qt
116 } // end namespace te
117 
118 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_TRAJECTORYPROPERTIESWIDGET_H
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.
URI C++ Library.
A widget used to adjust a Trajectory layer's properties.
#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< Ui::TrajectoryPropertiesWidgetForm > m_ui
The widget's form.