Kate
katecmds.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_CMDS_H__
00022 #define __KATE_CMDS_H__
00023
00024 #include "../interfaces/document.h"
00025 #include "../interfaces/view.h"
00026
00027 class KateDocument;
00028 class KCompletion;
00029
00030 namespace KateCommands
00031 {
00032
00039 class CoreCommands : public Kate::Command, public Kate::CommandExtension
00040 {
00041 public:
00049 bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg );
00050
00051 bool help( class Kate::View *, const QString &, QString & ) {return false;};
00052
00057 QStringList cmds();
00058
00062 KCompletion *completionObject( const QString &cmd, Kate::View *view );
00063 };
00064
00075 class SedReplace : public Kate::Command
00076 {
00077 public:
00085 bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00086
00087 bool help (class Kate::View *, const QString &, QString &) { return false; };
00088
00093 QStringList cmds () { QStringList l("s"); l << "%s" << "$s"; return l; };
00094
00095 private:
00115 static int sedMagic(KateDocument *doc, int &line,
00116 const QString &find, const QString &replace, const QString &delim,
00117 bool noCase, bool repeat,
00118 uint startcol=0, int endcol=-1);
00119 };
00120
00129 class Character : public Kate::Command
00130 {
00131 public:
00139 bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00140
00141 bool help (class Kate::View *, const QString &, QString &) { return false; };
00142
00147 QStringList cmds () { return QStringList("char"); };
00148 };
00149
00153 class Date : public Kate::Command
00154 {
00155 public:
00163 bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg);
00164
00165 bool help (class Kate::View *, const QString &, QString &) { return false; };
00166
00171 QStringList cmds () { return QStringList("date"); };
00172 };
00173
00174
00175 }
00176 #endif
00177
00178