MythTV
master
programs
mythfrontend
videopopups.cpp
Go to the documentation of this file.
1
#include <QStringList>
2
3
#include "
mythlogging.h
"
4
5
#include "
mythuibuttonlist.h
"
6
#include "
mythuitext.h
"
7
#include "
mythuibutton.h
"
8
#include "
videometadata.h
"
9
#include "
videoutils.h
"
10
11
#include "
videopopups.h
"
12
13
bool
CastDialog::Create
()
14
{
15
if
(!
LoadWindowFromXML
(
"video-ui.xml"
,
"castpopup"
,
this
))
16
return
false
;
17
18
MythUIButtonList
*castList =
nullptr
;
19
MythUIButton
*okButton =
nullptr
;
20
21
bool
err =
false
;
22
UIUtilE::Assign
(
this
, castList,
"cast"
, &err);
23
24
if
(err)
25
{
26
LOG
(VB_GENERAL, LOG_ERR,
"Cannot load screen 'castpopup'"
);
27
return
false
;
28
}
29
30
UIUtilW::Assign
(
this
, okButton,
"ok"
);
31
32
if
(okButton)
33
connect(okButton, &
MythUIButton::Clicked
,
this
, &
MythScreenType::Close
);
34
35
QStringList cast =
GetDisplayCast
(*
m_metadata
);
36
QStringListIterator castIterator(cast);
37
while
(castIterator.hasNext())
38
{
39
new
MythUIButtonListItem
(castList, castIterator.next());
40
}
41
42
BuildFocusList
();
43
44
return
true
;
45
}
46
48
49
bool
PlotDialog::Create
()
50
{
51
if
(!
LoadWindowFromXML
(
"video-ui.xml"
,
"descriptionpopup"
,
this
))
52
return
false
;
53
54
MythUIText
*plotText =
nullptr
;
55
MythUIButton
*okButton =
nullptr
;
56
57
bool
err =
false
;
58
UIUtilE::Assign
(
this
, plotText,
"description"
, &err);
59
60
if
(err)
61
{
62
LOG
(VB_GENERAL, LOG_ERR,
"Cannot load screen 'descriptionpopup'"
);
63
return
false
;
64
}
65
66
UIUtilW::Assign
(
this
, okButton,
"ok"
);
67
68
plotText->
SetText
(
m_metadata
->
GetPlot
());
69
70
if
(okButton)
71
connect(okButton, &
MythUIButton::Clicked
,
this
, &
MythScreenType::Close
);
72
73
BuildFocusList
();
74
75
return
true
;
76
}
MythUIButton::Clicked
void Clicked()
mythuitext.h
CastDialog::m_metadata
VideoMetadata * m_metadata
Definition:
videopopups.h:22
videometadata.h
MythScreenType::Close
virtual void Close()
Definition:
mythscreentype.cpp:402
PlotDialog::m_metadata
VideoMetadata * m_metadata
Definition:
videopopups.h:36
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition:
mythlogging.h:23
mythuibuttonlist.h
videopopups.h
VideoMetadata::GetPlot
const QString & GetPlot() const
Definition:
videometadata.cpp:1447
MythUIButtonListItem
Definition:
mythuibuttonlist.h:27
mythlogging.h
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition:
mythscreentype.cpp:222
MythUIButton
A single button widget.
Definition:
mythuibutton.h:21
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition:
mythuiutils.h:27
CastDialog::Create
bool Create() override
Definition:
videopopups.cpp:13
MythUIText
All purpose text widget, displays a text string.
Definition:
mythuitext.h:30
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition:
xmlparsebase.cpp:692
PlotDialog::Create
bool Create() override
Definition:
videopopups.cpp:49
MythUIText::SetText
virtual void SetText(const QString &text)
Definition:
mythuitext.cpp:133
mythuibutton.h
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition:
mythuibuttonlist.h:151
GetDisplayCast
QStringList GetDisplayCast(const VideoMetadata &item)
Definition:
videoutils.cpp:235
videoutils.h
Generated on Mon Jan 18 2021 03:17:06 for MythTV by
1.8.17