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 
37 class EditDelegate;
38 
39 namespace 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 
77  ~Plugin();
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  */
89  void onActionActivated(bool);
90 
92 
94 
95  void onGeometriesChanged();
96 
97  Q_SIGNALS:
98 
100 
101  protected:
102 
103  void drawStashed();
104 
105  void updateDelegate(const bool& add);
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 main toolbar of TerraLib Edit Qt plugin.
Definition: ToolBar.h:73
void shutdown()
This method will be called by applicatons to shutdown plugin's functionality.
This is the base class for layers.
Definition: AbstractLayer.h:76
A base class for application events.
Definition: Event.h:59
Plugin(const te::core::PluginInfo &pluginInfo)
EditDelegate * m_delegate
Definition: Plugin.h:112
void onStashedLayer(te::map::AbstractLayer *layer)
Basic information about a plugin.
Definition: PluginInfo.h:63
ToolBar * m_toolbar
Main toolbar of TerraLib Edit Qt Plugin.
Definition: Plugin.h:109
void onApplicationTriggered(te::qt::af::evt::Event *e)
void startup()
This method will be called by applications to startup some plugin's functionality.
The base class for C++ plugins.
Definition: CppPlugin.h:46
URI C++ Library.
A specialization of QTreeView for manipulate layers.
Definition: LayerItemView.h:73
Configuration flags for the TerraLib Edit plugin.
QAction * m_action
Action used to call the process.
Definition: Plugin.h:110
void updateDelegate(const bool &add)
te::qt::widgets::LayerItemView * getLayerExplorer()
void onActionActivated(bool)
Slot function used when a action was selected.
void triggered(te::qt::af::evt::Event *e)