CheckGeomValidityDialog.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/vp/qt/CheckGeomValidityDialog.h
22 
23 \brief A dialog used to check geometries validity.
24 */
25 
26 #ifndef __TERRALIB_VP_INTERNAL_CHECKGEOMVALIDITYDIALOG_H
27 #define __TERRALIB_VP_INTERNAL_CHECKGEOMVALIDITYDIALOG_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../dataaccess/dataset/ObjectIdSet.h"
32 #include "../../maptools/AbstractLayer.h"
33 #endif
34 
35 #include "../Config.h"
36 #include "../../qt/widgets/canvas/MapDisplay.h"
37 
38 // Qt
39 #include <QDialog>
40 #include <QTableWidgetItem>
41 
42 namespace Ui { class CheckGeomValidityDialogForm; }
43 
44 namespace te
45 {
46  namespace gm
47  {
48  struct Coord2D;
49  }
50 
51  namespace vp
52  {
53  /*!
54  \class CheckGeomValidityDialog
55 
56  \brief A dialog used to check geometries validity.
57  */
58  class TEVPEXPORT CheckGeomValidityDialog : public QDialog
59  {
60  Q_OBJECT
61 
62  public:
63 
64  CheckGeomValidityDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
65 
66  /*! \brief Destructor. */
68 
69  void setLayers(std::list<te::map::AbstractLayerPtr> layers, te::map::AbstractLayerPtr selectedLayer = 0);
70 
71  void setMapDisplay(te::qt::widgets::MapDisplay* md);
72 
73  private:
74 
75  void drawMark();
76 
77  protected slots:
78 
79  void onVerifyPushButtonClicked();
80 
81  void onFixPushButtonClicked();
82 
83  void onTableWidgetItemDoubleClicked(QTableWidgetItem* item);
84 
85  void onExtentChanged();
86 
87  void onDisplayPaintEvent(QPainter* painter);
88 
89  private:
90 
91  std::unique_ptr<Ui::CheckGeomValidityDialogForm> m_ui;
92 
94 
96 
97  std::unique_ptr<te::gm::Point> m_currentCoord;
98 
99  std::unique_ptr<te::da::ObjectIdSet> m_oidSet;
100 
101  std::unique_ptr<QPixmap> m_markPixmap;
102 
104 
105  };
106  } // end namespace vp
107 } // end namespace te
108 
109 #endif // __TERRALIB_VP_INTERNAL_CHECKGEOMVALIDITYDIALOG_H
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61
#define slots
std::unique_ptr< te::gm::Point > m_currentCoord
A widget to control the display of a set of layers.
Definition: MapDisplay.h:71
te::qt::widgets::MapDisplay * m_mapDisplay
std::unique_ptr< Ui::CheckGeomValidityDialogForm > m_ui
A dialog used to check geometries validity.
URI C++ Library.
te::map::AbstractLayerPtr m_currentLayer
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
std::unique_ptr< te::da::ObjectIdSet > m_oidSet
std::unique_ptr< QPixmap > m_markPixmap