QGIS/python/gui/qgsexpressionbuilderdialog.sip

115 lines
3.5 KiB
Plaintext
Raw Normal View History

2017-05-23 14:44:34 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsexpressionbuilderdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-06-26 09:57:09 +02:00
class QgsExpressionBuilderDialog : QDialog
{
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A generic dialog for building expression strings
@remarks This class also shows an example on how to use QgsExpressionBuilderWidget
%End
2017-05-23 14:44:34 +02:00
%TypeHeaderCode
#include "qgsexpressionbuilderdialog.h"
%End
public:
2017-05-23 14:44:34 +02:00
QgsExpressionBuilderDialog( QgsVectorLayer *layer,
const QString &startText = QString(),
QWidget *parent /TransferThis/ = 0,
const QString &key = "generic",
const QgsExpressionContext &context = QgsExpressionContext() );
QgsExpressionBuilderWidget *expressionBuilder();
2017-05-23 14:44:34 +02:00
%Docstring
The builder widget that is used by the dialog
%End
void setExpressionText( const QString &text );
QString expressionText();
QgsExpressionContext expressionContext() const;
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the expression context for the dialog. The context is used for the expression
preview result and for populating the list of available functions and variables.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setExpressionContext`
2017-12-15 10:36:55 -04:00
2017-05-23 14:44:34 +02:00
.. versionadded:: 2.12
%End
void setExpressionContext( const QgsExpressionContext &context );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the expression context for the dialog. The context is used for the expression
preview result and for populating the list of available functions and variables.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param context: expression context
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`expressionContext`
2017-12-15 10:36:55 -04:00
2017-05-23 14:44:34 +02:00
.. versionadded:: 2.12
%End
void setGeomCalculator( const QgsDistanceArea &da );
2017-05-23 14:44:34 +02:00
%Docstring
Sets geometry calculator used in distance/area calculations.
%End
bool allowEvalErrors() const;
%Docstring
2017-12-15 10:36:55 -04:00
Allow accepting invalid expressions. This can be useful when we are not able to
provide an expression context of which we are sure it's completely populated.
.. versionadded:: 3.0
%End
void setAllowEvalErrors( bool allowEvalErrors );
%Docstring
2017-12-15 10:36:55 -04:00
Allow accepting expressions with evaluation errors. This can be useful when we are not able to
provide an expression context of which we are sure it's completely populated.
.. versionadded:: 3.0
%End
signals:
void allowEvalErrorsChanged();
%Docstring
2017-12-15 10:36:55 -04:00
Allow accepting expressions with evaluation errors. This can be useful when we are not able to
provide an expression context of which we are sure it's completely populated.
.. versionadded:: 3.0
2017-05-23 14:44:34 +02:00
%End
protected:
2017-05-23 14:44:34 +02:00
2013-06-23 16:00:16 +02:00
virtual void done( int r );
2017-05-23 14:44:34 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Is called when the dialog get accepted or rejected
Used to save geometry
2017-05-23 14:44:34 +02:00
2017-12-15 10:36:55 -04:00
:param r: result value (unused)
2017-05-23 14:44:34 +02:00
%End
2014-01-26 18:35:21 +01:00
virtual void accept();
2017-05-23 14:44:34 +02:00
};
2017-05-23 14:44:34 +02:00
2017-09-25 14:20:39 +10:00
2017-05-23 14:44:34 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsexpressionbuilderdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/