X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Ftabcompleter.h;h=193b2f5fa2f9b4b699369c77b55c49081e5dbc6a;hp=25ed200d07cf35e06e7399c2558d464a22b7670e;hb=aa40491595ffec54ba340a9850d99dc14d920eb3;hpb=d6b056e936ec441258d291b7a8af7b83f9f53016 diff --git a/src/uisupport/tabcompleter.h b/src/uisupport/tabcompleter.h index 25ed200d..193b2f5f 100644 --- a/src/uisupport/tabcompleter.h +++ b/src/uisupport/tabcompleter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005/06 by the Quassel IRC Team * + * Copyright (C) 2005/06 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -21,36 +21,40 @@ #ifndef _TABCOMPLETER_H_ #define _TABCOMPLETER_H_ -#include #include -#include +#include +#include + +class InputLine; +class IrcUser; class TabCompleter : public QObject { Q_OBJECT - public: - TabCompleter(QLineEdit *l, QObject *parent = 0); - void disable(); - void complete(); +public: + TabCompleter(InputLine *inputLine_); + + void reset(); + void complete(); + + virtual bool eventFilter(QObject *obj, QEvent *event); + +private slots: + void ircUserJoinedOrParted(IrcUser *ircUser); + +private: + QPointer inputLine; + bool enabled; + QString nickSuffix; + + QStringList completionList; + // QStringList completionTemplates; + + QStringList::Iterator nextCompletion; + int lastCompletionLength; + + void buildCompletionList(); - public slots: - void updateNickList(QStringList); - void updateChannelList(QStringList); - - private: - bool enabled; - QString startOfLineSuffix; - QLineEdit *lineEdit; - QStringList completionTemplates; - QStringList channelList; - - QStringList nickList; - QStringList completionList; - QStringList::Iterator nextCompletion; - int lastCompletionLength; - - void buildCompletionList(); - }; #endif