1
#ifndef KATE_CTAGS_PLUGIN_H
2
#define KATE_CTAGS_PLUGIN_H
3
/* Description : Kate CTags plugin
5
* Copyright (C) 2008 by Kare Sars <kare dot sars at iki dot fi>
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public
9
* License as published by the Free Software Foundation; either
10
* version 2.1 of the License, or (at your option) version 3, or any
11
* later version accepted by the membership of KDE e.V. (or its
12
* successor approved by the membership of KDE e.V.), which shall
13
* act as a proxy defined in Section 6 of version 3 of the license.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
* General Public License for more details.
20
* You should have received a copy of the GNU General Public
21
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include <ktexteditor/view.h>
26
#include <ktexteditor/document.h>
28
#include <kate/plugin.h>
29
#include <kate/application.h>
30
#include <kate/documentmanager.h>
31
#include <kate/mainwindow.h>
32
#include <kate/pluginconfigpageinterface.h>
34
#include "kate_ctags_view.h"
35
#include "ui_CTagsGlobalConfig.h"
37
//******************************************************************/
38
class KateCTagsPlugin : public Kate::Plugin, public Kate::PluginConfigPageInterface
41
Q_INTERFACES(Kate::PluginConfigPageInterface)
44
explicit KateCTagsPlugin(QObject* parent = 0, const QStringList& = QStringList());
45
virtual ~KateCTagsPlugin() {}
47
Kate::PluginView *createView(Kate::MainWindow *mainWindow);
49
// PluginConfigPageInterface
50
uint configPages() const { return 1; };
51
Kate::PluginConfigPage *configPage (uint number = 0, QWidget *parent = 0, const char *name = 0);
52
QString configPageName (uint number = 0) const;
53
QString configPageFullName (uint number = 0) const;
54
KIcon configPageIcon (uint number = 0) const;
57
KateCTagsView *m_view;
60
//******************************************************************/
61
class KateCTagsConfigPage : public Kate::PluginConfigPage {
64
explicit KateCTagsConfigPage( QWidget* parent = 0, KateCTagsPlugin *plugin = 0 );
65
~KateCTagsConfigPage() {}
72
void addGlobalTagTarget();
73
void delGlobalTagTarget();
74
void updateGlobalDB();
75
void updateDone(int exitCode, QProcess::ExitStatus status);
79
bool listContains(const QString &target);
82
KateCTagsPlugin *m_plugin;
83
Ui_CTagsGlobalConfig m_confUi;