diff options
Diffstat (limited to 'languages/cpp/app_templates/kateplugin/plugin_app.h')
-rw-r--r-- | languages/cpp/app_templates/kateplugin/plugin_app.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/languages/cpp/app_templates/kateplugin/plugin_app.h b/languages/cpp/app_templates/kateplugin/plugin_app.h new file mode 100644 index 00000000..8cc5b237 --- /dev/null +++ b/languages/cpp/app_templates/kateplugin/plugin_app.h @@ -0,0 +1,49 @@ +%{H_TEMPLATE} + +#ifndef _PLUGIN_%{APPNAMEUC}_H_ +#define _PLUGIN_%{APPNAMEUC}_H_ + +#include <kate/application.h> +#include <kate/documentmanager.h> +#include <kate/document.h> +#include <kate/mainwindow.h> +#include <kate/plugin.h> +#include <kate/view.h> +#include <kate/viewmanager.h> + +#include <klibloader.h> +#include <klocale.h> + +class KatePluginFactory : public KLibFactory +{ + Q_OBJECT + + public: + KatePluginFactory(); + virtual ~KatePluginFactory(); + + virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, const char* name = "QObject", const QStringList &args = QStringList() ); + + private: + static KInstance* s_instance; +}; + +class KatePlugin%{APPNAME} : public Kate::Plugin, Kate::PluginViewInterface +{ + Q_OBJECT + + public: + KatePlugin%{APPNAME}( QObject* parent = 0, const char* name = 0 ); + virtual ~KatePlugin%{APPNAME}(); + + void addView (Kate::MainWindow *win); + void removeView (Kate::MainWindow *win); + + public slots: + void slotInsertHello(); + + private: + QPtrList<class PluginView> m_views; +}; + +#endif // _PLUGIN_%{APPNAMEUC}_H_ |