From: Flavio Tordini Date: Fri, 4 Sep 2015 13:31:15 +0000 (+0200) Subject: Add enabledChanged signal X-Git-Tag: 2.5~21 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=048dc30a063a61ee8958fe4118271d2de99a1d0a;p=minitube Add enabledChanged signal --- 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);