SVN_SILENT made messages (.desktop file) - always resolve ours
[trojita.git] / src / Gui / LineEdit.h
blobbb717b7124e29a784d6829698361b3ed3f55b610
1 /****************************************************************************
2 **
3 ** Copyright (c) 2007 Trolltech ASA <info@trolltech.com>
4 ** Modified (c) 2009, 2011, 2013 by Glad Deschrijver <glad.deschrijver@gmail.com>
5 **
6 ** Use, modification and distribution is allowed without limitation,
7 ** warranty, liability or support of any kind.
8 **
9 ****************************************************************************/
11 #ifndef LINEEDIT_H
12 #define LINEEDIT_H
14 #include <QLineEdit>
16 class QToolButton;
18 class LineEdit : public QLineEdit
20 Q_OBJECT
22 public:
23 explicit LineEdit(const QString &text, QWidget *parent = 0);
24 explicit LineEdit(QWidget *parent = 0);
25 bool isHistoryEnabled();
26 void setHistoryEnabled(bool enabled = true);
28 signals:
29 void textEditingFinished(const QString &text);
31 protected:
32 bool eventFilter(QObject *o, QEvent *e);
33 void keyReleaseEvent(QKeyEvent *ke);
35 private Q_SLOTS:
36 void learnEntry();
37 void restoreInlineCompletion();
39 private:
40 bool m_historyEnabled;
41 int m_historyPosition;
42 QString m_currentText;
45 #endif // LINEEDIT_H