mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			132 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			132 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsmaphittest.h                                             *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsMapHitTest
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| Class that runs a hit test with given map settings. Based on the hit test it returns which symbols
 | |
| will be visible on the map - this is useful for content based legend.
 | |
| 
 | |
| .. versionadded:: 2.6
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsmaphittest.h"
 | |
| %End
 | |
|   public:
 | |
|     typedef QMap<QString, QString> LayerFilterExpression;
 | |
| 
 | |
|     QgsMapHitTest( const QgsMapSettings &settings, const QgsGeometry &polygon = QgsGeometry(), const QgsMapHitTest::LayerFilterExpression &layerFilterExpression = QgsMapHitTest::LayerFilterExpression() );
 | |
| %Docstring
 | |
| 
 | |
| :param settings: Map settings used to evaluate symbols
 | |
| :param polygon: Polygon geometry to refine the hit test
 | |
| :param layerFilterExpression: Expression string for each layer id to evaluate in order to refine the symbol selection
 | |
| %End
 | |
| 
 | |
|     QgsMapHitTest( const QgsMapSettings &settings, const QgsMapHitTest::LayerFilterExpression &layerFilterExpression );
 | |
| %Docstring
 | |
| Constructor version used with only expressions to filter symbols (no extent or polygon intersection)
 | |
| %End
 | |
| 
 | |
|     QgsMapHitTest( const QgsLayerTreeFilterSettings &settings );
 | |
| %Docstring
 | |
| Constructor based off layer tree filter ``settings``.
 | |
| 
 | |
| .. versionadded:: 3.32
 | |
| %End
 | |
| 
 | |
|     void run();
 | |
| %Docstring
 | |
| Runs the map hit test
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     QMap<QString, QList<QString>> resultsPy() const /PyName=results/;
 | |
| %Docstring
 | |
| Returns the hit test results, which are a map of layer ID to
 | |
| visible symbol legend keys.
 | |
| 
 | |
| .. versionadded:: 3.32
 | |
| %End
 | |
| 
 | |
|     bool symbolVisible( QgsSymbol *symbol, QgsVectorLayer *layer ) const;
 | |
| %Docstring
 | |
| Tests whether a symbol is visible for a specified layer.
 | |
| 
 | |
| :param symbol: symbol to find
 | |
| :param layer: vector layer
 | |
| 
 | |
| .. seealso:: :py:func:`legendKeyVisible`
 | |
| 
 | |
| .. versionadded:: 2.12
 | |
| %End
 | |
| 
 | |
|     bool legendKeyVisible( const QString &ruleKey, QgsVectorLayer *layer ) const;
 | |
| %Docstring
 | |
| Tests whether a given legend key is visible for a specified layer.
 | |
| 
 | |
| :param ruleKey: legend rule key
 | |
| :param layer: vector layer
 | |
| 
 | |
| .. seealso:: :py:func:`symbolVisible`
 | |
| 
 | |
| .. versionadded:: 2.14
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| class QgsMapHitTestTask : QgsTask
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| Executes a QgsMapHitTest in a background thread.
 | |
| 
 | |
| .. versionadded:: 3.32
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgsmaphittest.h"
 | |
| %End
 | |
|   public:
 | |
| 
 | |
|     QgsMapHitTestTask( const QgsLayerTreeFilterSettings &settings );
 | |
| %Docstring
 | |
| Constructor for QgsMapHitTestTask, using the specified filter ``settings``.
 | |
| %End
 | |
| 
 | |
| 
 | |
| 
 | |
|     QMap<QString, QList<QString>> resultsPy() const /PyName=results/;
 | |
| %Docstring
 | |
| Returns the hit test results, which are a map of layer ID to
 | |
| visible symbol legend keys.
 | |
| %End
 | |
| 
 | |
|     virtual void cancel();
 | |
| 
 | |
| 
 | |
|   protected:
 | |
| 
 | |
|     virtual bool run();
 | |
| 
 | |
| 
 | |
| };
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/qgsmaphittest.h                                             *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |