Loading...
Searching...
No Matches
Plugin.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/plugins/edit/Plugin.h
22
23 \brief Plugin implementation for the TerraLib Edit Qt Plugin.
24*/
25
26#ifndef __TE_QT_PLUGINS_EDIT_INTERNAL_PLUGIN_H
27#define __TE_QT_PLUGINS_EDIT_INTERNAL_PLUGIN_H
28
29// TerraLib
30#include "../../../core/plugin/CppPlugin.h"
31#include "Config.h"
32
33// Qt
34#include <QAction>
35#include <QMenu>
36
37class EditDelegate;
38
39namespace te
40{
41 namespace map
42 {
43 class AbstractLayer;
44 }
45
46 namespace qt
47 {
48 namespace widgets
49 {
50 class LayerItemView;
51 }
52
53 // Forward declaration
54 namespace af
55 {
56 namespace evt
57 {
58 struct Event;
59 }
60 }
61
62 namespace plugins
63 {
64 namespace edit
65 {
66 // Forward declaration
67 class ToolBar;
68
69 class Plugin : public QObject, public te::core::CppPlugin
70 {
71 Q_OBJECT
72
73 public:
74
75 Plugin(const te::core::PluginInfo& pluginInfo);
76
78
79 void startup();
80
81 void shutdown();
82
83 protected slots:
84 /*!
85 \brief Slot function used when a action was selected.
86
87 \param checked Flag used in case a toggle action.
88 */
90
92
94
96
97 void onUpdateDelegate(const bool& add);
98
99 Q_SIGNALS:
100
102
103 protected:
104
106
108
109 ToolBar* m_toolbar; //!< Main toolbar of TerraLib Edit Qt Plugin.
110 QAction* m_action; //!< Action used to call the process
111
113
114 //void createAction(std::string name, std::string pixmap = "");
115 };
116
117 } // end namespace edit
118 } // end namespace plugins
119 } // end namespace qt
120} // end namespace te
121
122#endif //__TE_QT_PLUGINS_EDIT_INTERNAL_PLUGIN_H
The base class for C++ plugins.
Definition: CppPlugin.h:47
This is the base class for layers.
Definition: AbstractLayer.h:78
void onStashedLayer(te::map::AbstractLayer *layer)
void startup()
This method will be called by applications to startup some plugin's functionality.
void triggered(te::qt::af::evt::Event *e)
Plugin(const te::core::PluginInfo &pluginInfo)
EditDelegate * m_delegate
Definition: Plugin.h:112
void onActionActivated(bool)
Slot function used when a action was selected.
void onApplicationTriggered(te::qt::af::evt::Event *e)
ToolBar * m_toolbar
Main toolbar of TerraLib Edit Qt Plugin.
Definition: Plugin.h:109
te::qt::widgets::LayerItemView * getLayerExplorer()
QAction * m_action
Action used to call the process.
Definition: Plugin.h:110
void onUpdateDelegate(const bool &add)
void shutdown()
This method will be called by applicatons to shutdown plugin's functionality.
The main toolbar of TerraLib Edit Qt plugin.
Definition: ToolBar.h:80
A specialization of QTreeView for manipulate layers.
Definition: LayerItemView.h:79
TerraLib.
#define slots
Basic information about a plugin.
Definition: PluginInfo.h:64
A base class for application events.
Definition: Event.h:60
Proxy configuration file for TerraView (see terraview_config.h).