Loading...
Searching...
No Matches
InterfaceController.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 TerraView - A GIS Application.
4
5 TerraView is free software: you can redistribute it and/or modify
6 it under the terms of the GNU 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 TerraView 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 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with TerraLib Code Editor. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@dpi.inpe.br>.
18 */
19
20/*!
21 \file terralib/qt/af/connectors/InterfaceController.h
22
23 \brief A connector to controll all non modal interfaces.
24*/
25
26#ifndef __TERRALIB_QT_AF_CONNECTORS_INTERNAL_INTERFACECONTROLLER_H
27#define __TERRALIB_QT_AF_CONNECTORS_INTERNAL_INTERFACECONTROLLER_H
28
29// Terralib
30#ifndef Q_MOC_RUN
31#include "../../../maptools/AbstractLayer.h"
32#endif
33#include "../Config.h"
34
35// Qt
36#include <QtCore/QObject>
37
38//STL
39#include <set>
40
41namespace te
42{
43 namespace qt
44 {
45 // Forward declarations
46 namespace widgets
47 {
48 class InterfaceController;
49 }
50
51 namespace af
52 {
53 namespace evt
54 {
55 // Forward declarations
56 struct Event;
57 }
58
59 /*!
60 \class InterfaceController
61
62 \brief A connector to controll all non modal interfaces.
63
64 It is used to listen events sent by the application framework.
65 */
66 class TEQTAFEXPORT InterfaceController : public QObject
67 {
68 Q_OBJECT
69
70 public:
71
72 /*!
73 \brief Constructor.
74
75 */
76 InterfaceController(QObject* parent = 0);
77
78 /*! \brief Destructor. */
80
81 public:
82
84
86
87 protected slots:
88
89 /*!
90 \brief Listener to the application framewrork events.
91
92 \param evt An event sent by framework.
93 */
95
96 protected:
97
98 /*!
99 \brief This method is used to set current layer
100
101 */
103
104 /*!
105 \brief This method is used to add a new layer
106
107 */
109
110 /*!
111 \brief This method is used to remove a layer
112
113 */
115
116 signals:
117
119
120 protected:
121
122 std::set<te::qt::widgets::InterfaceController*> m_interfaces;
123
124 };
125
126 } // end namespace af
127 } // end namespace qt
128} // end namespace te
129
130#endif // __TERRALIB_QT_AF_CONNECTORS_INTERNAL_INTERFACECONTROLLER_H
131
A connector to controll all non modal interfaces.
void triggered(te::qt::af::evt::Event *e)
void removeInteface(te::qt::widgets::InterfaceController *i)
void onApplicationTriggered(te::qt::af::evt::Event *evt)
Listener to the application framewrork events.
void layerSelected(te::map::AbstractLayerPtr layer)
This method is used to set current layer.
void layerRemoved(te::map::AbstractLayerPtr layer)
This method is used to remove a layer.
void addInterface(te::qt::widgets::InterfaceController *i)
InterfaceController(QObject *parent=0)
Constructor.
void layerAdded(te::map::AbstractLayerPtr layer)
This method is used to add a new layer.
std::set< te::qt::widgets::InterfaceController * > m_interfaces
A virtual class for non modal interfaces.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
A base class for application events.
Definition: Event.h:60
#define TEQTAFEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:71