projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store the type of the current tab completion (user or channel) in the TabCompleter...
[quassel.git]
/
src
/
uisupport
/
tabcompleter.h
diff --git
a/src/uisupport/tabcompleter.h
b/src/uisupport/tabcompleter.h
index
eb066e7
..
b8461ee
100644
(file)
--- a/
src/uisupport/tabcompleter.h
+++ b/
src/uisupport/tabcompleter.h
@@
-27,7
+27,7
@@
#include "types.h"
#include "types.h"
-class
InputLine
;
+class
MultiLineEdit
;
class IrcUser;
class Network;
class IrcUser;
class Network;
@@
-35,7
+35,12
@@
class TabCompleter : public QObject {
Q_OBJECT
public:
Q_OBJECT
public:
- TabCompleter(InputLine *inputLine_);
+ enum Type {
+ UserTab = 0x01,
+ ChannelTab = 0x02
+ };
+
+ explicit TabCompleter(MultiLineEdit *inputLine_);
void reset();
void complete();
void reset();
void complete();
@@
-43,24
+48,27
@@
public:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
+
struct CompletionKey {
struct CompletionKey {
- inline CompletionKey(const QString &n) {
nick
= n; }
+ inline CompletionKey(const QString &n) {
contents
= n; }
bool operator<(const CompletionKey &other) const;
bool operator<(const CompletionKey &other) const;
- QString
nick
;
+ QString
contents
;
};
};
- QPointer<
InputLine> inputLine
;
- bool enabled;
- QString nickSuffix;
+ QPointer<
MultiLineEdit> _lineEdit
;
+ bool
_
enabled;
+ QString
_
nickSuffix;
static const Network *_currentNetwork;
static BufferId _currentBufferId;
static const Network *_currentNetwork;
static BufferId _currentBufferId;
+ static QString _currentBufferName;
+ static Type _completionType;
- QMap<CompletionKey, QString> completionMap;
+ QMap<CompletionKey, QString>
_
completionMap;
// QStringList completionTemplates;
// QStringList completionTemplates;
- QMap<CompletionKey, QString>::Iterator nextCompletion;
- int lastCompletionLength;
+ QMap<CompletionKey, QString>::Iterator
_
nextCompletion;
+ int
_
lastCompletionLength;
void buildCompletionList();
void buildCompletionList();