X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.h;h=47aebb09eb8ee7cd40411c3d86ac712eafff7d2e;hp=d249943e5c03556b7b35088cc48f931e894530c3;hb=d650a89ba2410eea2b6b9a9be4644a7847d16d48;hpb=f047a4f7add72ef7e32ad33f884e62a5773ecc72 diff --git a/src/uisupport/tabcompleter.h b/src/uisupport/tabcompleter.h index d249943e..47aebb09 100644 --- a/src/uisupport/tabcompleter.h +++ b/src/uisupport/tabcompleter.h @@ -35,6 +35,11 @@ class TabCompleter : public QObject { Q_OBJECT public: + enum Type { + UserTab = 0x01, + ChannelTab = 0x02 + }; + explicit TabCompleter(MultiLineEdit *inputLine_); void reset(); @@ -42,11 +47,15 @@ public: virtual bool eventFilter(QObject *obj, QEvent *event); +public slots: + void onTabCompletionKey(); + private: + struct CompletionKey { - inline CompletionKey(const QString &n) { nick = n; } + inline CompletionKey(const QString &n) { contents = n; } bool operator<(const CompletionKey &other) const; - QString nick; + QString contents; }; QPointer _lineEdit; @@ -55,6 +64,8 @@ private: static const Network *_currentNetwork; static BufferId _currentBufferId; + static QString _currentBufferName; + static Type _completionType; QMap _completionMap; // QStringList completionTemplates;