From 048dc30a063a61ee8958fe4118271d2de99a1d0a Mon Sep 17 00:00:00 2001 From: Flavio Tordini Date: Fri, 4 Sep 2015 15:31:15 +0200 Subject: [PATCH] Add enabledChanged signal --- src/searchlineedit.cpp | 5 +++++ src/searchlineedit.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/searchlineedit.cpp b/src/searchlineedit.cpp index 1f9fd3f..37ebe29 100644 --- a/src/searchlineedit.cpp +++ b/src/searchlineedit.cpp @@ -162,3 +162,8 @@ QString SearchLineEdit::text() { QLineEdit *SearchLineEdit::getLineEdit() { return m_lineEdit; } + +void SearchLineEdit::setEnabled(bool enabled) { + ExLineEdit::setEnabled(enabled); + emit enabledChanged(enabled); +} diff --git a/src/searchlineedit.h b/src/searchlineedit.h index 7128994..d7d8c8b 100644 --- a/src/searchlineedit.h +++ b/src/searchlineedit.h @@ -33,6 +33,8 @@ public: QLineEdit *getLineEdit(); QWidget *toWidget() { return qobject_cast(this); } + void setEnabled(bool enabled); + public slots: void returnPressed(); @@ -42,6 +44,8 @@ signals: void search(const QString &text); void suggestionAccepted(Suggestion *suggestion); + void enabledChanged(bool enabled); + protected: void updateGeometries(); void resizeEvent(QResizeEvent *e); -- 2.39.5