Add textChanged(QString&) signal.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=678161
This commit is contained in:
parent
40c39333a1
commit
c4ff3b9135
@ -135,11 +135,15 @@ void LineEdit::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
|
||||
{
|
||||
event->accept();
|
||||
emit editingFinished();
|
||||
} else {
|
||||
QGraphicsTextItem::keyPressEvent(event); //let QT handle other keypresses
|
||||
}
|
||||
if (this->toHtml()!=oldText)
|
||||
{
|
||||
oldText=this->toHtml();
|
||||
emit textChanged(oldText);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
@ -60,6 +60,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsTextItem, public LayoutItem
|
||||
|
||||
Q_SIGNALS:
|
||||
void editingFinished();
|
||||
void textChanged(const QString &text);
|
||||
|
||||
public Q_SLOTS:
|
||||
void updated(const QString&, const Plasma::DataEngine::Data&);
|
||||
@ -67,6 +68,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsTextItem, public LayoutItem
|
||||
private:
|
||||
class Private;
|
||||
Private* const d;
|
||||
QString oldText;
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent* event);
|
||||
|
Loading…
Reference in New Issue
Block a user