mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-03 00:14:12 -05:00 
			
		
		
		
	And make sipify handle this nicely. This means that all our non-flag style enums correctly map across to IntFlag python enums on Qt 6, fixing issues with negative enum values for these and providing a better match for the original c++ enum.
		
			
				
	
	
		
			149 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			149 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgsstoredexpressionmanager.h                                *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
%ModuleHeaderCode
 | 
						|
#include <qgsstoredexpressionmanager.h>
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
class QgsStoredExpression
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Stored expression containing name, content (expression text) and a category tag.
 | 
						|
 | 
						|
.. versionadded:: 3.10
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsstoredexpressionmanager.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    enum Category
 | 
						|
    {
 | 
						|
      FilterExpression,
 | 
						|
      DefaultValueExpression,
 | 
						|
      All
 | 
						|
    };
 | 
						|
 | 
						|
 | 
						|
    QString id;
 | 
						|
    QString name;
 | 
						|
    QString expression;
 | 
						|
    Category tag;
 | 
						|
};
 | 
						|
 | 
						|
class QgsStoredExpressionManager : QObject
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Manages stored expressions regarding creation, modification and storing in the project
 | 
						|
 | 
						|
.. versionadded:: 3.10
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsstoredexpressionmanager.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsStoredExpressionManager();
 | 
						|
%Docstring
 | 
						|
Constructor for QgsStoredExpressionManager
 | 
						|
%End
 | 
						|
 | 
						|
    QString addStoredExpression( const QString &name, const QString &expression, const QgsStoredExpression::Category &tag =  QgsStoredExpression::Category::FilterExpression );
 | 
						|
%Docstring
 | 
						|
Adds an expression to the list
 | 
						|
 | 
						|
:param name: optional name of the expression
 | 
						|
:param expression: expression text
 | 
						|
:param tag: category of the expression use case - default FilterExpression
 | 
						|
 | 
						|
:return: generated id
 | 
						|
%End
 | 
						|
 | 
						|
    void removeStoredExpression( const QString &id );
 | 
						|
%Docstring
 | 
						|
Removes an expression to the list
 | 
						|
 | 
						|
:param id: id of the expression as identification
 | 
						|
%End
 | 
						|
 | 
						|
    void updateStoredExpression( const QString &id, const QString &name, const QString &expression, const  QgsStoredExpression::Category &tag );
 | 
						|
%Docstring
 | 
						|
Updates an expression by ``id``.
 | 
						|
 | 
						|
:param id: id of the expression as identification
 | 
						|
:param name: new name of the expression
 | 
						|
:param expression: new expression text
 | 
						|
:param tag: new category of the expression use case
 | 
						|
%End
 | 
						|
 | 
						|
    void addStoredExpressions( const QList< QgsStoredExpression > &storedExpressions );
 | 
						|
%Docstring
 | 
						|
Appends a list of expressions to the existing list
 | 
						|
 | 
						|
:param storedExpressions: list of expressions and the optional name
 | 
						|
%End
 | 
						|
 | 
						|
    QList< QgsStoredExpression > storedExpressions( const  QgsStoredExpression::Category &tag = QgsStoredExpression::Category::All );
 | 
						|
%Docstring
 | 
						|
Returns the list of named expressions
 | 
						|
 | 
						|
:param tag: category of the expression use case - default all
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    QgsStoredExpression storedExpression( const QString &id ) const;
 | 
						|
%Docstring
 | 
						|
Returns an expression according to the ``id``
 | 
						|
 | 
						|
:param id: id of the expression as identification
 | 
						|
%End
 | 
						|
 | 
						|
    QgsStoredExpression findStoredExpressionByExpression( const QString &expression, const  QgsStoredExpression::Category &tag = QgsStoredExpression::Category::All ) const;
 | 
						|
%Docstring
 | 
						|
Returns an expression according to the ``expression`` text
 | 
						|
 | 
						|
:param expression: id of the expression as identification
 | 
						|
:param tag: category of the expression use case - default all
 | 
						|
%End
 | 
						|
 | 
						|
    void clearStoredExpressions();
 | 
						|
%Docstring
 | 
						|
Clears list of stored expressions
 | 
						|
%End
 | 
						|
 | 
						|
    bool writeXml( QDomNode &layerNode ) const;
 | 
						|
%Docstring
 | 
						|
Writes the stored expressions out in XML format
 | 
						|
%End
 | 
						|
 | 
						|
    bool readXml( const QDomNode &layerNode );
 | 
						|
%Docstring
 | 
						|
Reads the  stored expressions in in XML format
 | 
						|
%End
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
  public slots:
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/qgsstoredexpressionmanager.h                                *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |