QGIS/python/core/qgsactionscoperegistry.sip

85 lines
2.5 KiB
Plaintext
Raw Normal View History

/***************************************************************************
qgsactionscoperegistry.h - QgsActionScopeRegistry
---------------------
begin : 1.11.2016
copyright : (C) 2016 by Matthias Kuhn
email : matthias@opengis.ch
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/** \ingroup core
* The action scope registry is an application wide registry that
* contains a list of available action scopes.
* Some scopes are available by default, additional ones can be registered
* at runtime by plugins or custom applications.
*
* To get access use the QgsApplication:
*
* ```
* QgsApplication::actionScopeRegistry()
* ```
*
* @note Added in QGIS 3.0
*/
class QgsActionScopeRegistry : QObject
{
%TypeHeaderCode
#include "qgsactionscoperegistry.h"
%End
public:
2016-11-03 19:11:51 +01:00
/**
* Create a new QgsActionScopeRegistry.
* QGIS already creates a central registry. You will normally
2016-12-15 15:25:29 +01:00
* want to use QgsApplication::actionScopeRegistry() to get access
2016-11-03 19:11:51 +01:00
* to that one instead.
*
* @note Added in QGIS 3.0
*/
explicit QgsActionScopeRegistry( QObject* parent = nullptr );
/**
* Get all registered action scopes.
2016-11-03 19:11:51 +01:00
*
* @note Added in QGIS 3.0
*/
QSet<QgsActionScope> actionScopes() const;
/**
* Register an additional action scope.
*
* @note Added in QGIS 3.0
*/
void registerActionScope( const QgsActionScope& actionScope );
/**
* Unregister an additional action scope.
*
* @note Added in QGIS 3.0
*/
void unregisterActionScope( const QgsActionScope& actionScope );
/**
* Get an action scope by its id.
*
* @note Added in QGIS 3.0
*/
QgsActionScope actionScope( const QString& id );
signals:
/**
* Emitted whenever a new action scope is registered or an action scope
* is unregistered.
*
* @note Added in QGIS 3.0
*/
void actionScopesChanged();
};