textchanged signal

svn path=/trunk/KDE/kdelibs/; revision=1025553
This commit is contained in:
Aaron J. Seigo 2009-09-19 03:27:56 +00:00
parent 2f535d5516
commit 1b05349652
2 changed files with 12 additions and 4 deletions

View File

@ -71,13 +71,15 @@ LineEdit::LineEdit(QGraphicsWidget *parent)
d(new LineEditPrivate(this))
{
KLineEdit *native = new KLineEdit;
d->style = Plasma::Style::sharedStyle();
native->setStyle(d->style.data());
native->setAttribute(Qt::WA_NoSystemBackground);
setWidget(native);
connect(native, SIGNAL(editingFinished()), this, SIGNAL(editingFinished()));
connect(native, SIGNAL(returnPressed()), this, SIGNAL(returnPressed()));
connect(native, SIGNAL(textEdited(const QString&)), this, SIGNAL(textEdited(const QString&)));
setWidget(native);
native->setAttribute(Qt::WA_NoSystemBackground);
d->style = Plasma::Style::sharedStyle();
native->setStyle(d->style.data());
connect(native, SIGNAL(textChanged(const QString&)), this, SIGNAL(textChanged(const QString&)));
d->setPalette();
connect(Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(setPalette()));

View File

@ -99,6 +99,12 @@ Q_SIGNALS:
void returnPressed();
void textEdited(const QString &text);
/**
* Emitted when the text changes
* @since 4.4
*/
void textChanged(const QString &text);
private:
Q_PRIVATE_SLOT(d, void setPalette())