mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-11 00:04:27 -04:00
* Save more data to QML * Virtual fields * Map tips * Display expression * Read only flag * Streamline expression context generation Whenever an object is able to generate an expression context it implements the method createExpressionContext() declared in QgsExpressionContextGenerator. This makes a cleaner API and allows using QgsFieldExpressionWidget and QgsDataDefinedButton from python because standard OO programming approaches are used instead of callbacks and void pointers. * Colorize output of doc and sip tests * Fix build * Fix sip complaints * Fix rebase problems * Workaround failing bindings test
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
/***************************************************************************
|
|
qgsexpressioncontextgenerator.sip - QgsExpressionContextGenerator
|
|
|
|
---------------------
|
|
begin : 1.8.2016
|
|
copyright : (C) 2016 by Matthias Kuhn
|
|
email : matthias@opengis.ch
|
|
***************************************************************************
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
***************************************************************************/
|
|
/**
|
|
* \ingroup core
|
|
* Abstract interface for generating an expression context.
|
|
*
|
|
* You need to implement this interface in a class and register this class with
|
|
* QgsFieldExpressionWidget::registerExpressionGenerator().
|
|
*
|
|
* Whenever this widget requires an expression context it will call the createExpressionContext()
|
|
* method to get a context.
|
|
*
|
|
* @note added in QGIS 3.0
|
|
*/
|
|
|
|
class QgsExpressionContextGenerator
|
|
{
|
|
%TypeHeaderCode
|
|
#include "qgsexpressioncontextgenerator.h"
|
|
%End
|
|
|
|
public:
|
|
/**
|
|
* This method needs to be reimplemented in all classes which implement this interface
|
|
* and return an expression context.
|
|
*/
|
|
virtual QgsExpressionContext createExpressionContext() const = 0;
|
|
};
|