QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
Handles and tracks style items recently used in the QGIS GUI. More...
#include <qgsrecentstylehandler.h>
Public Member Functions | |
QgsRecentStyleHandler () | |
Creates a new recent style handler. | |
QgsRecentStyleHandler (const QgsRecentStyleHandler &other)=delete | |
~QgsRecentStyleHandler () | |
QgsRecentStyleHandler & | operator= (const QgsRecentStyleHandler &other)=delete |
void | pushRecentSymbol (const QString &identifier, QgsSymbol *symbol) |
Pushes a recently used symbol with the specified identifier. | |
QgsSymbol * | recentSymbol (const QString &identifier) const |
Returns a copy of the recently used symbol with the specified identifier, or nullptr if no symbol with the identifier exists. | |
template<class SymbolType > | |
std::unique_ptr< SymbolType > | recentSymbol (const QString &identifier) const |
Returns a copy of the recently used symbol with the specified identifier, or nullptr if no symbol with the identifier exists, and casts it to a particular symbol type. | |
Handles and tracks style items recently used in the QGIS GUI.
QgsRecentStyleHandler is not usually directly created, but rather accessed through QgsApplication::recentStyleHandler().
Definition at line 38 of file qgsrecentstylehandler.h.
|
default |
Creates a new recent style handler.
QgsRecentStyleHandler is not usually directly created, but rather accessed through QgsApplication::recentStyleHandler().
|
delete |
|
default |
|
delete |
void QgsRecentStyleHandler::pushRecentSymbol | ( | const QString & | identifier, |
QgsSymbol * | symbol | ||
) |
Pushes a recently used symbol with the specified identifier.
Ownership of symbol is transferred.
Definition at line 24 of file qgsrecentstylehandler.cpp.
QgsSymbol * QgsRecentStyleHandler::recentSymbol | ( | const QString & | identifier | ) | const |
Returns a copy of the recently used symbol with the specified identifier, or nullptr
if no symbol with the identifier exists.
Caller takes ownership of the returned object.
Definition at line 29 of file qgsrecentstylehandler.cpp.
|
inline |
Returns a copy of the recently used symbol with the specified identifier, or nullptr
if no symbol with the identifier exists, and casts it to a particular symbol type.
Definition at line 94 of file qgsrecentstylehandler.h.