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  {
57  ToolNone
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 
71 
73 
74  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
75 
77 
78  void release();
79 
80  Q_SIGNALS:
82 
83  protected slots:
84 
86  void onInputComboBoxChanged(int index);
87 
88  void oneditionEnabled(bool);
89  void onselectionEnabled(bool);
90 
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 
101 
103 
104  void onDrawTrajectories(const QMap<QString, QString>&);
105 
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
te::mnt::ProfileDialog::m_inputType
mntType m_inputType
Input type (TIN, GRID)
Definition: ProfileDialog.h:128
te::qt::widgets::AbstractTool
This class defines an interface for objects that can receive application events and respond to them,...
Definition: AbstractTool.h:64
te::mnt::ProfileDialog::ondeletePointToggled
void ondeletePointToggled(bool checked)
te::mnt::ProfileDialog::m_srid
int m_srid
Definition: ProfileDialog.h:129
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::mnt::InvertLine
@ InvertLine
Definition: ProfileDialog.h:56
te::mnt::ProfileDialog::m_tooltype
ToolType m_tooltype
Definition: ProfileDialog.h:118
te::mnt::DeleteLine
@ DeleteLine
Definition: ProfileDialog.h:55
te::mnt::ProfileDialog::m_tol
float m_tol
Definition: ProfileDialog.h:119
te::mnt::ProfileDialog::geometriesEdited
void geometriesEdited()
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition: AbstractLayer.h:626
te::mnt::ProfileDialog::m_viewed
std::vector< te::gm::LineString * > m_viewed
Definition: ProfileDialog.h:134
te::qt::af::BaseApplication
Definition: BaseApplication.h:86
te::mnt::ProfileDialog::m_tool
te::qt::widgets::AbstractTool * m_tool
Definition: ProfileDialog.h:121
te::mnt::mntType
mntType
Definition: Enums.h:79
te::mnt::ProfileDialog::~ProfileDialog
~ProfileDialog()
te::mnt::CreateLine
@ CreateLine
Definition: ProfileDialog.h:53
te::mnt::ProfileDialog::onInputLayerToolButtonClicked
void onInputLayerToolButtonClicked()
te::mnt::ProfileDialog::onchangePointToggled
void onchangePointToggled(bool checked)
te::mnt::ProfileDialog::getLayer
te::map::AbstractLayerPtr getLayer()
te::mnt::ProfileDialog::onaddPointMouseToggled
void onaddPointMouseToggled(bool checked)
te::mnt::ProfileDialog::setVertexEdition
bool setVertexEdition()
te::mnt::ProfileDialog::onDrawTrajectories
void onDrawTrajectories(const QMap< QString, QString > &)
te::mnt::ToolType
ToolType
Definition: ProfileDialog.h:52
te::mnt::ProfileDialog::ondeletePathToggled
void ondeletePathToggled(bool checked)
te::mnt::ProfileDialog
Definition: ProfileDialog.h:63
te::mnt::EditVertex
@ EditVertex
Definition: ProfileDialog.h:54
te::mnt::ProfileDialog::m_outputLayer
te::map::AbstractLayerPtr m_outputLayer
Definition: ProfileDialog.h:124
Ui
Definition: ConfigInputAddressDialog.h:44
te::mnt::ProfileDialog::onToolDeleted
void onToolDeleted()
te::mnt::ProfileDialog::DrawSelected
void DrawSelected(const std::vector< te::gm::LineString * > visadas, int width=1, bool vertex=true, bool draw=true)
te::mnt::ProfileDialog::oneditionEnabled
void oneditionEnabled(bool)
te::mnt::ProfileDialog::m_dummy
double m_dummy
Definition: ProfileDialog.h:130
te::mnt::ProfileDialog::m_inputLayer
te::map::AbstractLayerPtr m_inputLayer
Definition: ProfileDialog.h:125
slots
#define slots
Definition: VirtualMachine.h:48
ProfileTools.h
This file defines the profile trajectory edition tools.
te::mnt::ProfileDialog::m_ui
std::unique_ptr< Ui::ProfileDialogForm > m_ui
Definition: ProfileDialog.h:116
te::mnt::ProfileDialog::setDefaultInterface
void setDefaultInterface()
te::mnt::ToolNone
@ ToolNone
Definition: ProfileDialog.h:57
te::mnt::ProfileDialog::testGeometries
void testGeometries()
te::mnt::ProfileDialog::onGeometriesChanged
void onGeometriesChanged()
te::mnt::ProfileDialog::m_color
std::vector< te::color::RGBAColor > m_color
Definition: ProfileDialog.h:135
te::mnt::ProfileDialog::setLayers
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
te::mnt::ProfileDialog::onInputComboBoxChanged
void onInputComboBoxChanged(int index)
te::mnt::ProfileDialog::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
Definition: ProfileDialog.h:127
te::mnt::ProfileDialog::onselectionEnabled
void onselectionEnabled(bool)
te::mnt::ProfileDialog::onaddPointToggled
void onaddPointToggled(bool checked)
te::mnt::ProfileDialog::oninvertToggled
void oninvertToggled(bool checked)
te::mnt::ProfileDialog::onVectorInputComboBoxChanged
void onVectorInputComboBoxChanged(int index)
te::mnt::ProfileDialog::m_vertex
bool m_vertex
Definition: ProfileDialog.h:136
te::mnt::ProfileDialog::ProfileDialog
ProfileDialog(QWidget *parent=0, Qt::WindowFlags f=0)
te::mnt::ProfileDialog::onOkPushButtonClicked
void onOkPushButtonClicked()
te::mnt::ProfileDialog::m_app
te::qt::af::BaseApplication * m_app
Definition: ProfileDialog.h:122
TEMNTEXPORT
#define TEMNTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:41
te::mnt::ProfileDialog::m_trajectoryLayer
te::map::AbstractLayerPtr m_trajectoryLayer
Definition: ProfileDialog.h:132
te::mnt::ProfileDialog::release
void release()
te::mnt::ProfileDialog::m_dsType
std::unique_ptr< te::da::DataSetType > m_dsType
Definition: ProfileDialog.h:131