QGIS/python/core/qgsoptionalexpression.sip

121 lines
3.0 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptionalexpression.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsOptionalExpression
{
2017-05-14 09:48:41 +02:00
%Docstring
An expression with an additional enabled flag.
This can be used for configuration options where an expression can be enabled
or disabled but when disabled it shouldn't lose it's information for the case
it gets re-enabled later on and a user shouldn't be force to redo the configuration.
.. versionadded:: 2.18
%End
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgsoptionalexpression.h"
%End
public:
2017-05-14 09:48:41 +02:00
QgsOptionalExpression();
2017-05-14 09:48:41 +02:00
%Docstring
Construct a default optional expression.
It will be disabled and with an empty expression.
%End
QgsOptionalExpression( const QgsExpression &expression );
2017-05-14 09:48:41 +02:00
%Docstring
Construct an optional expression with the provided expression.
It will be enabled.
%End
2017-05-14 09:48:41 +02:00
QgsOptionalExpression( const QgsExpression &expression, bool enabled );
%Docstring
Construct an optional expression with the provided expression and enabled state.
%End
2017-05-14 19:57:58 +02:00
2017-05-14 19:57:58 +02:00
int operator== ( const QgsOptionalExpression &other ) const;
%MethodCode
sipRes = *sipCpp == *a0;
2017-05-15 07:44:06 +02:00
%End
2017-05-14 19:57:58 +02:00
2017-05-15 07:44:06 +02:00
int __bool__() const;
%Docstring
:rtype: int
%End
2017-05-15 07:44:06 +02:00
%MethodCode
sipRes = sipCpp->enabled();
2017-05-15 07:44:06 +02:00
%End
2017-05-14 19:57:58 +02:00
bool enabled() const;
%Docstring
Check if this optional is enabled
.. versionadded:: 3.0
:rtype: bool
%End
2017-05-14 19:57:58 +02:00
void setEnabled( bool enabled );
%Docstring
Set if this optional is enabled
.. versionadded:: 3.0
%End
2017-05-14 19:57:58 +02:00
QgsExpression data() const;
%Docstring
Access the payload data
.. versionadded:: 3.0
:rtype: QgsExpression
%End
2017-05-14 19:57:58 +02:00
void setData( const QgsExpression &data );
%Docstring
Set the payload data
.. versionadded:: 3.0
%End
2017-05-14 19:57:58 +02:00
void writeXml( QDomElement &element );
2017-05-14 09:48:41 +02:00
%Docstring
Save the optional expression to the provided QDomElement.
The caller is responsible to pass an empty QDomElement and to append it to
a parent element.
.. versionadded:: 2.18
%End
void readXml( const QDomElement &element );
2017-05-14 09:48:41 +02:00
%Docstring
Read the optional expression from the provided QDomElement.
.. versionadded:: 2.18
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsoptionalexpression.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/