blob: a43a98dfcf88851230bfc971302d3c156cfbe083 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef CLICOMPLETER_H
#define CLICOMPLETER_H
#include <QStringList>
class CLI;
class CliCompleter
{
public:
static CliCompleter* getInstance();
static char** complete(const char* text, int start, int end);
void init(CLI* value);
private:
CliCompleter();
QStringList completeInternal(const QString& toBeReplaced, const QString& text, int curPos);
QStringList completeCommand(const QString& str, int curPos);
QStringList completeQuery(const QString& toBeReplaced, const QString& str, int curPos);
bool doKeepOriginalStr(const QString& str, int curPos);
static char** toCharArray(const QStringList& list);
static CliCompleter* instance;
CLI* cli = nullptr;
};
#endif // CLICOMPLETER_H
|