-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwingsymbolcenter.cpp
More file actions
39 lines (33 loc) · 1.18 KB
/
wingsymbolcenter.cpp
File metadata and controls
39 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/****************************************************************************
**
** Copyright (C) 2025-2028 WingSummer
**
** This file may be used under the terms of the GNU General Public License
** version 3 as published by the Free Software Foundation.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** You should have received a copy of the GNU General Public License version 3
** along with this program. If not, see <https://www.gnu.org/licenses/>.
**
****************************************************************************/
#include "wingsymbolcenter.h"
WingSymbolCenter &WingSymbolCenter::instance() {
static WingSymbolCenter ins;
return ins;
}
bool WingSymbolCenter::existSymbol(const QString &id) {
return _caches.contains(id);
}
QPixmap WingSymbolCenter::symbolFromName(const QString &id) {
return _caches.value(id);
}
void WingSymbolCenter::regsiterSymbol(const QString &id,
const QPixmap &symbol) {
if (symbol.isNull()) {
return;
}
_caches.insert(id, symbol);
}
WingSymbolCenter::WingSymbolCenter() {}