ProfileDialog.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/sa/qt/BayesGlobalDialog.h
22 
23  \brief A dialog to calculate the global empirical bayes of a dataset.
24 */
25 
26 #ifndef __TERRALIB_MNT_INTERNAL_PROFILEDIALOG_H
27 #define __TERRALIB_MNT_INTERNAL_PROFILEDIALOG_H
28 
29 // TerraLib
30 #include "../../color/RGBAColor.h"
31 #ifndef Q_MOC_RUN
32 #include "../../dataaccess/datasource/DataSourceInfo.h"
33 #include "../../maptools/AbstractLayer.h"
34 #endif
35 #include "../core/Config.h"
36 #include "../core/Enums.h"
37 
38 #include "../../qt/af/BaseApplication.h"
39 
40 #include "ProfileTools.h"
41 
42 // Qt
43 #include <QDialog>
44 
45 namespace Ui { class ProfileDialogForm; }
46 
47 // Forward declarations
48 
49 namespace te
50 {
51  namespace mnt
52  {
53  enum ToolType
54  {
60  };
61 
62 // Forward declarations
63 
64  class TEMNTEXPORT ProfileDialog : public QDialog
65  {
66  Q_OBJECT
67 
68  public:
69 
70  ProfileDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
71 
72  ~ProfileDialog();
73 
74  te::map::AbstractLayerPtr getLayer();
75 
76  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
77 
78  void setDefaultInterface();
79 
80  void release();
81 
82  Q_SIGNALS:
83  void geometriesEdited();
84 
85  protected slots:
86 
87  void onInputLayerToolButtonClicked();
88  void onInputComboBoxChanged(int index);
89 
90  void oneditionEnabled(bool);
91  void onselectionEnabled(bool);
92 
93  void onVectorInputComboBoxChanged(int index);
94 
95  void onaddPointMouseToggled(bool checked);
96  void onchangePointToggled(bool checked);
97  void onaddPointToggled(bool checked);
98  void ondeletePointToggled(bool checked);
99  void ondeletePathToggled(bool checked);
100  void oninvertToggled(bool checked);
101 
102  void onToolDeleted();
103 
104  void onGeometriesChanged();
105 
106  void onDrawTrajectories(const QMap<QString, QString>&);
107 
108  void onOkPushButtonClicked();
109 
110  void DrawSelected(const std::vector<te::gm::LineString*> visadas, int width = 1, bool vertex = true, bool draw = true); // Draws trajectories
111 
112  bool setVertexEdition(); //sets parameters to edition of vertexes
113 
114  void testGeometries(); //test if geometries is valid
115 
116  private:
117 
118  std::auto_ptr<Ui::ProfileDialogForm> m_ui;
119 
121  float m_tol;
122 
125 
128 
129  std::list<te::map::AbstractLayerPtr> m_layers;
130  mntType m_inputType; //!< Input type (TIN, GRID)
131  int m_srid;
132  double m_dummy;
133  std::auto_ptr<te::da::DataSetType> m_dsType;
135 
136  std::vector<te::gm::LineString*> m_visadas;
137  std::vector<te::color::RGBAColor> m_color;
138  bool m_vertex; //draw vertexes of editing line
139  };
140  } // end namespace mnt
141 } // end namespace te
142 
143 #endif // __TERRALIB_MNT_INTERNAL_PROFILEDIALOG_H
te::qt::af::BaseApplication * m_app
std::list< te::map::AbstractLayerPtr > m_layers
This file defines the profile trajectory edition tools.
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::qt::widgets::AbstractTool * m_tool
This class defines an interface for objects that can receive application events and respond to them...
Definition: AbstractTool.h:62
te::map::AbstractLayerPtr m_outputLayer
std::vector< te::gm::LineString * > m_visadas
mntType
Definition: Enums.h:78
URI C++ Library.
std::auto_ptr< te::da::DataSetType > m_dsType
std::auto_ptr< Ui::ProfileDialogForm > m_ui
te::map::AbstractLayerPtr m_inputLayer
std::vector< te::color::RGBAColor > m_color
mntType m_inputType
Input type (TIN, GRID)
te::map::AbstractLayerPtr m_trajectoryLayer
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr