src/terralib/mnt/plugin/Plugin.cpp
Go to the documentation of this file.
1 // TerraLib
2 #include "../../../../core/translator/Translator.h"
3 #include "../../../../core/logger/Logger.h"
4 #include "../../../../plugin/Plugin.h"
5 #include "../../../af/ApplicationController.h"
6 
7 // Qt
8 #include <QAction>
9 #include <QObject>
10 #include <QMenu>
11 #include <QMenuBar>
12 
13 class Plugin : public QObject, public te::plugin::Plugin
14 {
15  Q_OBJECT
16 
17  public:
18 
19  Plugin(const te::plugin::PluginInfo& pluginInfo);
20 
21  ~Plugin();
22 
23  void startup();
24 
25  void shutdown();
26 
27  protected slots:
28 
29  void showWindow();
30 
31  protected:
32 
33  QAction* m_showWindow;
34 
35 };
36 
38  : QObject(), te::plugin::Plugin(pluginInfo), m_showWindow(0)
39 {
40 }
41 
43 {
44 }
45 
47 {
48  if(m_initialized)
49  return;
50 
51  m_initialized = true;
52 }
53 
55 {
56  if(!m_initialized)
57  return;
58 
59  m_initialized = false;
60 }
61 
63 {
64 }
65 
#define slots
bool m_initialized
A flag that indicates if the plugin was started or not.
~Plugin()
Virtual destructor.
void shutdown()
Do nothing! Just set plugin as stopped.
#define PLUGIN_CALL_BACK_DECLARATION(PLUGIN_EXPORT_MACRO)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
URI C++ Library.
Definition: Attributes.h:37
A base class for plugin types.
Plugin(QWidget *parent=0)
#define TEQTPLUGINMNTEXPORT
You can use this macro in order to export/import classes and functions from all plug-ins files...
#define PLUGIN_CALL_BACK_IMPL(PLUGIN_CLASS_NAME)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
void startup()
Do nothing! Just set plugin as started.
The basic information about a plugin.