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 #include "../../../qt/widgets/tools/AbstractTool.h"
31 
32 // Qt
33 #include <QMouseEvent>
34 
35 namespace te
36 {
37  namespace gm
38  {
39  class Geometry;
40  }
41 
42  namespace map
43  {
44  class AbstractLayer;
45  }
46 
47  namespace qt
48  {
49  namespace widgets
50  {
51  class MapDisplay;
52  }
53  }
54 
55  namespace edit
56  {
57  class Feature;
58 
60  {
61  Q_OBJECT
62 
63  public:
64 
65  GeometriesUpdateTool(te::qt::widgets::MapDisplay* display, te::map::AbstractLayer* layer, QObject* parent = 0);
66 
67  virtual ~GeometriesUpdateTool();
68 
69  void setLayer(te::map::AbstractLayer* layer);
70 
71  bool isInUse() const;
72 
73  void setInUse(const bool& status);
74 
75  virtual void resetVisualizationTool();
76 
77  std::string getLayerId();
78 
79  void disableMouseEvent(QMouseEvent::Type mEvent);
80 
81  protected:
82 
83  void setCursor(const QCursor& cursor);
84 
85  Q_SIGNALS:
86 
87  void geometriesStarted();
88 
89  void geometriesEdited();
90 
91  void toolDeleted();
92 
93  private:
94 
95  bool eventFilter(QObject* watched, QEvent* e);
96 
97  protected:
98 
99  bool m_isInUse;
100  QMouseEvent::Type m_mEvent;
101 
104 
105  };
106  }
107 }
108 
109 
110 #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:77
A widget to control the display of a set of layers.
Definition: MapDisplay.h:71
This class defines an interface for objects that can receive application events and respond to them...
Definition: AbstractTool.h:63
URI C++ Library.
This class controls how a set of layers are displayed.
Definition: MapDisplay.h:45
te::map::AbstractLayer * m_layer