katecmd.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
#ifndef _KATE_CMD_H
00020
#define _KATE_CMD_H
00021
00022
#include "document.h"
00023
00024
#include <kcompletion.h>
00025
00026
#include <qdict.h>
00027
#include <qstringlist.h>
00028
00029
class KATEPARTINTERFACES_EXPORT KateCmd
00030 {
00031
private:
00032 KateCmd ();
00033
00034
public:
00035 ~KateCmd ();
00036
00037
static KateCmd *
self ();
00038
00039
bool registerCommand (
Kate::Command *cmd);
00040
bool unregisterCommand (
Kate::Command *cmd);
00041
Kate::Command *queryCommand (
const QString &cmd);
00042
00043
QStringList cmds ();
00044
void appendHistory(
const QString &cmd );
00045
const QString fromHistory( uint i )
const;
00046 uint historyLength()
const {
return m_history.count(); }
00047
00048
private:
00049
static KateCmd *s_self;
00050
QDict<Kate::Command> m_dict;
00051
QStringList m_cmds;
00052
QStringList m_history;
00053 };
00054
00061 class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion :
public KCompletion
00062 {
00063
public:
00064 KateCmdShellCompletion();
00065
00072
QString makeCompletion(
const QString &text);
00073
00074
protected:
00075
00076
void postProcessMatch(
QString *match )
const;
00077
void postProcessMatches(
QStringList *matches )
const;
00078
void postProcessMatches(
KCompletionMatches *matches )
const;
00079
00080
private:
00087
void splitText(
const QString &text,
QString &text_start,
QString &text_compl )
const;
00088
00089
QChar m_word_break_char;
00090
QChar m_quote_char1;
00091
QChar m_quote_char2;
00092
QChar m_escape_char;
00093
00094
QString m_text_start;
00095
QString m_text_compl;
00096
00097 };
00098
00099
#endif
This file is part of the documentation for kate Library Version 3.4.0.