QGIS/python/gui/qgsfilterlineedit.sip.in

274 lines
6.7 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfilterlineedit.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsFilterLineEdit : QLineEdit
{
%Docstring
2017-12-15 10:36:55 -04:00
QLineEdit subclass with built in support for clearing the widget's value and
handling custom null value representations.
2017-12-15 10:36:55 -04:00
When using QgsFilterLineEdit the value(), setValue() and clearValue() methods should be used
instead of QLineEdit's text(), setText() and clear() methods, and the valueChanged()
signal should be used instead of textChanged().
*
%End
%TypeHeaderCode
#include "qgsfilterlineedit.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsFilterLineEdit *>( sipCpp ) )
sipType = sipType_QgsFilterLineEdit;
else
sipType = NULL;
%End
public:
enum ClearMode
{
ClearToNull,
ClearToDefault,
};
QgsFilterLineEdit( QWidget *parent /TransferThis/ = 0, const QString &nullValue = QString() );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsFilterLineEdit.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
:param nullValue: string for representing null values
%End
bool showClearButton() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if the widget's clear button is visible.
.. seealso:: :py:func:`setShowClearButton`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
void setShowClearButton( bool visible );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the widget's clear button is visible.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param visible: set to false to hide the clear button
.. seealso:: :py:func:`showClearButton`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
ClearMode clearMode() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the clear mode for the widget. The clear mode defines the behavior of the
widget when its value is cleared. This defaults to ClearToNull.
.. seealso:: :py:func:`setClearMode`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
void setClearMode( ClearMode mode );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the clear mode for the widget. The clear mode defines the behavior of the
widget when its value is cleared. This defaults to ClearToNull.
.. seealso:: :py:func:`clearMode`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
void setNullValue( const QString &nullValue );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the string representation for null values in the widget. This does not
affect the values returned for null values by value(), rather it only affects
the text that is shown to users when the widget's value is null.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param nullValue: string to show when widget's value is null
.. seealso:: :py:func:`nullValue`
%End
QString nullValue() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the string used for representating null values in the widget.
.. seealso:: :py:func:`setNullValue`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`isNull`
%End
void setShowSearchIcon( bool visible );
%Docstring
2017-12-15 10:36:55 -04:00
Define if a search icon shall be shown on the left of the image
when no text is entered
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param visible: set to false to hide the search icon
.. versionadded:: 3.0
%End
bool showSearchIcon() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns if a search icon shall be shown on the left of the image
when no text is entered
.. versionadded:: 3.0
%End
void setDefaultValue( const QString &defaultValue );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the default value for the widget. The default value is a value
which the widget will be reset to if it is cleared and the clearMode()
is equal to ClearToDefault.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param defaultValue: default value
.. seealso:: :py:func:`defaultValue`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`clearMode`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
QString defaultValue() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the default value for the widget. The default value is a value
which the widget will be reset to if it is cleared and the clearMode()
is equal to ClearToDefault.
.. seealso:: :py:func:`setDefaultValue`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`clearMode`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
void setValue( const QString &value );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the current text for the widget with support for handling null values.
:param value: The text to set. If a null string is provided, the text shown in the
widget will be set to the current nullValue().
.. seealso:: :py:func:`value`
%End
2014-09-23 14:38:40 +02:00
QString value() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the text of this edit with support for handling null values. If the text
in the widget matches the current nullValue() then the returned value will be
a null string.
:return: Current text (or null string if it matches the nullValue() property )
.. seealso:: :py:func:`setValue`
%End
2014-09-23 14:38:40 +02:00
bool isNull() const;
%Docstring
2017-12-15 10:36:55 -04:00
Determine if the current text represents null.
:return: True if the widget's value is null.
.. seealso:: :py:func:`nullValue`
%End
2014-05-27 23:22:50 +02:00
bool showSpinner() const;
%Docstring
2017-12-15 10:36:55 -04:00
Show a spinner icon. This can be used for search boxes to indicate that
something is going on in the background.
.. versionadded:: 3.0
%End
void setShowSpinner( bool showSpinner );
%Docstring
2017-12-15 10:36:55 -04:00
Show a spinner icon. This can be used for search boxes to indicate that
something is going on in the background.
.. versionadded:: 3.0
%End
bool selectOnFocus() const;
%Docstring
2017-12-15 10:36:55 -04:00
Will select all text when this widget receives the focus.
.. versionadded:: 3.0
%End
void setSelectOnFocus( bool selectOnFocus );
%Docstring
2017-12-15 10:36:55 -04:00
Will select all text when this widget receives the focus.
.. versionadded:: 3.0
%End
public slots:
virtual void clearValue();
%Docstring
2017-12-15 10:36:55 -04:00
Clears the widget and resets it to the null value.
.. seealso:: :py:func:`nullValue`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
2013-06-23 16:00:16 +02:00
signals:
2013-06-23 16:00:16 +02:00
void cleared();
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the widget is cleared
.. seealso:: :py:func:`clearValue`
%End
2013-06-23 16:00:16 +02:00
void valueChanged( const QString &value );
%Docstring
2017-12-15 10:36:55 -04:00
Same as textChanged() but with support for null values.
2017-12-15 10:36:55 -04:00
:param value: The current text or null string if it matches the nullValue() property.
%End
2014-09-23 14:38:40 +02:00
void showSpinnerChanged();
%Docstring
2017-12-15 10:36:55 -04:00
Show a spinner icon. This can be used for search boxes to indicate that
something is going on in the background.
2017-10-25 00:47:07 +02:00
.. versionadded:: 3.0
%End
void selectOnFocusChanged();
%Docstring
2017-12-15 10:36:55 -04:00
Will select all text when this widget receives the focus.
2017-10-25 00:47:07 +02:00
.. versionadded:: 3.0
%End
protected:
virtual void focusInEvent( QFocusEvent *e );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsfilterlineedit.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/