SILICON
Toggle main menu visibility
Loading...
Searching...
No Matches
themedSvgItem.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2026. Giulio Cocconi
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
*/
9
#pragma once
10
11
#include <QGraphicsSvgItem>
12
13
#include <
ui/lifetime.hpp
>
14
15
namespace
SILICON::ui
{
16
18
class
ThemedSvgItem
:
public
QGraphicsSvgItem {
19
public
:
20
explicit
ThemedSvgItem
(QString
path
, QGraphicsItem* parent =
nullptr
);
21
~ThemedSvgItem
()
override
;
22
23
private
:
24
void
refreshTheme
();
25
26
QString
path
;
27
class
RendererLease
;
28
// QObject child teardown follows QGraphicsSvgItem teardown, preserving the lease
29
// throughout the base item's lifetime as required by setSharedRenderer().
30
RendererLease
*
rendererLease
;
31
CallbackScope
callbacks
;
32
};
33
34
}
// namespace SILICON::ui
SILICON::ui::CallbackScope
Definition
lifetime.hpp:34
SILICON::ui::ThemedSvgItem::RendererLease
Definition
icons.cpp:299
SILICON::ui::ThemedSvgItem::path
QString path
Definition
themedSvgItem.hpp:26
SILICON::ui::ThemedSvgItem::refreshTheme
void refreshTheme()
Definition
icons.cpp:315
SILICON::ui::ThemedSvgItem::rendererLease
RendererLease * rendererLease
Definition
themedSvgItem.hpp:30
SILICON::ui::ThemedSvgItem::callbacks
CallbackScope callbacks
Definition
themedSvgItem.hpp:31
SILICON::ui::ThemedSvgItem::ThemedSvgItem
ThemedSvgItem(QString path, QGraphicsItem *parent=nullptr)
Definition
icons.cpp:305
SILICON::ui::ThemedSvgItem::~ThemedSvgItem
~ThemedSvgItem() override
lifetime.hpp
SILICON::ui
Definition
actionGroups.hpp:14
src
ui
shell
themedSvgItem.hpp
Generated by
1.17.0