SliderPropertiesDialog.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/slider/SliderPropertiesWidget.h
22 
23  \brief A widget used to alow the user to control the visualization of temporal data
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_INTERNAL_SLIDERPROPERTIESDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_INTERNAL_SLIDERPROPERTIESDIALOG_H
28 
29 //TerraLib
30 #include "../Config.h"
31 #include "TrajectoryItem.h"
32 
33 // Qt
34 #include <QDialog>
35 
36 //STL
37 #include <memory>
38 #include <vector>
39 
40 namespace Ui { class SliderPropertiesDialogForm; }
41 
42 namespace te
43 {
44  namespace dt { class TimePeriod; }
45 
46  namespace qt
47  {
48  namespace widgets
49  {
50 
51  class TimeSliderWidget;
52 
53  /*!
54  \class SliderPropertiesDialog
55 
56  \brief A dialog used to configure the behaviour of the SliderSliderWidget.
57  */
59  {
60  Q_OBJECT
61 
62  friend class TimeSliderWidget;
63 
64  public:
65 
66  /*!
67  \brief Constructor
68 
69  It constructs a Slider Slider Dialog
70  */
71  SliderPropertiesDialog(QWidget* parent, Qt::WindowFlags f = 0);
72 
73  /*!
74  \brief Destructor
75 
76  It destructs a Slider Slider Dialog
77  */
79 
80  /*!
81  \brief It initialize a property animation dialog
82  */
83  void populateUi();
84 
85  /*!
86  \brief It returns a boolean that indicates if animation is going forward or backward
87 
88  \return A boolean that indicates if animation is going forward or backward
89  */
90  bool isForwardChecked();
91 
92  /*!
93  \brief It returns a boolean that indicates if the time slider animation
94  is supposed to be displayed looping or not.
95 
96  \return A boolean that indicates if the animation is supposed to be displayed on a loop.
97  */
98  bool isLoopChecked();
99 
100  /*!
101  \brief It returns a boolean that indicates if the time slider animation
102  is to reverse it's direction on ce a loop is finished.
103 
104  \return A boolean that indicates if the animation is supposed to have it's direction reversed.
105  */
106  bool isGoBackChecked();
107 
108  /*!
109  \brief It gets the initial time as QDateTime.
110 
111  \return The initial time.
112  */
113  QDateTime getInitialQDate();
114 
115  /*!
116  \brief It gets the final time as QDateTime.
117 
118  \return The final time.
119  */
120  QDateTime getFinalQDate();
121 
122  /*!
123  \brief It gets the initial time.
124 
125  \return The initial time.
126  */
127  te::dt::TimeInstant getInitialTime();
128 
129  /*!
130  \brief It gets the final time.
131 
132  \return The final time.
133  */
134  te::dt::TimeInstant getFinalTime();
135 
136  protected slots:
137 
138  //void onOkPushButtonClicked();
139  void onHelpPushButtonClicked();
140 
141  /*!
142  \brief AutoPan radio button clicked.
143 
144  \param b True if the button is checked, or false if the button is unchecked
145  */
146  //void onAutoPanCheckBoxClicked(bool b);
147 
148  /*!
149  \brief Draw track radio button clicked.
150 
151  \param b True if the button is checked, or false if the button is unchecked
152  */
153  void onDrawTrackCheckBoxClicked(bool b);
154 
155  /*!
156  \brief It takes the necessary steps after changing the duration.
157  \param v Value of opacity (0 - 255).
158  */
159  //void onOpacityValueChanged(int v);
160 
161  /*!
162  \brief Trajectory color combo box activated.
163 
164  \param i The index of combo box.
165  */
166  //void onTrajectoryColorComboBoxActivated(int i);
167 
168  /*!
169  \brief Opacity combo box activated.
170 
171  \param i The index of combo box.
172  */
173  //void onOpacityComboBoxActivated(int i);
174 
175  /*!
176  \brief Reset initial time button clicked.
177  */
178  //void onResetInitialTimePushButtonClicked();
179 
180 
181  /*!
182  \brief Reset final time button clicked.
183  */
184  //void onResetFinalTimePushButtonClicked();
185 
186  private:
187 
188  std::auto_ptr<Ui::SliderPropertiesDialogForm> m_ui; //!< The widget form.
189  TimeSliderWidget* m_tsw; //!< The Timer Slider Widget pointer
190  //te::dt::TimePeriod m_temporalExtent; //!< The temporal extent.
191  //QList<QGraphicsItem*> m_trajectories; //!< The trajectory items
192  };
193  } // end namespace widgets
194  } // end namespace qt
195 } // end namespace te
196 
197 #endif // __TERRALIB_QT_WIDGETS_INTERNAL_SLIDERPROPERTIESDIALOG_H
std::auto_ptr< Ui::SliderPropertiesDialogForm > m_ui
It takes the necessary steps after changing the duration.
TimeSliderWidget * m_tsw
The Timer Slider Widget pointer.
A class to represent time instant.
Definition: TimeInstant.h:55
URI C++ Library.
This file defines a class for a Trajectory Item.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
A dialog used to configure the behaviour of the SliderSliderWidget.
A wdiget used to control the visualization of temporal data.