16#ifndef QGSRECENTSTYLEHANDLER_H
17#define QGSRECENTSTYLEHANDLER_H
20#include <unordered_map>
95 template <
class SymbolType> std::unique_ptr< SymbolType >
recentSymbol(
const QString &identifier )
const SIP_SKIP
97 std::unique_ptr< QgsSymbol > tmpSymbol(
recentSymbol( identifier ) );
98 if ( SymbolType *symbolCastToType =
dynamic_cast<SymbolType *
>( tmpSymbol.get() ) )
100 return std::unique_ptr< SymbolType >(
dynamic_cast<SymbolType *
>( tmpSymbol.release() ) );
115 std::unordered_map< QString, std::unique_ptr< QgsSymbol > > mRecentSymbols;
Handles and tracks style items recently used in the QGIS GUI.
QgsRecentStyleHandler(const QgsRecentStyleHandler &other)=delete
void pushRecentSymbol(const QString &identifier, QgsSymbol *symbol)
Pushes a recently used symbol with the specified identifier.
QgsRecentStyleHandler()
Creates a new recent style handler.
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 wit...
QgsRecentStyleHandler & operator=(const QgsRecentStyleHandler &other)=delete
QgsSymbol * recentSymbol(const QString &identifier) const
Returns a copy of the recently used symbol with the specified identifier, or nullptr if no symbol wit...
Abstract base class for all rendered symbols.