From 838dbef3c0d337abb91200abe7c4bf4c032f59ea Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 17 Sep 2019 14:41:56 +0200 Subject: [PATCH 1/2] [layer tree] dedicated method in QgisApp to determine insertion point and create bindings to get the current insertion point in QgisInterface --- .../qgslayertreeregistrybridge.sip.in | 20 +++++++++++++- .../gui/auto_generated/qgisinterface.sip.in | 9 +++++++ src/app/qgisapp.cpp | 17 ++++++++---- src/app/qgisapp.h | 3 +++ src/app/qgisappinterface.cpp | 5 ++++ src/app/qgisappinterface.h | 2 ++ .../layertree/qgslayertreeregistrybridge.cpp | 14 ++++++---- .../layertree/qgslayertreeregistrybridge.h | 27 ++++++++++++++++--- src/gui/qgisinterface.h | 10 +++++++ src/plugins/coordinate_capture/CMakeLists.txt | 1 + src/plugins/evis/CMakeLists.txt | 1 + src/plugins/geometry_checker/CMakeLists.txt | 1 + src/plugins/georeferencer/CMakeLists.txt | 1 + src/plugins/gps_importer/CMakeLists.txt | 1 + src/plugins/topology/CMakeLists.txt | 1 + src/providers/delimitedtext/CMakeLists.txt | 1 + tests/src/app/CMakeLists.txt | 1 + 17 files changed, 101 insertions(+), 14 deletions(-) diff --git a/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in b/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in index 641d15cb81c..b81ce011736 100644 --- a/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in +++ b/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in @@ -30,6 +30,14 @@ from the map layer registry. #include "qgslayertreeregistrybridge.h" %End public: + + struct InsertionPoint + { + InsertionPoint( QgsLayerTreeGroup *parent, int position ); + QgsLayerTreeGroup *parent; + int position; + }; + explicit QgsLayerTreeRegistryBridge( QgsLayerTreeGroup *root, QgsProject *project, QObject *parent /TransferThis/ = 0 ); %Docstring Create the instance that synchronizes given project with a layer tree root @@ -41,10 +49,20 @@ Create the instance that synchronizes given project with a layer tree root void setNewLayersVisible( bool enabled ); bool newLayersVisible() const; - void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ); + void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ) /Deprecated/; %Docstring 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 +%End + + void setLayerInsertionPoint( const InsertionPoint &insertionPoint ); +%Docstring +Set where the new layers should be inserted - can be used to follow current selection. +By default it is root group with zero index. + +.. versionadded:: 3.10 %End signals: diff --git a/python/gui/auto_generated/qgisinterface.sip.in b/python/gui/auto_generated/qgisinterface.sip.in index 59b67e2dd71..94ad6cd750a 100644 --- a/python/gui/auto_generated/qgisinterface.sip.in +++ b/python/gui/auto_generated/qgisinterface.sip.in @@ -632,6 +632,15 @@ Take screenshots for user documentation .. versionadded:: 3.4 %End + virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0; +%Docstring +Returns the insertion group with its insertion index +In Python, returns a tuple (insertionGroup, insertionIndex) + +.. versionadded:: 3.10 +%End + + public slots: // TODO: do these functions really need to be slots? diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 36f765d225a..4eb3fa49d47 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -4245,25 +4245,33 @@ void QgisApp::setupLayerTreeViewFromSettings() void QgisApp::updateNewLayerInsertionPoint() +{ + QgsLayerTreeRegistryBridge::InsertionPoint insertionPoint = layerTreeInsertionPoint(); + QgsProject::instance()->layerTreeRegistryBridge()->setLayerInsertionPoint( insertionPoint ); +} + +QgsLayerTreeRegistryBridge::InsertionPoint QgisApp::layerTreeInsertionPoint() const { // defaults QgsLayerTreeGroup *insertGroup = mLayerTreeView->layerTreeModel()->rootGroup(); QModelIndex current = mLayerTreeView->currentIndex(); + int index = 0; if ( current.isValid() ) { index = current.row(); - if ( QgsLayerTreeNode *currentNode = mLayerTreeView->currentNode() ) + QgsLayerTreeNode *currentNode = mLayerTreeView->currentNode(); + if ( currentNode ) { // if the insertion point is actually a group, insert new layers into the group if ( QgsLayerTree::isGroup( currentNode ) ) { // if the group is embedded go to the first non-embedded group, at worst the top level item QgsLayerTreeGroup *insertGroup = QgsLayerTreeUtils::firstGroupWithoutCustomProperty( QgsLayerTree::toGroup( currentNode ), QStringLiteral( "embedded" ) ); - QgsProject::instance()->layerTreeRegistryBridge()->setLayerInsertionPoint( insertGroup, 0 ); - return; + + return QgsLayerTreeRegistryBridge::InsertionPoint( insertGroup, 0 ); } // otherwise just set the insertion point in front of the current node @@ -4278,8 +4286,7 @@ void QgisApp::updateNewLayerInsertionPoint() } } } - - QgsProject::instance()->layerTreeRegistryBridge()->setLayerInsertionPoint( insertGroup, index ); + return QgsLayerTreeRegistryBridge::InsertionPoint( insertGroup, index ); } void QgisApp::autoSelectAddedLayer( QList layers ) diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 46ff796509b..19d3c2a5f76 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -153,6 +153,7 @@ class QgsNetworkRequestParameters; #include "qgsrecentprojectsitemsmodel.h" #include "qgsraster.h" #include "qgsrasterminmaxorigin.h" +#include "qgslayertreeregistrybridge.h" #include "qgsmaplayeractionregistry.h" #include "qgsoptionswidgetfactory.h" #include "qgsattributetablefiltermodel.h" @@ -712,6 +713,8 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow */ void takeAppScreenShots( const QString &saveDirectory, const int categories = 0 ); + QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() const; + public slots: //! save current vector layer QString saveAsFile( QgsMapLayer *layer = nullptr, bool onlySelected = false, bool defaultToAddToMap = true ); diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index 71bed1bf253..a872cae8c80 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -801,3 +801,8 @@ QgsBrowserGuiModel *QgisAppInterface::browserModel() { return qgis->mBrowserModel; } + +QgsLayerTreeRegistryBridge::InsertionPoint QgisAppInterface::layerTreeInsertionPoint() +{ + return qgis->layerTreeInsertionPoint(); +} diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index c27ce43da7f..8da50d7aad4 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -279,6 +279,8 @@ class APP_EXPORT QgisAppInterface : public QgisInterface bool askForDatumTransform( QgsCoordinateReferenceSystem sourceCrs, QgsCoordinateReferenceSystem destinationCrs ) override; void takeAppScreenShots( const QString &saveDirectory, const int categories = 0 ) override; QgsBrowserGuiModel *browserModel() override; + QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() override; + private slots: diff --git a/src/core/layertree/qgslayertreeregistrybridge.cpp b/src/core/layertree/qgslayertreeregistrybridge.cpp index dc59ae6a17e..a7dd727f732 100644 --- a/src/core/layertree/qgslayertreeregistrybridge.cpp +++ b/src/core/layertree/qgslayertreeregistrybridge.cpp @@ -27,8 +27,7 @@ QgsLayerTreeRegistryBridge::QgsLayerTreeRegistryBridge( QgsLayerTreeGroup *root, , mRegistryRemovingLayers( false ) , mEnabled( true ) , mNewLayersVisible( true ) - , mInsertionPointGroup( root ) - , mInsertionPointIndex( 0 ) + , mInsertionPoint( root, 0 ) { connect( mProject, &QgsProject::legendLayersAdded, this, &QgsLayerTreeRegistryBridge::layersAdded ); connect( mProject, static_cast < void ( QgsProject::* )( const QStringList & ) >( &QgsProject::layersWillBeRemoved ), this, &QgsLayerTreeRegistryBridge::layersWillBeRemoved ); @@ -39,8 +38,13 @@ QgsLayerTreeRegistryBridge::QgsLayerTreeRegistryBridge( QgsLayerTreeGroup *root, void QgsLayerTreeRegistryBridge::setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ) { - mInsertionPointGroup = parentGroup; - mInsertionPointIndex = index; + mInsertionPoint.parent = parentGroup; + mInsertionPoint.position = index; +} + +void QgsLayerTreeRegistryBridge::setLayerInsertionPoint( const InsertionPoint &insertionPoint ) +{ + mInsertionPoint = insertionPoint; } void QgsLayerTreeRegistryBridge::layersAdded( const QList &layers ) @@ -67,7 +71,7 @@ void QgsLayerTreeRegistryBridge::layersAdded( const QList &layers } // add new layers to the right place - mInsertionPointGroup->insertChildNodes( mInsertionPointIndex, nodes ); + mInsertionPoint.parent->insertChildNodes( mInsertionPoint.position, nodes ); // tell other components that layers have been added - this signal is used in QGIS to auto-select the first layer emit addedLayersToLayerTree( layers ); diff --git a/src/core/layertree/qgslayertreeregistrybridge.h b/src/core/layertree/qgslayertreeregistrybridge.h index 223e23e75e6..258304b4e38 100644 --- a/src/core/layertree/qgslayertreeregistrybridge.h +++ b/src/core/layertree/qgslayertreeregistrybridge.h @@ -45,6 +45,20 @@ class CORE_EXPORT QgsLayerTreeRegistryBridge : public QObject { Q_OBJECT public: + + /** + * A structure to define the insertion point to the layer tree + * \since QGIS 3.10 + */ + struct InsertionPoint + { + InsertionPoint( QgsLayerTreeGroup *parent, int position ) + : parent( parent ), position( position ) {} + + QgsLayerTreeGroup *parent; + int position; + }; + //! Create the instance that synchronizes given project with a layer tree root explicit QgsLayerTreeRegistryBridge( QgsLayerTreeGroup *root, QgsProject *project, QObject *parent SIP_TRANSFERTHIS = nullptr ); @@ -57,8 +71,16 @@ 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 */ - void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ); + Q_DECL_DEPRECATED void setLayerInsertionPoint( QgsLayerTreeGroup *parentGroup, int index ) SIP_DEPRECATED; + + /** + * Set where the new layers should be inserted - can be used to follow current selection. + * By default it is root group with zero index. + * \since QGIS 3.10 + */ + void setLayerInsertionPoint( const InsertionPoint &insertionPoint ); signals: @@ -85,8 +107,7 @@ class CORE_EXPORT QgsLayerTreeRegistryBridge : public QObject bool mEnabled; bool mNewLayersVisible; - QgsLayerTreeGroup *mInsertionPointGroup = nullptr; - int mInsertionPointIndex; + InsertionPoint mInsertionPoint; }; #endif // QGSLAYERTREEREGISTRYBRIDGE_H diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 0ea6f924940..60433e39d35 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -25,6 +25,7 @@ #include "qgis_sip.h" #include "qgis_gui.h" #include "qgscoordinatereferencesystem.h" +#include "qgslayertreeregistrybridge.h" class QAction; class QDialog; @@ -42,6 +43,7 @@ class QgsLayoutCustomDropHandler; class QgsFeature; class QgsLayerTreeMapCanvasBridge; class QgsLayerTreeView; +class QgsLayerTreeGroup; class QgsLayout; class QgsMasterLayoutInterface; class QgsLayoutDesignerInterface; @@ -561,6 +563,14 @@ 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) + * \since QGIS 3.10 + */ + virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0; + + public slots: // TODO: do these functions really need to be slots? /* Exposed functions */ diff --git a/src/plugins/coordinate_capture/CMakeLists.txt b/src/plugins/coordinate_capture/CMakeLists.txt index aa64dfe8594..1ef4685fc67 100644 --- a/src/plugins/coordinate_capture/CMakeLists.txt +++ b/src/plugins/coordinate_capture/CMakeLists.txt @@ -31,6 +31,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/raster ${CMAKE_SOURCE_DIR}/src/gui diff --git a/src/plugins/evis/CMakeLists.txt b/src/plugins/evis/CMakeLists.txt index 6eda7f6aa2d..c71a720ce5a 100644 --- a/src/plugins/evis/CMakeLists.txt +++ b/src/plugins/evis/CMakeLists.txt @@ -61,6 +61,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/raster ${CMAKE_SOURCE_DIR}/src/plugins diff --git a/src/plugins/geometry_checker/CMakeLists.txt b/src/plugins/geometry_checker/CMakeLists.txt index 982ef23ad2a..7fa6371fdcf 100644 --- a/src/plugins/geometry_checker/CMakeLists.txt +++ b/src/plugins/geometry_checker/CMakeLists.txt @@ -51,6 +51,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/symbology ${CMAKE_SOURCE_DIR}/src/core/providers/ogr diff --git a/src/plugins/georeferencer/CMakeLists.txt b/src/plugins/georeferencer/CMakeLists.txt index 4b8afd12c7d..c8f856cad9d 100644 --- a/src/plugins/georeferencer/CMakeLists.txt +++ b/src/plugins/georeferencer/CMakeLists.txt @@ -77,6 +77,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/raster ${CMAKE_SOURCE_DIR}/src/core/layout diff --git a/src/plugins/gps_importer/CMakeLists.txt b/src/plugins/gps_importer/CMakeLists.txt index abc5bca6f91..00773f35b66 100644 --- a/src/plugins/gps_importer/CMakeLists.txt +++ b/src/plugins/gps_importer/CMakeLists.txt @@ -38,6 +38,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/gps ${CMAKE_SOURCE_DIR}/src/gui diff --git a/src/plugins/topology/CMakeLists.txt b/src/plugins/topology/CMakeLists.txt index fd1032033de..e050e4abcdc 100644 --- a/src/plugins/topology/CMakeLists.txt +++ b/src/plugins/topology/CMakeLists.txt @@ -45,6 +45,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/core/raster ${CMAKE_SOURCE_DIR}/src/gui diff --git a/src/providers/delimitedtext/CMakeLists.txt b/src/providers/delimitedtext/CMakeLists.txt index a1c683a41d1..817a9b964e7 100644 --- a/src/providers/delimitedtext/CMakeLists.txt +++ b/src/providers/delimitedtext/CMakeLists.txt @@ -30,6 +30,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/metadata ${CMAKE_SOURCE_DIR}/src/gui ${CMAKE_SOURCE_DIR}/external diff --git a/tests/src/app/CMakeLists.txt b/tests/src/app/CMakeLists.txt index a828f8595b7..3e2e01cc23b 100644 --- a/tests/src/app/CMakeLists.txt +++ b/tests/src/app/CMakeLists.txt @@ -8,6 +8,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/core/auth ${CMAKE_SOURCE_DIR}/src/core/expression ${CMAKE_SOURCE_DIR}/src/core/geometry + ${CMAKE_SOURCE_DIR}/src/core/layertree ${CMAKE_SOURCE_DIR}/src/core/layout ${CMAKE_SOURCE_DIR}/src/core/locator ${CMAKE_SOURCE_DIR}/src/core/metadata From 13119193baeaab0824aaa37d38f4480ceffb7a9b Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 19 Sep 2019 09:05:27 +0200 Subject: [PATCH 2/2] fix API doc and init values --- .../layertree/qgslayertreeregistrybridge.sip.in | 5 ++++- python/gui/auto_generated/qgisinterface.sip.in | 4 ++-- src/core/layertree/qgslayertreeregistrybridge.h | 10 ++++++---- src/gui/qgisinterface.h | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in b/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in index b81ce011736..9d985b5ffb5 100644 --- a/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in +++ b/python/core/auto_generated/layertree/qgslayertreeregistrybridge.sip.in @@ -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 ); diff --git a/python/gui/auto_generated/qgisinterface.sip.in b/python/gui/auto_generated/qgisinterface.sip.in index 94ad6cd750a..648ed080511 100644 --- a/python/gui/auto_generated/qgisinterface.sip.in +++ b/python/gui/auto_generated/qgisinterface.sip.in @@ -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 diff --git a/src/core/layertree/qgslayertreeregistrybridge.h b/src/core/layertree/qgslayertreeregistrybridge.h index 258304b4e38..899d6cdef37 100644 --- a/src/core/layertree/qgslayertreeregistrybridge.h +++ b/src/core/layertree/qgslayertreeregistrybridge.h @@ -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; diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index 60433e39d35..bcc4b545633 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -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;