Loading...
Searching...
No Matches
AggregateAreaTool.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/edit/qt/tools/AggregateAreaTool.cpp
22
23 \brief This class implements a concrete tool to aggregate polygons.
24*/
25
26#ifndef __TERRALIB_EDIT_QT_INTERNAL_AGGREGATEAREATOOL_H
27#define __TERRALIB_EDIT_QT_INTERNAL_AGGREGATEAREATOOL_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../maptools/AbstractLayer.h"
32#include "../core/command/AddCommand.h"
33#include "../core/UndoStackManager.h"
34#include "CreateLineTool.h"
35#endif
36#include "../Config.h"
37
38// Qt
39#include <QPointF>
40
41//STL
42#include <set>
43
44namespace te
45{
46 namespace qt
47 {
48 namespace widgets
49 {
50 class Canvas;
51 class MapDisplay;
52 }
53 }
54
55 namespace gm
56 {
57 class Geometry;
58 }
59
60 namespace edit
61 {
62
64 {
65 Q_OBJECT
66
67 public:
68 AggregateAreaTool(te::qt::widgets::MapDisplay* display, const te::map::AbstractLayerPtr& layer, QObject* parent = 0);
69
71
72 //@}
73
74 /** @name AbstractTool Methods
75 * Methods related with tool behavior.
76 */
77 //@{
78
79 bool mousePressEvent(QMouseEvent* e);
80
81 bool mouseMoveEvent(QMouseEvent* e);
82
83 bool mouseDoubleClickEvent(QMouseEvent* e);
84
85 bool mouseReleaseEvent(QMouseEvent* e);
86
87 //@}
88
89 private:
90
92
94
95 void draw();
96
98
100
101 void pickFeature(const QPointF& pos);
102
103 te::gm::Envelope buildEnvelope(const QPointF& pos);
104
106
107 void clear();
108
109 protected:
110
112
113 };
114
115 } // end namespace edit
116} // end namespace te
117
118#endif // __TERRALIB_EDIT_QT_INTERNAL_AGGREGATEAREATOOL_H
This class implements a concrete tool to create lines.
bool mouseReleaseEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse release events for ...
te::gm::Envelope buildEnvelope(const QPointF &pos)
bool mousePressEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse press events for th...
bool mouseMoveEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the...
bool mouseDoubleClickEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse double click events...
AggregateAreaTool(te::qt::widgets::MapDisplay *display, const te::map::AbstractLayerPtr &layer, QObject *parent=0)
te::gm::Geometry * buildPolygon()
void pickFeature(const QPointF &pos)
This class implements a concrete tool to create lines.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define TEEDITQTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60