QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
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 cannot be copied. | |
~QgsRecentStyleHandler () | |
QgsRecentStyleHandler & | operator= (const QgsRecentStyleHandler &other)=delete |
QgsRecentStyleHandler cannot be copied. | |
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 |
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.