Changeset View
Changeset View
Standalone View
Standalone View
addons/externaltools/kateexternaltoolsplugin.h
- This file was added.
1 | /* This file is part of the KDE project | ||||
---|---|---|---|---|---|
2 | Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org> | ||||
3 | Copyright (C) 2002 Joseph Wenninger <jowenn@kde.org> | ||||
4 | Copyright (C) 2002 Anders Lund <anders.lund@lund.tdcadsl.dk> | ||||
5 | | ||||
6 | This library is free software; you can redistribute it and/or | ||||
7 | modify it under the terms of the GNU Library General Public | ||||
8 | License version 2 as published by the Free Software Foundation. | ||||
9 | | ||||
10 | This library 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 GNU | ||||
13 | Library General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU Library General Public License | ||||
16 | along with this library; see the file COPYING.LIB. If not, write to | ||||
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||||
18 | Boston, MA 02110-1301, USA. | ||||
19 | */ | ||||
20 | | ||||
21 | #ifndef __KATE_EXTERNALTOOLS_H__ | ||||
22 | #define __KATE_EXTERNALTOOLS_H__ | ||||
23 | | ||||
24 | #include <kate/plugin.h> | ||||
25 | #include <kate/pluginconfigpageinterface.h> | ||||
26 | #include <kate/mainwindow.h> | ||||
27 | | ||||
28 | #include <kxmlguiclient.h> | ||||
29 | | ||||
30 | #include "kateexternaltools.h" | ||||
31 | | ||||
32 | class KateExternalToolsPluginView; | ||||
33 | | ||||
34 | class KateExternalToolsPlugin | ||||
35 | : public Kate::Plugin | ||||
36 | , public Kate::PluginConfigPageInterface | ||||
37 | { | ||||
38 | Q_OBJECT | ||||
39 | Q_INTERFACES(Kate::PluginConfigPageInterface) | ||||
40 | | ||||
41 | public: | ||||
42 | explicit KateExternalToolsPlugin( QObject* parent = 0, const QList<QVariant>& = QList<QVariant>() ); | ||||
43 | virtual ~KateExternalToolsPlugin(); | ||||
44 | | ||||
45 | | ||||
46 | void reload(); | ||||
47 | | ||||
48 | Kate::PluginView *createView (Kate::MainWindow *mainWindow); | ||||
49 | KateExternalToolsPluginView *extView(QWidget *widget); | ||||
50 | private: | ||||
51 | QList<KateExternalToolsPluginView*> m_views; | ||||
52 | KateExternalToolsCommand *m_command; | ||||
53 | private Q_SLOT: | ||||
54 | void viewDestroyed(QObject *view); | ||||
55 | // | ||||
56 | // ConfigInterface | ||||
57 | // | ||||
58 | public: | ||||
59 | virtual uint configPages() const; | ||||
60 | virtual Kate::PluginConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name = 0 ); | ||||
61 | virtual QString configPageName (uint number = 0) const; | ||||
62 | virtual QString configPageFullName (uint number = 0) const; | ||||
63 | virtual KIcon configPageIcon (uint number = 0) const; | ||||
64 | | ||||
65 | }; | ||||
66 | | ||||
67 | class KateExternalToolsPluginView : public Kate::PluginView, public Kate::XMLGUIClient | ||||
68 | { | ||||
69 | Q_OBJECT | ||||
70 | | ||||
71 | public: | ||||
72 | /** | ||||
73 | * Constructor. | ||||
74 | */ | ||||
75 | KateExternalToolsPluginView (Kate::MainWindow *mainWindow); | ||||
76 | | ||||
77 | /** | ||||
78 | * Virtual destructor. | ||||
79 | */ | ||||
80 | ~KateExternalToolsPluginView (); | ||||
81 | | ||||
82 | void rebuildMenu(); | ||||
83 | | ||||
84 | KateExternalToolsMenuAction *externalTools; | ||||
85 | }; | ||||
86 | | ||||
87 | #endif | ||||
88 | // kate: space-indent on; indent-width 2; replace-tabs on; | ||||
89 | |