export isClearButtonShown

svn path=/trunk/KDE/kdelibs/; revision=982630
This commit is contained in:
Marco Martin 2009-06-16 13:45:11 +00:00
parent d55d16976e
commit 46f6571eea
2 changed files with 23 additions and 0 deletions

View File

@ -93,6 +93,16 @@ QString LineEdit::text() const
return static_cast<KLineEdit*>(widget())->text();
}
void LineEdit::setClearButtonShown(bool show)
{
nativeWidget()->setClearButtonShown(show);
}
bool LineEdit::isClearButtonShown()
{
return nativeWidget()->isClearButtonShown();
}
void LineEdit::setStyleSheet(const QString &stylesheet)
{
widget()->setStyleSheet(stylesheet);

View File

@ -42,6 +42,7 @@ class PLASMA_EXPORT LineEdit : public QGraphicsProxyWidget
Q_PROPERTY(QGraphicsWidget *parentWidget READ parentWidget)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textEdited)
Q_PROPERTY(bool isClearButtonShown READ isClearButtonShown WRITE setClearButtonShown)
Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet)
Q_PROPERTY(KLineEdit *nativeWidget READ nativeWidget)
@ -61,6 +62,18 @@ public:
*/
QString text() const;
/**
* Shows a button to clear the text
* @since 4.3
*/
void setClearButtonShown(bool show);
/**
* @return true if the clear button is set to be shown
* @since 4.3
*/
bool isClearButtonShown();
/**
* Sets the stylesheet used to control the visual display of this LineEdit
*