Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qt/tools/MainWindow.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 MainWindow.h
22
23
\brief A simple main window to show example of TerraLib Qt Tools.
24
*/
25
26
#ifndef __TERRALIB_EXAMPLES_QT_TOOLS_INTERNAL_TOOLS_H
27
#define __TERRALIB_EXAMPLES_QT_TOOLS_INTERNAL_TOOLS_H
28
29
// TerarLib
30
#include <
terralib/geometry/Enums.h
>
31
#ifndef Q_MOC_RUN
32
#include <
terralib/maptools/AbstractLayer.h
>
33
#endif
34
35
// Qt
36
#include <QMainWindow>
37
38
// STL
39
#include <list>
40
#include <vector>
41
42
// Forward declarations
43
namespace
te
44
{
45
namespace
se
46
{
47
class
Style;
48
}
49
50
namespace
qt
51
{
52
namespace
widgets
53
{
54
class
AbstractTool;
55
class
MapDisplay
;
56
}
57
}
58
}
59
60
// Forward declarations
61
class
QAction;
62
class
QContextMenuEvent;
63
class
QPointF;
64
class
QMenu;
65
class
QToolBar;
66
67
/*!
68
\class MainWindow
69
70
\brief A simple main window to show example of TerraLib Qt Tools.
71
*/
72
class
MainWindow
:
public
QMainWindow
73
{
74
Q_OBJECT
75
76
public
:
77
78
/** @name Initializer Methods
79
* Methods related to instantiation and destruction.
80
*/
81
//@{
82
83
/*! \brief Constructor */
84
MainWindow
(
QWidget
* parent = 0, Qt::WindowFlags f = 0);
85
86
/*! \brief Destructor. */
87
~
MainWindow
();
88
89
//@}
90
91
private
:
92
93
void
setupActions();
94
95
void
addDataSetLayer(
const
QString& path,
const
std::string& driver);
96
97
void
contextMenuEvent(QContextMenuEvent* e);
98
99
private
slots
:
100
101
void
onAddVectorDataTriggered();
102
103
void
onAddRasterDataTriggered();
104
105
void
onPanTriggered();
106
107
void
onZoomInTriggered();
108
109
void
onZoomOutTriggered();
110
111
void
onZoomAreaTriggered();
112
113
void
onDistanceTriggered();
114
115
void
onAreaTriggered();
116
117
void
onAngleTriggered();
118
119
void
onSelectionTriggered();
120
121
void
onStopAllTriggered();
122
123
void
onCoordTracked(QPointF& coordinate);
124
125
private
:
126
127
te::qt::widgets::MapDisplay
* m_display;
128
te::qt::widgets::AbstractTool
* m_tool;
129
130
std::list<te::map::AbstractLayerPtr>
m_layers
;
131
132
QToolBar* m_toolBar;
133
QMenu* m_menu;
134
135
static
std::size_t ms_id;
136
};
137
138
#endif // __TERRALIB_EXAMPLES_QT_TOOLS_INTERNAL_TOOLS_H
Enums.h
Enumerations related to Geometry module.
slots
#define slots
Definition:
python/VirtualMachine.h:48
MapDisplay
void MapDisplay()
It retrieves data from a data source, create a set of layer and show map display. ...
Definition:
examples/maptools/MapDisplay.cpp:20
QWidget
AbstractLayer.h
This is the base class for Layers.
te::qt::widgets::MapDisplay
A widget to control the display of a set of layers.
Definition:
qt/widgets/canvas/MapDisplay.h:71
MainWindow::m_layers
std::list< te::map::AbstractLayerPtr > m_layers
Definition:
qt/tools/MainWindow.h:130
te::qt::widgets::AbstractTool
This class defines an interface for objects that can receive application events and respond to them...
Definition:
AbstractTool.h:63
te
URI C++ Library.
Definition:
Attributes.h:37
QMainWindow
MainWindow
A simple main window to show example of TerraLib Qt Tools.
Definition:
ceditor/MainWindow.h:16
terralib5_src
examples
qt
tools
MainWindow.h
Generated on Wed Jun 6 2018 12:16:10 for TerraLib by
1.8.11