mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
fix API doc and init values
This commit is contained in:
parent
838dbef3c0
commit
13119193ba
@ -34,6 +34,9 @@ from the map layer registry.
|
||||
struct InsertionPoint
|
||||
{
|
||||
InsertionPoint( QgsLayerTreeGroup *parent, int position );
|
||||
%Docstring
|
||||
Construcs an insertion point as layer tree group with its corresponding position.
|
||||
%End
|
||||
QgsLayerTreeGroup *parent;
|
||||
int position;
|
||||
};
|
||||
@ -54,7 +57,7 @@ Create the instance that synchronizes given project with a layer tree root
|
||||
Set where the new layers should be inserted - can be used to follow current selection.
|
||||
By default it is root group with zero index.
|
||||
|
||||
.. deprecated:: since QGIS 3.10
|
||||
.. deprecated:: since QGIS 3.10 use setLayerInsertionPoint( const InsertionPoint &insertionPoint ) instead
|
||||
%End
|
||||
|
||||
void setLayerInsertionPoint( const InsertionPoint &insertionPoint );
|
||||
|
@ -634,8 +634,8 @@ Take screenshots for user documentation
|
||||
|
||||
virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0;
|
||||
%Docstring
|
||||
Returns the insertion group with its insertion index
|
||||
In Python, returns a tuple (insertionGroup, insertionIndex)
|
||||
Returns the insertion point.
|
||||
This represents the current layer tree group and index where newly added map layers should be inserted into.
|
||||
|
||||
.. versionadded:: 3.10
|
||||
%End
|
||||
|
@ -47,16 +47,18 @@ class CORE_EXPORT QgsLayerTreeRegistryBridge : public QObject
|
||||
public:
|
||||
|
||||
/**
|
||||
* A structure to define the insertion point to the layer tree
|
||||
* A structure to define the insertion point to the layer tree.
|
||||
* This represents the current layer tree group and index where newly added map layers should be inserted into.
|
||||
* \since QGIS 3.10
|
||||
*/
|
||||
struct InsertionPoint
|
||||
{
|
||||
//! Construcs an insertion point as layer tree group with its corresponding position.
|
||||
InsertionPoint( QgsLayerTreeGroup *parent, int position )
|
||||
: parent( parent ), position( position ) {}
|
||||
|
||||
QgsLayerTreeGroup *parent;
|
||||
int position;
|
||||
QgsLayerTreeGroup *parent = nullptr;
|
||||
int position = 0;
|
||||
};
|
||||
|
||||
//! Create the instance that synchronizes given project with a layer tree root
|
||||
@ -71,7 +73,7 @@ class CORE_EXPORT QgsLayerTreeRegistryBridge : public QObject
|
||||
/**
|
||||
* Set where the new layers should be inserted - can be used to follow current selection.
|
||||
* By default it is root group with zero index.
|
||||
* \deprecated since QGIS 3.10
|
||||
* \deprecated since QGIS 3.10 use setLayerInsertionPoint( const InsertionPoint &insertionPoint ) instead
|
||||
*/
|
||||
Q_DECL_DEPRECATED void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ) SIP_DEPRECATED;
|
||||
|
||||
|
@ -564,8 +564,8 @@ class GUI_EXPORT QgisInterface : public QObject
|
||||
virtual void takeAppScreenShots( const QString &saveDirectory, const int categories = 0 ) {Q_UNUSED( saveDirectory ) Q_UNUSED( categories );}
|
||||
|
||||
/**
|
||||
* Returns the insertion group with its insertion index
|
||||
* In Python, returns a tuple (insertionGroup, insertionIndex)
|
||||
* Returns the insertion point.
|
||||
* This represents the current layer tree group and index where newly added map layers should be inserted into.
|
||||
* \since QGIS 3.10
|
||||
*/
|
||||
virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user