Add userProfileManager in QgisInterface (iface)

Fixes #48337
This commit is contained in:
Yoann Quenach de Quivillic 2023-01-06 10:46:50 +01:00
parent 389a8edc72
commit f6c0bda4c5
4 changed files with 20 additions and 0 deletions

View File

@ -840,6 +840,13 @@ Returns the insertion point.
This represents the current layer tree group and index where newly added map layers should be inserted into. This represents the current layer tree group and index where newly added map layers should be inserted into.
.. versionadded:: 3.10 .. versionadded:: 3.10
%End
virtual QgsUserProfileManager *userProfileManager() = 0;
%Docstring
Returns a reference to the user profile manager
.. versionadded:: 3.30
%End %End
public slots: // TODO: do these functions really need to be slots? public slots: // TODO: do these functions really need to be slots?

View File

@ -903,3 +903,8 @@ QList<QgsMapDecoration *> QgisAppInterface::activeDecorations()
return qgis->activeDecorations(); return qgis->activeDecorations();
} }
QgsUserProfileManager *QgisAppInterface::userProfileManager()
{
return qgis->userProfileManager();
}

View File

@ -308,6 +308,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() override; QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() override;
void setGpsPanelConnection( QgsGpsConnection *connection ) override; void setGpsPanelConnection( QgsGpsConnection *connection ) override;
QList<QgsMapDecoration *> activeDecorations() override; QList<QgsMapDecoration *> activeDecorations() override;
QgsUserProfileManager *userProfileManager() override;
private slots: private slots:

View File

@ -70,6 +70,7 @@ class QgsDevToolWidgetFactory;
class QgsGpsConnection; class QgsGpsConnection;
class QgsApplicationExitBlockerInterface; class QgsApplicationExitBlockerInterface;
class QgsAbstractMapToolHandler; class QgsAbstractMapToolHandler;
class QgsUserProfileManager;
/** /**
* \ingroup gui * \ingroup gui
@ -743,6 +744,12 @@ class GUI_EXPORT QgisInterface : public QObject
*/ */
virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0; virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0;
/**
* Returns a reference to the user profile manager
* \since QGIS 3.30
*/
virtual QgsUserProfileManager *userProfileManager() = 0;
public slots: // TODO: do these functions really need to be slots? public slots: // TODO: do these functions really need to be slots?
/* Exposed functions */ /* Exposed functions */