Loading...
Searching...
No Matches
RpToolsWidget.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/rp/RpToolsWidget.h
22
23 \brief This file has the RpToolsWidget class.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_RP_INTERNAL_ROTOOLSWIDGET_H
27#define __TERRALIB_QT_WIDGETS_RP_INTERNAL_ROTOOLSWIDGET_H
28
29// TerraLib
30#include "../../../geometry/Envelope.h"
31#ifndef Q_MOC_RUN
32#include "../../../geometry/Polygon.h"
33#include "../../../maptools/AbstractLayer.h"
34#endif
35#include "../../../maptools/Enums.h"
36#include "../Config.h"
37
38// STL
39#include <memory>
40
41// Qt
42#include <QComboBox>
43#include <QWidget>
44#include <qactiongroup.h>
45
46namespace Ui { class RpToolsWidgetForm; }
47
48namespace te
49{
50 namespace gm { class Envelope; }
51 namespace rst { class Raster; }
52 namespace qt
53 {
54 namespace widgets
55 {
56 class AbstractTool;
57 class MapDisplay;
58
59 /*!
60 \class RpToolsWidget
61
62 \brief This class is used to navigate over a DataSetLayer (having a raster representation)
63 and given a set of tools, such as, zoom in, zoom out, pan, recompose.
64 Two new tools as created for raster interaction:
65 - point clicked
66 - geom definition
67
68 \sa RasterFactory
69 */
70 class TEQTWIDGETSEXPORT RpToolsWidget : public QWidget
71 {
72 Q_OBJECT
73
74 public:
75
76 RpToolsWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
77
79
80 public:
81
83
84 void setActionGroup(QActionGroup* actionGroup);
85
86 void hideEditionTools(bool hide);
87
89
91
93
94 void setPickerTool(bool checked);
95
96 void setGeomTool(bool checked);
97
98 void setEnvelopeTool(bool checked);
99
100 void setSelectionMode(bool mode);
101
103
104 protected slots:
105
107
109
110 void onPointPicked(QPointF& point);
111
112 void onPointPickerToggled(bool checked);
113
114 void onPointPickerMoving(QPointF& point);
115
116 void onGeomToggled(bool checked);
117
118 void onBoxToggled(bool checked);
119
120 signals:
121
122 void pointPicked(double x, double y);
123
124 void pointPickerMoving(double x, double y);
125
127
129
130 private:
131
132 std::unique_ptr<Ui::RpToolsWidgetForm> m_ui;
133
135
136 QActionGroup* m_actionGroup;
137
139
140 QAction* m_geomAction;
141
142 QAction* m_boxAction;
143
145 };
146
147 } // end namespace widgets
148 } // end namespace qt
149} // end namespace te
150
151#endif // __TERRALIB_QT_WIDGETS_RP_INTERNAL_ROTOOLSWIDGET_H
152
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
Definition: Polygon.h:51
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
This class is used to navigate over a DataSetLayer (having a raster representation) and given a set o...
Definition: RpToolsWidget.h:71
void onEnvelopeAcquired(te::gm::Envelope env)
void setMapDisplay(te::qt::widgets::MapDisplay *mapDisplay)
void setSelectionMode(bool mode)
te::qt::widgets::MapDisplay * m_mapDisplay
void geomAquired(te::gm::Polygon *poly)
void pointPicked(double x, double y)
void onPointPickerMoving(QPointF &point)
void onPointPicked(QPointF &point)
void onBoxToggled(bool checked)
void pointPickerMoving(double x, double y)
void hideEditionTools(bool hide)
std::unique_ptr< Ui::RpToolsWidgetForm > m_ui
RpToolsWidget(QWidget *parent=0, Qt::WindowFlags f=0)
void setEnvelopeTool(bool checked)
void onGeomToggled(bool checked)
void setPickerTool(bool checked)
void envelopeAcquired(te::gm::Envelope env)
void setActionGroup(QActionGroup *actionGroup)
void setGeomTool(bool checked)
void onGeomAquired(te::gm::Polygon *poly)
void onPointPickerToggled(bool checked)
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63