MythTV master
interactivescreen.cpp
Go to the documentation of this file.
1// MythTV
2#include "mythplayerui.h"
4
6 : MythScreenType(static_cast<MythScreenType*>(nullptr), Name),
7 m_player(Player)
8{
9 m_painter = Painter;
10 UpdateArea();
11}
12
14{
15 if (m_player)
16 emit m_player->ResizeForInteractiveTV(QRect());
17}
18
20{
21 if (m_childrenList.isEmpty())
22 {
23 m_safeArea = {};
24 }
25 else if (m_player && m_player->GetVideoOutput())
26 {
27 float tmp = 0.0;
28 QRect dummy;
30 }
32}
33
35{
36 UpdateArea();
37
38 QRegion visible;
39 QListIterator<MythUIType *> i(m_childrenList);
40 while (i.hasNext())
41 {
42 MythUIType *img = i.next();
43 visible = visible.united(img->GetArea());
44 }
45
46 if (visible.isEmpty())
47 return;
48
49 QRect bounding = visible.boundingRect();
50 bounding = bounding.translated(m_safeArea.topLeft());
51 bounding = m_safeArea.intersected(bounding);
52 int left = m_safeArea.left() - bounding.left();
53 int top = m_safeArea.top() - bounding.top();
54 SetArea(MythRect(bounding));
55
56 i.toFront();;
57 while (i.hasNext())
58 {
59 MythUIType *img = i.next();
60 img->SetArea(MythRect(img->GetArea().translated(left, top)));
61 }
62}
InteractiveScreen(MythPlayerUI *Player, MythPainter *Painter, const QString &Name)
MythPlayerUI * m_player
void Close() override
void ResizeForInteractiveTV(const QRect &Rect)
MythVideoOutput * GetVideoOutput(void)
Definition: mythplayer.h:164
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Definition: mythrect.h:18
Screen in which all other widgets are contained and rendered.
The base class on which all widgets and screens are based.
Definition: mythuitype.h:86
virtual void SetArea(const MythRect &rect)
Definition: mythuitype.cpp:610
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
Definition: mythuitype.cpp:885
MythPainter * m_painter
Definition: mythuitype.h:298
QList< MythUIType * > m_childrenList
Definition: mythuitype.h:255
virtual void GetOSDBounds(QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const
static guint32 * tmp
Definition: goom_core.cpp:26