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