MythTV  master
interactivescreen.cpp
Go to the documentation of this file.
1 #include "interactivescreen.h"
2 
4  const QString &name) :
6  m_player(player), m_safeArea(QRect())
7 {
8  UpdateArea();
9 }
10 
12 {
13  if (m_player)
14  m_player->SetVideoResize(QRect());
15 }
16 
18 {
19  if (m_ChildrenList.isEmpty())
20  {
21  m_safeArea = QRect();
22  }
23  else if (m_player && m_player->GetVideoOutput())
24  {
25  float tmp = 0.0;
26  QRect dummy;
28  }
30 }
31 
33 {
34  UpdateArea();
35 
36  QRegion visible;
37  QListIterator<MythUIType *> i(m_ChildrenList);
38  while (i.hasNext())
39  {
40  MythUIType *img = i.next();
41  visible = visible.united(img->GetArea());
42  }
43 
44  if (visible.isEmpty())
45  return;
46 
47  QRect bounding = visible.boundingRect();
48  bounding = bounding.translated(m_safeArea.topLeft());
49  bounding = m_safeArea.intersected(bounding);
50  int left = m_safeArea.left() - bounding.left();
51  int top = m_safeArea.top() - bounding.top();
52  SetArea(MythRect(bounding));
53 
54  i.toFront();;
55  while (i.hasNext())
56  {
57  MythUIType *img = i.next();
58  img->SetArea(img->GetArea().translated(left, top));
59  }
60 }
VideoOutput * GetVideoOutput(void)
Definition: mythplayer.h:244
InteractiveScreen(MythPlayer *player, const QString &name)
static guint32 * tmp
Definition: goom_core.c:35
The base class on which all widgets and screens are based.
Definition: mythuitype.h:63
void Close() override
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
Definition: mythuitype.cpp:863
Wrapper around QRect allowing us to handle percentage and other relative values for areas in mythui.
Definition: mythrect.h:17
const char * name
Definition: ParseText.cpp:328
MythPlayer * m_player
virtual void SetArea(const MythRect &rect)
Definition: mythuitype.cpp:591
virtual void GetOSDBounds(QRect &total, QRect &visible, float &visible_aspect, float &font_scaling, float themeAspect) const
Screen in which all other widgets are contained and rendered.
void OptimiseDisplayedArea(void)
void SetVideoResize(const QRect &videoRect)
QList< MythUIType * > m_ChildrenList
Definition: mythuitype.h:228