QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
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. More... | |
QgsRecentStyleHandler (const QgsRecentStyleHandler &other)=delete | |
QgsRecentStyleHandler cannot be copied. More... | |
~QgsRecentStyleHandler () | |
QgsRecentStyleHandler & | operator= (const QgsRecentStyleHandler &other)=delete |
QgsRecentStyleHandler cannot be copied. More... | |
void | pushRecentSymbol (const QString &identifier, QgsSymbol *symbol) |
Pushes a recently used symbol with the specified identifier. More... | |
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. More... | |
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. More... | |
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 |
QgsRecentStyleHandler cannot be copied.
|
default |
|
delete |
QgsRecentStyleHandler cannot be copied.
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 96 of file qgsrecentstylehandler.h.