QGIS/python/gui/qgsfilterlineedit.sip
Nyall Dawson c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00

54 lines
1.3 KiB
Plaintext

/** LineEdit with builtin clear button
*/
class QgsFilterLineEdit : QLineEdit
{
%TypeHeaderCode
#include <qgsfilterlineedit.h>
%End
public:
QgsFilterLineEdit( QWidget* parent /TransferThis/ = 0, const QString& nullValue = QString::null );
void setNullValue( const QString& nullValue );
QString nullValue() const;
/**
* Sets the current text with NULL support
*
* @param value The text to set. If a Null string is provided, the text will match the nullValue.
*/
void setValue( const QString& value );
/**
* Returns the text of this edit with NULL support
*
* @return Current text (Null string if it matches the nullValue property )
*/
QString value() const;
/**
* Determine if the current text represents Null.
*
* @return True if the value is Null.
*/
bool isNull() const;
signals:
void cleared();
/**
* Same as textChanged(const QString& ) but with support for Null values.
*
* @param value The current text or Null string if it matches the nullValue property.
*/
void valueChanged( const QString& value );
protected:
void mousePressEvent( QMouseEvent* e );
void focusInEvent( QFocusEvent* e );
void resizeEvent( QResizeEvent* e );
void changeEvent( QEvent* e );
void paintEvent( QPaintEvent* e );
};