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 #ifndef Q_MOC_RUN
31 #include "../../../common/UnitOfMeasure.h"
32 #include "../../../dataaccess/datasource/DataSourceInfo.h"
33 #include "../../../maptools/AbstractLayer.h"
34 #endif
35 
36 // STL
37 #include <memory>
38 
39 // Qt
40 #include <QDialog>
41 
42 namespace Ui { class CreateCellularSpaceDialogForm; }
43 
44 namespace te
45 {
46  namespace gm { class Envelope; }
47 
48  namespace qt
49  {
50  namespace plugins
51  {
52  namespace cellspace
53  {
54  /*!
55  \class CreateCellularSpaceDialog
56 
57  \brief ....
58  */
59  class CreateCellularSpaceDialog : public QDialog
60  {
61  Q_OBJECT
62 
63  public:
64 
65  CreateCellularSpaceDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
66 
68 
69  void setLayers(std::list<te::map::AbstractLayerPtr> layers);
70 
72 
73 
74  protected slots:
75 
76 
77  void onLayersComboBoxChanged(int index);
78 
79  void onEnvelopeChanged(const QString & text);
80 
82 
83 
84  void onUnitComboBoxChanged(int index);
85 
87 
89 
90 
92 
94 
96 
97 
98  private:
99 
100 
101  void initUnitsOfMeasure();
102 
103 
105 
107 
108 
110 
112 
114 
115  void showEnvelope(const te::gm::Envelope& env, int precision);
116 
117  void clearEnvelope();
118 
119  double getResX();
120 
121  double getResY();
122 
123  bool unitConvertion(double& res,
126 
127  void clearResolution();
128 
129 
130  void showSRS();
131 
132  bool checkList(std::string& errors);
133 
134  bool convertAngleToPlanar(double& val, te::common::UnitOfMeasurePtr planar);
135 
136  bool convertPlanarToAngle(double& val, te::common::UnitOfMeasurePtr planar);
137 
138  private:
139 
140  int m_bbSRID;
141  bool m_isFile;
143  std::string m_outputDataSetName;
144 
145  std::auto_ptr<Ui::CreateCellularSpaceDialogForm> m_ui;
146 
147  };
148  } // end namespace cellspace
149  } // end namespace plugins
150  } // end namespace qt
151 } // end namespace te
152 
153 #endif // __TERRALIB_QT_PLUGINS_CELLSPACE_INTERNAL_CREATECELLULARSPACEDIALOG_H
154 
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
URI C++ Library.
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)