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 #include "../core/Enums.h"
35 #include "../../qt/af/BaseApplication.h"
36 #include "ProfileTools.h"
37 #endif
38 #include "../core/Config.h"
39 
40 // Qt
41 #include <QDialog>
42 
43 namespace Ui { class ProfileDialogForm; }
44 
45 // Forward declarations
46 
47 namespace te
48 {
49  namespace mnt
50  {
51  enum ToolType
52  {
58  };
59 
60 // Forward declarations
61 
62  class TEMNTEXPORT ProfileDialog : public QDialog
63  {
64  Q_OBJECT
65 
66  public:
67 
68  ProfileDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
69 
70  ~ProfileDialog();
71 
72  te::map::AbstractLayerPtr getLayer();
73 
74  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
75 
76  void setDefaultInterface();
77 
78  void release();
79 
80  Q_SIGNALS:
81  void geometriesEdited();
82 
83  protected slots:
84 
85  void onInputLayerToolButtonClicked();
86  void onInputComboBoxChanged(int index);
87 
88  void oneditionEnabled(bool);
89  void onselectionEnabled(bool);
90 
91  void onVectorInputComboBoxChanged(int index);
92 
93  void onaddPointMouseToggled(bool checked);
94  void onchangePointToggled(bool checked);
95  void onaddPointToggled(bool checked);
96  void ondeletePointToggled(bool checked);
97  void ondeletePathToggled(bool checked);
98  void oninvertToggled(bool checked);
99 
100  void onToolDeleted();
101 
102  void onGeometriesChanged();
103 
104  void onDrawTrajectories(const QMap<QString, QString>&);
105 
106  void onOkPushButtonClicked();
107 
108  void DrawSelected(const std::vector<te::gm::LineString*> visadas, int width = 1, bool vertex = true, bool draw = true); // Draws trajectories
109 
110  bool setVertexEdition(); //sets parameters to edition of vertexes
111 
112  void testGeometries(); //test if geometries is valid
113 
114  private:
115 
116  std::unique_ptr<Ui::ProfileDialogForm> m_ui;
117 
119  float m_tol;
120 
123 
126 
127  std::list<te::map::AbstractLayerPtr> m_layers;
128  mntType m_inputType; //!< Input type (TIN, GRID)
129  int m_srid;
130  double m_dummy;
131  std::unique_ptr<te::da::DataSetType> m_dsType;
133 
134  std::vector<te::gm::LineString*> m_viewed;
135  std::vector<te::color::RGBAColor> m_color;
136  bool m_vertex; //draw vertexes of editing line
137  };
138  } // end namespace mnt
139 } // end namespace te
140 
141 #endif // __TERRALIB_MNT_INTERNAL_PROFILEDIALOG_H
#define slots
te::qt::af::BaseApplication * m_app
std::list< te::map::AbstractLayerPtr > m_layers
This file defines the profile trajectory edition tools.
std::vector< te::gm::LineString * > m_viewed
#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:63
te::map::AbstractLayerPtr m_outputLayer
std::unique_ptr< Ui::ProfileDialogForm > m_ui
mntType
Definition: Enums.h:78
TerraLib.
te::map::AbstractLayerPtr m_inputLayer
std::unique_ptr< te::da::DataSetType > m_dsType
std::vector< te::color::RGBAColor > m_color
mntType m_inputType
Input type (TIN, GRID)
te::map::AbstractLayerPtr m_trajectoryLayer
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr