All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CreateCellularSpaceDialog.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/connector/ado/ADOConnectorDialog.h
22 
23  \brief ....
24 */
25 
26 #ifndef __TERRALIB_QT_PLUGINS_CELLSPACE_INTERNAL_CREATECELLULARSPACEDIALOG_H
27 #define __TERRALIB_QT_PLUGINS_CELLSPACE_INTERNAL_CREATECELLULARSPACEDIALOG_H
28 
29 // TerraLib
30 #include "../../../common/UnitOfMeasure.h"
31 #include "../../../dataaccess/datasource/DataSourceInfo.h"
32 #include "../../../maptools/AbstractLayer.h"
33 
34 // STL
35 #include <memory>
36 
37 // Qt
38 #include <QDialog>
39 
40 namespace Ui { class CreateCellularSpaceDialogForm; }
41 
42 namespace te
43 {
44  namespace gm { class Envelope; }
45 
46  namespace qt
47  {
48  namespace plugins
49  {
50  namespace cellspace
51  {
52  /*!
53  \class CreateCellularSpaceDialog
54 
55  \brief ....
56  */
57  class CreateCellularSpaceDialog : public QDialog
58  {
59  Q_OBJECT
60 
61  public:
62 
63  CreateCellularSpaceDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
64 
66 
67  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
68 
70 
71 
72  protected slots:
73 
74 
75  void onLayersComboBoxChanged(int index);
76 
77  void onEnvelopeChanged(const QString & text);
78 
80 
81 
82  void onUnitComboBoxChanged(int index);
83 
85 
87 
88 
90 
92 
94 
95 
96  private:
97 
98 
99  void initUnitsOfMeasure();
100 
101 
103 
105 
106 
108 
110 
112 
113  void showEnvelope(const te::gm::Envelope& env, int precision);
114 
115  void clearEnvelope();
116 
117  double getResX();
118 
119  double getResY();
120 
121  bool unitConvertion(double& res,
124 
125  void clearResolution();
126 
127 
128  void showSRS();
129 
130  bool checkList(std::string& errors);
131 
132  bool convertAngleToPlanar(double& val, te::common::UnitOfMeasurePtr planar);
133 
134  bool convertPlanarToAngle(double& val, te::common::UnitOfMeasurePtr planar);
135 
136  private:
137 
138  int m_bbSRID;
139  bool m_isFile;
141  std::string m_outputDataSetName;
142 
143  std::auto_ptr<Ui::CreateCellularSpaceDialogForm> m_ui;
144 
145  };
146  } // end namespace cellspace
147  } // end namespace plugins
148  } // end namespace qt
149 } // end namespace te
150 
151 #endif // __TERRALIB_QT_PLUGINS_CELLSPACE_INTERNAL_CREATECELLULARSPACEDIALOG_H
152 
void setResolutionUnit(te::common::UnitOfMeasurePtr unit)
bool convertPlanarToAngle(double &val, te::common::UnitOfMeasurePtr planar)
bool unitConvertion(double &res, te::common::UnitOfMeasurePtr from, te::common::UnitOfMeasurePtr to)
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
void showEnvelope(const te::gm::Envelope &env, int precision)
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::common::UnitOfMeasurePtr getResolutionUnit()
std::auto_ptr< Ui::CreateCellularSpaceDialogForm > m_ui
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
bool convertAngleToPlanar(double &val, te::common::UnitOfMeasurePtr planar)
CreateCellularSpaceDialog(QWidget *parent=0, Qt::WindowFlags f=0)