mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			93 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
		
			3.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/layertree/qgslayertreemapcanvasbridge.h                      *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsLayerTreeMapCanvasBridge : QObject
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Takes care of updates of layer sets for a :py:class:`QgsMapCanvas` from
 | 
						|
a layer tree.
 | 
						|
 | 
						|
The class listens to the updates in the layer tree and updates the list
 | 
						|
of layers for rendering whenever some layers are added, removed, or
 | 
						|
their visibility changes.
 | 
						|
 | 
						|
The update of layers is not done immediately - it is postponed, so a
 | 
						|
series of updates to the layer tree will trigger just one update of
 | 
						|
canvas layers.
 | 
						|
 | 
						|
Also allows the client to override the default order of layers. This is
 | 
						|
useful in advanced cases where the grouping in layer tree should be
 | 
						|
independent from the actual order in the canvas.
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgslayertreemapcanvasbridge.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
    QgsLayerTreeMapCanvasBridge( QgsLayerTree *root, QgsMapCanvas *canvas, QObject *parent /TransferThis/ = 0 );
 | 
						|
%Docstring
 | 
						|
Constructor: does not take ownership of the layer tree nor canvas
 | 
						|
%End
 | 
						|
 | 
						|
    QgsLayerTree *rootGroup() const;
 | 
						|
    QgsMapCanvas *mapCanvas() const;
 | 
						|
 | 
						|
    void setOverviewCanvas( QgsMapOverviewCanvas *overviewCanvas );
 | 
						|
%Docstring
 | 
						|
Associates overview canvas with the bridge, so the overview will be
 | 
						|
updated whenever main canvas is updated
 | 
						|
 | 
						|
.. versionadded:: 3.6
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    void setOvervewCanvas( QgsMapOverviewCanvas *overviewCanvas ) /Deprecated="Since 3.40. Use setOverviewCanvas() instead."/; // TODO QGIS 4.0 remove
 | 
						|
%MethodCode
 | 
						|
    sipCpp->setOverviewCanvas( a0 );
 | 
						|
%End
 | 
						|
 | 
						|
    QgsMapOverviewCanvas *overviewCanvas() const;
 | 
						|
%Docstring
 | 
						|
Returns associated overview canvas (may be ``None``)
 | 
						|
%End
 | 
						|
 | 
						|
    void setAutoSetupOnFirstLayer( bool enabled );
 | 
						|
%Docstring
 | 
						|
if enabled, will automatically set full canvas extent and destination
 | 
						|
CRS + map units when first layer(s) are added
 | 
						|
%End
 | 
						|
    bool autoSetupOnFirstLayer() const;
 | 
						|
 | 
						|
    void setCanvasLayers();
 | 
						|
%Docstring
 | 
						|
force update of canvas layers from the layer tree. Normally this should
 | 
						|
not be needed to be called.
 | 
						|
%End
 | 
						|
 | 
						|
  signals:
 | 
						|
 | 
						|
    void canvasLayersChanged( const QList<QgsMapLayer *> &layers );
 | 
						|
%Docstring
 | 
						|
Emitted when the set of layers (or order of layers) visible in the
 | 
						|
canvas changes.
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/layertree/qgslayertreemapcanvasbridge.h                      *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 | 
						|
 ************************************************************************/
 |