lineEdit()->selectAll();
}
+/*!
+ Deselect all text in the editor.
+*/
+void QDS_LineEdit::deselect()
+{
+ if ( lineEdit() )
+ lineEdit()->deselect();
+}
+
+/*!
+ Select or deselect all text in the editor.
+*/
+void QDS_LineEdit::setSelection( const bool on )
+{
+ if ( on )
+ selectAll();
+ else
+ deselect();
+}
+
+/*!
+ Returns true if the editor has selected text.
+*/
+bool QDS_LineEdit::hasSelection() const
+{
+ return lineEdit() ? lineEdit()->hasSelectedText() : false;
+}
+
/*!
Set the aligment of line edit. Reimplemented from QDS_Datum.
*/
{
Q_OBJECT
+ Q_PROPERTY( bool Selection READ hasSelection WRITE setSelection )
+
protected:
class Editor;
QDS_LineEdit( const QString&, QWidget* = 0, const int = All, const QString& = QString::null );
virtual ~QDS_LineEdit();
+ virtual void deselect();
virtual void selectAll();
virtual void setAlignment( const int, const int = Label );
+ bool hasSelection() const;
+ void setSelection( const bool );
+
signals:
void returnPressed();