17#include "moc_qgsprocessingfavoritealgorithmmanager.cpp"
25QgsProcessingFavoriteAlgorithmManager::QgsProcessingFavoriteAlgorithmManager( QObject *parent )
28 mFavoriteAlgorithmIds = QgsProcessingFavoriteAlgorithmManager::settingsFavoriteAlgorithms->
value();
31QStringList QgsProcessingFavoriteAlgorithmManager::favoriteAlgorithmIds()
const
33 return mFavoriteAlgorithmIds;
36void QgsProcessingFavoriteAlgorithmManager::add(
const QString &
id )
38 if ( mFavoriteAlgorithmIds.contains(
id ) )
43 mFavoriteAlgorithmIds << id;
44 QgsProcessingFavoriteAlgorithmManager::settingsFavoriteAlgorithms->
setValue( mFavoriteAlgorithmIds );
48void QgsProcessingFavoriteAlgorithmManager::remove(
const QString &
id )
50 if ( !mFavoriteAlgorithmIds.contains(
id ) )
55 mFavoriteAlgorithmIds.removeAll(
id );
56 QgsProcessingFavoriteAlgorithmManager::settingsFavoriteAlgorithms->
setValue( mFavoriteAlgorithmIds );
60void QgsProcessingFavoriteAlgorithmManager::clear()
62 mFavoriteAlgorithmIds.clear();
63 QgsProcessingFavoriteAlgorithmManager::settingsFavoriteAlgorithms->
setValue( mFavoriteAlgorithmIds );
67bool QgsProcessingFavoriteAlgorithmManager::isFavorite(
const QString &
id )
69 return mFavoriteAlgorithmIds.contains(
id );
T value(const QString &dynamicKeyPart=QString()) const
Returns settings value.
bool setValue(const T &value, const QString &dynamicKeyPart=QString()) const
Set settings value.
A string list settings entry.
static QgsSettingsTreeNode * sTreeProcessing