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 "../../../plugin/Plugin.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  namespace plugins
54  {
55  namespace edit
56  {
57  // Forward declaration
58  class ToolBar;
59 
60  class Plugin : public QObject, public te::plugin::Plugin
61  {
62  Q_OBJECT
63 
64  public:
65 
66  Plugin(const te::plugin::PluginInfo& pluginInfo);
67 
68  ~Plugin();
69 
70  void startup();
71 
72  void shutdown();
73 
74  protected slots:
75  /*!
76  \brief Slot function used when a action was selected.
77 
78  \param checked Flag used in case a toggle action.
79  */
80  void onActionActivated(bool);
81 
83 
85 
86  void onGeometriesChanged();
87 
88  Q_SIGNALS:
89 
91 
92  protected:
93 
94  void drawStashed();
95 
96  void updateDelegate(const bool& add);
97 
99 
100  ToolBar* m_toolbar; //!< Main toolbar of TerraLib Edit Qt Plugin.
101  QMenu* m_menu; //!< Main menu of TerraLib Edit Qt Plugin.
102  QAction* m_action; //!< Action used to call the process
103 
105 
106  //void createAction(std::string name, std::string pixmap = "");
107  };
108 
109  } // end namespace edit
110  } // end namespace plugins
111  } // end namespace qt
112 } // end namespace te
113 
115 
116 #endif //__TE_QT_PLUGINS_EDIT_INTERNAL_PLUGIN_H
The main toolbar of TerraLib Edit Qt plugin.
Definition: ToolBar.h:71
void shutdown()
Do nothing! Just set plugin as stopped.
PLUGIN_CALL_BACK_DECLARATION(TEQTPLUGINADDRESSGEOCODINGEXPORT)
This is the base class for layers.
Definition: AbstractLayer.h:76
A base class for application events.
Definition: Event.h:59
EditDelegate * m_delegate
Definition: Plugin.h:104
void onStashedLayer(te::map::AbstractLayer *layer)
ToolBar * m_toolbar
Main toolbar of TerraLib Edit Qt Plugin.
Definition: Plugin.h:100
void onApplicationTriggered(te::qt::af::evt::Event *e)
void startup()
Do nothing! Just set plugin as started.
Plugin(const te::plugin::PluginInfo &pluginInfo)
URI C++ Library.
#define TEQTPLUGINEDITEXPORT
You can use this macro in order to export/import classes and functions from all plug-ins files...
Definition: Config.h:50
A specialization of QTreeView for manipulate layers.
Definition: LayerItemView.h:71
Configuration flags for the TerraLib Edit plugin.
A base class for plugin types.
Definition: Plugin.h:50
QMenu * m_menu
Main menu of TerraLib Edit Qt Plugin.
Definition: Plugin.h:101
QAction * m_action
Action used to call the process.
Definition: Plugin.h:102
void updateDelegate(const bool &add)
The basic information about a plugin.
Definition: PluginInfo.h:61
~Plugin()
Virtual destructor.
te::qt::widgets::LayerItemView * getLayerExplorer()
void onActionActivated(bool)
Slot function used when a action was selected.
void triggered(te::qt::af::evt::Event *e)