GeometriesUpdateTool.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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
22 
23  \brief
24 */
25 
26 #ifndef __TERRALIB_EDIT_QT_INTERNAL_GEOMETRIESUPDATETOOL_H
27 #define __TERRALIB_EDIT_QT_INTERNAL_GEOMETRIESUPDATETOOL_H
28 
29 #include "../Config.h"
30 #ifndef Q_MOC_RUN
31 #include "../../../qt/widgets/tools/AbstractTool.h"
32 #endif
33 
34 namespace te
35 {
36  namespace gm
37  {
38  class Geometry;
39  }
40 
41  namespace map
42  {
43  class AbstractLayer;
44  }
45 
46  namespace qt
47  {
48  namespace widgets
49  {
50  class MapDisplay;
51  }
52  }
53 
54  namespace edit
55  {
56  class Feature;
57 
59  {
60  Q_OBJECT
61 
62  public:
63 
64  GeometriesUpdateTool(te::qt::widgets::MapDisplay* display, te::map::AbstractLayer* layer, QObject* parent = 0);
65 
66  virtual ~GeometriesUpdateTool();
67 
68  void setLayer(te::map::AbstractLayer* layer);
69 
70  bool isInUse() const;
71 
72  void setInUse(const bool& status);
73 
74  virtual void resetVisualizationTool();
75 
76  virtual void storeUndoCommand();
77 
78  std::string getLayerId();
79 
80  Q_SIGNALS:
81 
82  void geometriesEdited();
83 
84  void toolDeleted();
85 
86  void endSelectCell(const std::string&, const std::size_t&, std::size_t&);
87 
88  private slots:
89 
90  void onUndoFeedback();
91 
92  protected:
93 
94  virtual void saveGeometry(te::gm::Geometry* gm, const int& op);
95 
96  virtual void storeFeature();
97 
98  bool m_isInUse;
99 
102 
103  };
104  }
105 }
106 
107 
108 #endif //__TERRALIB_EDIT_QT_INTERNAL_GEOMETRIESUPDATETOOL_H
#define TEEDITQTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
This is the base class for layers.
Definition: AbstractLayer.h:76
A widget to control the display of a set of layers.
Definition: MapDisplay.h:69
This class defines an interface for objects that can receive application events and respond to them...
Definition: AbstractTool.h:62
URI C++ Library.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:74
te::map::AbstractLayer * m_layer