~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to addons/kate/textfilter/plugin_katetextfilter.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 /***************************************************************************
2
 
                          plugin_katetextfilter.h  -  description
3
 
                             -------------------
4
 
    begin                : FRE Feb 23 2001
5
 
    copyright            : (C) 2001 by Joseph Wenninger
6
 
    email                : jowenn@bigfoot.com
7
 
 ***************************************************************************/
8
 
 
9
 
/***************************************************************************
10
 
 *                                                                         *
11
 
 *   This program is free software; you can redistribute it and/or modify  *
12
 
 *   it under the terms of the GNU General Public License as published by  *
13
 
 *   the Free Software Foundation; either version 2 of the License, or     *
14
 
 *   (at your option) any later version.                                   *
15
 
 *                                                                         *
16
 
 ***************************************************************************/
17
 
 
18
 
#ifndef PLUGIN_KATETEXTFILTER_H
19
 
#define PLUGIN_KATETEXTFILTER_H
20
 
 
21
 
#include <kate/plugin.h>
22
 
#include <kate/application.h>
23
 
#include <kate/documentmanager.h>
24
 
#include <kate/mainwindow.h>
25
 
 
26
 
#include <ktexteditor/view.h>
27
 
#include <ktexteditor/document.h>
28
 
#include <ktexteditor/commandinterface.h>
29
 
 
30
 
#include <QProcess>
31
 
#include <QVariantList>
32
 
 
33
 
class KProcess;
34
 
 
35
 
class PluginKateTextFilter : public Kate::Plugin, public KTextEditor::Command
36
 
{
37
 
  Q_OBJECT
38
 
 
39
 
  public:
40
 
    explicit PluginKateTextFilter(QObject* parent = 0, const QVariantList& = QVariantList() );
41
 
    virtual ~PluginKateTextFilter();
42
 
 
43
 
    Kate::PluginView *createView (Kate::MainWindow *mainWindow);
44
 
 
45
 
    // Kate::Command
46
 
    const QStringList& cmds ();
47
 
    bool exec(KTextEditor::View *view, const QString &cmd, QString &msg);
48
 
    bool help(KTextEditor::View *view, const QString &cmd, QString &msg);
49
 
  private:
50
 
    void runFilter(KTextEditor::View *kv, const QString & filter);
51
 
 
52
 
  private:
53
 
    QString  m_strFilterOutput;
54
 
    QString  m_stderrOutput;
55
 
    QString  m_last_command;
56
 
    KProcess * m_pFilterProcess;
57
 
    QStringList completionList;
58
 
    bool copyResult;
59
 
    bool mergeOutput;
60
 
  public slots:
61
 
    void slotEditFilter ();
62
 
    void slotFilterReceivedStdout();
63
 
    void slotFilterReceivedStderr();
64
 
    void slotFilterProcessExited(int exitCode, QProcess::ExitStatus exitStatus);
65
 
};
66
 
 
67
 
class PluginViewKateTextFilter: public Kate::PluginView, public Kate::XMLGUIClient
68
 
{
69
 
  Q_OBJECT
70
 
 
71
 
  public:
72
 
    PluginViewKateTextFilter(PluginKateTextFilter *plugin, Kate::MainWindow *mainwindow);
73
 
    virtual ~PluginViewKateTextFilter();
74
 
 
75
 
  private:
76
 
    PluginKateTextFilter *m_plugin;
77
 
};
78
 
 
79
 
#endif // PLUGIN_KATETEXTFILTER_H
80
 
 
81
 
// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;