X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Finputline.h;h=313a8b8e9eb0e70e5d0f90e6935a16eadc410c0f;hb=9fcd3d063228a779afae82f015a9067186c3b742;hp=936e1bda99c0807f982f237d4d90149b269075f2;hpb=fa6d3f8fad021a2a6f6d6228987c85997532e683;p=quassel.git diff --git a/src/uisupport/inputline.h b/src/uisupport/inputline.h index 936e1bda..313a8b8e 100644 --- a/src/uisupport/inputline.h +++ b/src/uisupport/inputline.h @@ -28,32 +28,35 @@ class TabCompleter; class InputLine : public QLineEdit { Q_OBJECT - public: - InputLine(QWidget *parent = 0); - ~InputLine(); - - protected: - virtual bool event(QEvent *); - virtual void keyPressEvent(QKeyEvent * event); - - private slots: - void enter(); - - public slots: - void updateNickList(QStringList); - - signals: - void nickListUpdated(QStringList); - - private: - qint32 idx; - QStringList history; - QStringList nickList; - - TabCompleter *tabComplete; - - int bindModifier; - int jumpModifier; +public: + InputLine(QWidget *parent = 0); + ~InputLine(); + +protected: + // virtual bool event(QEvent *); + virtual void keyPressEvent(QKeyEvent * event); + virtual bool eventFilter(QObject *watched, QEvent *event); + +private slots: + void on_returnPressed(); + void on_textChanged(QString newText); + + 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; + + void resetLine(); + void showHistoryEntry(); }; #endif