1/* This file is part of the KDE project
2 Copyright (C) 2009 Erlend Hamberg <ehamberg@gmail.com>
3 Copyright (C) 2011 Svyatoslav Kuzmich <svatoslav1@gmail.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KATE_APP_COMMANDS_INCLUDED
21#define KATE_APP_COMMANDS_INCLUDED
22
23#include <ktexteditor/commandinterface.h>
24#include <ktexteditor/view.h>
25
26class KateAppCommands : public KTextEditor::Command
27{
28 KateAppCommands();
29 static KateAppCommands* m_instance;
30
31 public:
32 virtual ~KateAppCommands();
33 virtual const QStringList &cmds ();
34 virtual bool exec (KTextEditor::View *view, const QString &cmd, QString &msg);
35 virtual bool help (KTextEditor::View *view, const QString &cmd, QString &msg);
36
37 static KateAppCommands* self() {
38 if (m_instance == 0) {
39 m_instance = new KateAppCommands();
40 }
41 return m_instance;
42 }
43
44 private:
45 QRegExp re_write;
46 QRegExp re_close;
47 QRegExp re_quit;
48 QRegExp re_exit;
49 QRegExp re_edit;
50 QRegExp re_new;
51 QRegExp re_split;
52 QRegExp re_vsplit;
53 QRegExp re_only;
54};
55
56#endif
57