blob: 3082884e281c788ed21adae92fb679c66886f86c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
%{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 <kate/pluginconfiginterface.h>
#include <kate/pluginconfiginterfaceextension.h>
#include <klibloader.h>
#include <klocale.h>
class %{APPNAME}ConfigPage;
class KatePluginFactory : public KLibFactory
{
Q_OBJECT
TQ_OBJECT
public:
KatePluginFactory();
virtual ~KatePluginFactory();
virtual TQObject* createObject( TQObject* tqparent = 0, const char* pname = 0, const char* name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() );
private:
static KInstance* s_instance;
};
class KatePlugin%{APPNAME} : public Kate::Plugin, Kate::PluginViewInterface, Kate::PluginConfigInterfaceExtension
{
Q_OBJECT
TQ_OBJECT
public:
KatePlugin%{APPNAME}( TQObject* tqparent = 0, const char* name = 0 );
virtual ~KatePlugin%{APPNAME}();
void addView (Kate::MainWindow *win);
void removeView (Kate::MainWindow *win);
/** overwrite some functions */
uint configPages () const { return 1; }
Kate::PluginConfigPage *configPage (uint , TQWidget *w, const char *name=0);
TQString configPageName(uint) const { return i18n("%{APPNAME}"); };
TQString configPageFullName(uint) const { return i18n("Configure KatePlugin%{APPNAME}"); };
TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const { return 0L; };
public slots:
void slotInsertHello();
void slotApplyConfig(%{APPNAME}ConfigPage*);
private:
void initConfigPage( %{APPNAME}ConfigPage* );
private:
TQPtrList<class PluginView> m_views;
};
class %{APPNAME}ConfigPage : public Kate::PluginConfigPage
{
Q_OBJECT
TQ_OBJECT
friend class KatePlugin%{APPNAME};
public:
%{APPNAME}ConfigPage (TQObject* tqparent = 0L, TQWidget *tqparentWidget = 0L);
~%{APPNAME}ConfigPage ();
/** Reimplemented from Kate::PluginConfigPage; just emits configPageApplyRequest( this ). */
virtual void apply();
virtual void reset () { ; };
virtual void defaults () { ; };
signals:
/** Ask the plugin to set initial values */
void configPageApplyRequest( %{APPNAME}ConfigPage* );
/** Ask the plugin to apply changes */
void configPageInitRequest( %{APPNAME}ConfigPage* );
private: // variables
};
#endif // _PLUGIN_%{APPNAMEUC}_H_
|