X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.h;h=087731982a783a80a76122ea6bb402ce5e9a6468;hp=47aebb09eb8ee7cd40411c3d86ac712eafff7d2e;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hpb=61c8d84d1c849373e0f115dc748ed45cff95287d diff --git a/src/uisupport/tabcompleter.h b/src/uisupport/tabcompleter.h index 47aebb09..08773198 100644 --- a/src/uisupport/tabcompleter.h +++ b/src/uisupport/tabcompleter.h @@ -31,50 +31,51 @@ class MultiLineEdit; class IrcUser; class Network; -class TabCompleter : public QObject { - Q_OBJECT +class TabCompleter : public QObject +{ + Q_OBJECT public: - enum Type { - UserTab = 0x01, - ChannelTab = 0x02 - }; + enum Type { + UserTab = 0x01, + ChannelTab = 0x02 + }; - explicit TabCompleter(MultiLineEdit *inputLine_); + explicit TabCompleter(MultiLineEdit *inputLine_); - void reset(); - void complete(); + void reset(); + void complete(); - virtual bool eventFilter(QObject *obj, QEvent *event); + virtual bool eventFilter(QObject *obj, QEvent *event); public slots: - void onTabCompletionKey(); + void onTabCompletionKey(); private: - struct CompletionKey { - inline CompletionKey(const QString &n) { contents = n; } - bool operator<(const CompletionKey &other) const; - QString contents; - }; + struct CompletionKey { + inline CompletionKey(const QString &n) { contents = n; } + bool operator<(const CompletionKey &other) const; + QString contents; + }; - QPointer _lineEdit; - bool _enabled; - QString _nickSuffix; + QPointer _lineEdit; + bool _enabled; + QString _nickSuffix; - static const Network *_currentNetwork; - static BufferId _currentBufferId; - static QString _currentBufferName; - static Type _completionType; + static const Network *_currentNetwork; + static BufferId _currentBufferId; + static QString _currentBufferName; + static Type _completionType; - QMap _completionMap; - // QStringList completionTemplates; + QMap _completionMap; + // QStringList completionTemplates; - QMap::Iterator _nextCompletion; - int _lastCompletionLength; - - void buildCompletionList(); + QMap::Iterator _nextCompletion; + int _lastCompletionLength; + void buildCompletionList(); }; + #endif