ACF $AcfVersion:0$
TMakeStateIconWrapper.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8
9
13namespace iqtgui
14{
15
16
17template<class ThemedComp>
18class StateIconWrapper : public ThemedComp
19{
20public:
22 {
23 switch (category) {
25 return ThemedComp::GetIcon(":/Icons/StateOk");
26
28 return ThemedComp::GetIcon(":/Icons/StateWarning");
29
31 return ThemedComp::GetIcon(":/Icons/StateInvalid");
32
34 return ThemedComp::GetIcon(":/Icons/Error");
35
36 default:
37 return ThemedComp::GetIcon(":/Icons/StateUnknown");
38 }
39 }
40
41
43 {
44 switch (category) {
46 return ThemedComp::GetIcon(":/Icons/StateOk");
47
49 return ThemedComp::GetIcon(":/Icons/StateWarning");
50
52 return ThemedComp::GetIcon(":/Icons/StateInvalid");
53
55 return ThemedComp::GetIcon(":/Icons/Error");
56
57 default:
58 return ThemedComp::GetIcon(":/Icons/Log");
59 }
60 }
61
62
64 {
65 switch (category) {
67 return QPixmap(ThemedComp::GetIconPath(":/Icons/StateOk"));
68
70 return QPixmap(ThemedComp::GetIconPath(":/Icons/StateWarning"));
71
73 return QPixmap(ThemedComp::GetIconPath(":/Icons/StateInvalid"));
74
76 return QPixmap(ThemedComp::GetIconPath(":/Icons/Error"));
77
78 default:
79 return QPixmap(ThemedComp::GetIconPath(":/Icons/StateUnknown"));
80 }
81 }
82};
83
84
85template<class NonThemedComp>
86class TMakeStateIconWrapper : public StateIconWrapper<TMakeIconProviderCompWrap<NonThemedComp>>
87{};
88
89
90
91} // namespace iqtgui
92
93
QIcon GetCategoryIcon(istd::IInformationProvider::InformationCategory category) const
QPixmap GetCategoryPixmap(istd::IInformationProvider::InformationCategory category) const
QIcon GetCategoryLogIcon(istd::IInformationProvider::InformationCategory category) const
InformationCategory
Category of information.
@ IC_ERROR
Information about error, processing could not be done correctly.
@ IC_CRITICAL
Information about critical error - unnormal state of system, should never be returned.
@ IC_INFO
Normal information level.
@ IC_WARNING
Information about warning, processing could be done.
Standard GUI specific interfaces and components based on Qt.