mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Dox
This commit is contained in:
parent
8caecbb85c
commit
45d856e903
@ -47,7 +47,7 @@ level group containing recently used algorithms.
|
||||
%Docstring
|
||||
Sets the processing ``registry`` associated with the view.
|
||||
|
||||
If \recentLog is specified then it will be used to create a "Recently used" top
|
||||
If ``recentLog`` is specified then it will be used to create a "Recently used" top
|
||||
level group containing recently used algorithms.
|
||||
%End
|
||||
|
||||
|
@ -138,10 +138,13 @@ void QgsProcessingToolboxModel::rebuild()
|
||||
repopulateRecentAlgorithms( true );
|
||||
}
|
||||
|
||||
const QList< QgsProcessingProvider * > providers = mRegistry->providers();
|
||||
for ( QgsProcessingProvider *provider : providers )
|
||||
if ( mRegistry )
|
||||
{
|
||||
addProvider( provider );
|
||||
const QList< QgsProcessingProvider * > providers = mRegistry->providers();
|
||||
for ( QgsProcessingProvider *provider : providers )
|
||||
{
|
||||
addProvider( provider );
|
||||
}
|
||||
}
|
||||
endResetModel();
|
||||
}
|
||||
@ -160,6 +163,12 @@ void QgsProcessingToolboxModel::repopulateRecentAlgorithms( bool resetting )
|
||||
endRemoveRows();
|
||||
}
|
||||
|
||||
if ( !mRegistry )
|
||||
{
|
||||
emit recentAlgorithmAdded();
|
||||
return;
|
||||
}
|
||||
|
||||
const QStringList recentAlgIds = mRecentLog->recentAlgorithmIds();
|
||||
QList< const QgsProcessingAlgorithm * > recentAlgorithms;
|
||||
recentAlgorithms.reserve( recentAlgIds.count() );
|
||||
@ -196,6 +205,9 @@ void QgsProcessingToolboxModel::repopulateRecentAlgorithms( bool resetting )
|
||||
|
||||
void QgsProcessingToolboxModel::providerAdded( const QString &id )
|
||||
{
|
||||
if ( !mRegistry )
|
||||
return;
|
||||
|
||||
QgsProcessingProvider *provider = mRegistry->providerById( id );
|
||||
if ( !provider )
|
||||
return;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "qgis_gui.h"
|
||||
#include <QAbstractItemModel>
|
||||
#include <QSortFilterProxyModel>
|
||||
#include <QPointer>
|
||||
|
||||
class QgsProcessingRegistry;
|
||||
class QgsProcessingProvider;
|
||||
@ -375,8 +376,8 @@ class GUI_EXPORT QgsProcessingToolboxModel : public QAbstractItemModel
|
||||
|
||||
private:
|
||||
|
||||
QgsProcessingRegistry *mRegistry = nullptr;
|
||||
QgsProcessingRecentAlgorithmLog *mRecentLog = nullptr;
|
||||
QPointer< QgsProcessingRegistry > mRegistry;
|
||||
QPointer< QgsProcessingRecentAlgorithmLog > mRecentLog;
|
||||
|
||||
std::unique_ptr< QgsProcessingToolboxModelGroupNode > mRootNode;
|
||||
QgsProcessingToolboxModelRecentNode *mRecentNode = nullptr;
|
||||
|
@ -56,7 +56,7 @@ class GUI_EXPORT QgsProcessingToolboxTreeView : public QTreeView
|
||||
/**
|
||||
* Sets the processing \a registry associated with the view.
|
||||
*
|
||||
* If \recentLog is specified then it will be used to create a "Recently used" top
|
||||
* If \a recentLog is specified then it will be used to create a "Recently used" top
|
||||
* level group containing recently used algorithms.
|
||||
*/
|
||||
void setRegistry(
|
||||
|
Loading…
x
Reference in New Issue
Block a user