MythTV
master
mythtv
libs
libmythui
mythuicomposite.cpp
Go to the documentation of this file.
1
#include "
mythuicomposite.h
"
2
#include "
mythuitext.h
"
3
4
MythUIComposite::MythUIComposite
(QObject *parent,
const
QString &name) :
5
MythUIType
(parent, name)
6
{
7
}
8
9
void
MythUIComposite::SetTextFromMap
(
const
InfoMap
&infoMap)
10
{
11
QList<MythUIType *> *children =
GetAllChildren
();
12
for
(
auto
*
type
: std::as_const(*children))
13
{
14
auto
*textType =
dynamic_cast<
MythUIText
*
>
(
type
);
15
if
(textType)
16
textType->
SetTextFromMap
(infoMap);
17
18
auto
*group =
dynamic_cast<
MythUIComposite
*
>
(
type
);
19
if
(group)
20
group->
SetTextFromMap
(infoMap);
21
}
22
}
23
24
void
MythUIComposite::ResetMap
(
const
InfoMap
&infoMap)
25
{
26
if
(infoMap.isEmpty())
27
return
;
28
29
QList<MythUIType *> *children =
GetAllChildren
();
30
for
(
auto
*
type
: std::as_const(*children))
31
{
32
auto
*textType =
dynamic_cast<
MythUIText
*
>
(
type
);
33
if
(textType)
34
textType->
ResetMap
(infoMap);
35
36
auto
*group =
dynamic_cast<
MythUIComposite
*
>
(
type
);
37
if
(group)
38
group->
ResetMap
(infoMap);
39
}
40
}
MythUIComposite
Definition:
mythuicomposite.h:8
MythUIComposite::MythUIComposite
MythUIComposite(QObject *parent, const QString &name)
Definition:
mythuicomposite.cpp:4
MythUIComposite::SetTextFromMap
virtual void SetTextFromMap(const InfoMap &infoMap)
Definition:
mythuicomposite.cpp:9
MythUIComposite::ResetMap
virtual void ResetMap(const InfoMap &infoMap)
Definition:
mythuicomposite.cpp:24
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:29
MythUIText::SetTextFromMap
void SetTextFromMap(const InfoMap &map)
Definition:
mythuitext.cpp:138
MythUIText::ResetMap
void ResetMap(const InfoMap &map)
Definition:
mythuitext.cpp:79
MythUIType
The base class on which all widgets and screens are based.
Definition:
mythuitype.h:86
MythUIType::GetAllChildren
QList< MythUIType * > * GetAllChildren(void)
Return a list of all child widgets.
Definition:
mythuitype.cpp:187
InfoMap
QHash< QString, QString > InfoMap
Definition:
mythtypes.h:15
mythuicomposite.h
mythuitext.h
hardwareprofile.getLink.type
type
Definition:
getLink.py:56
Generated on Tue Mar 3 2026 03:17:19 for MythTV by
1.9.4