X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Finputline.h;h=88d606201015c8ec6628bb16e347ca5555b5a1f1;hb=6c44f3cfc618a3fc55f583597be3697714a07ae7;hp=802eae2575b630b76d164289a50dfc505cfac59c;hpb=8699dd758516d0ded076811e8ea656adc95e69d0;p=quassel.git diff --git a/src/uisupport/inputline.h b/src/uisupport/inputline.h index 802eae25..88d60620 100644 --- a/src/uisupport/inputline.h +++ b/src/uisupport/inputline.h @@ -28,29 +28,34 @@ class TabCompleter; class InputLine : public QLineEdit { Q_OBJECT - public: - InputLine(QWidget *parent = 0); - ~InputLine(); +public: + InputLine(QWidget *parent = 0); + ~InputLine(); - protected: - virtual bool event(QEvent *); - virtual void keyPressEvent(QKeyEvent * event); +protected: + // virtual bool event(QEvent *); + virtual void keyPressEvent(QKeyEvent * event); - private slots: - void enter(); +private slots: + void on_returnPressed(); + void on_textChanged(QString newText); - public slots: - void updateNickList(QStringList); - - signals: - void nickListUpdated(QStringList); - - private: - qint32 idx; - QStringList history; - QStringList nickList; + bool addToHistory(const QString &text, bool temporary = false); + +signals: + void sendText(QString text); + +private: + QStringList history; + QHash tempHistory; + qint32 idx; + TabCompleter *tabCompleter; + + int bindModifier; + int jumpModifier; - TabCompleter *tabComplete; + void resetLine(); + void showHistoryEntry(); }; #endif