mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 23:31:32 +02:00
33 lines
529 B
C++
33 lines
529 B
C++
// SPDX-License-Identifier: BSD-3-Clause
|
|
// Copyright (c) 2020-2021, The Monero Project.
|
|
|
|
#include "Icons.h"
|
|
|
|
Icons* Icons::m_instance(nullptr);
|
|
|
|
Icons::Icons()
|
|
= default;
|
|
|
|
QIcon Icons::icon(const QString& name)
|
|
{
|
|
QIcon icon = m_iconCache.value(name);
|
|
|
|
if (!icon.isNull()) {
|
|
return icon;
|
|
}
|
|
|
|
icon = QIcon{":/assets/images/" + name};
|
|
|
|
m_iconCache.insert(name, icon);
|
|
return icon;
|
|
}
|
|
|
|
Icons* Icons::instance()
|
|
{
|
|
if (!m_instance) {
|
|
m_instance = new Icons();
|
|
}
|
|
|
|
return m_instance;
|
|
}
|