MythTV  master
mythmediaoverlay.h
Go to the documentation of this file.
1 #ifndef MYTHMEDIAOVERLAY_H
2 #define MYTHMEDIAOVERLAY_H
3 
4 // Qt
5 #include <QMap>
6 #include <QRect>
7 #include <QHash>
8 #include <QObject>
9 
10 // MythTV
12 
13 class TV;
14 class MythMainWindow;
15 class MythPlayerUI;
16 class MythPainter;
17 
19 {
20  Q_OBJECT
21 
22  public:
23  MythOverlayWindow(MythScreenStack* Parent, MythPainter* Painter, const QString& Name, bool Themed);
24  bool Create() override;
25 
26  private:
27  bool m_themed { false };
28 };
29 
30 class MythMediaOverlay : public QObject
31 {
32  public:
33  MythMediaOverlay(MythMainWindow* MainWindow, TV* Tv, MythPlayerUI* Player, MythPainter* Painter);
34  ~MythMediaOverlay() override;
35 
37  virtual bool Init(QRect Rect, float FontAspect);
38  QRect Bounds() const;
39  int GetFontStretch() const;
40  bool HasWindow(const QString& Window);
41  virtual MythScreenType* GetWindow(const QString& Window);
42  virtual void HideWindow(const QString& Window);
43 
44  protected:
45  virtual void TearDown();
46  void OverrideUIScale(bool Log = true);
47  void RevertUIScale();
48  MythScreenType* InitWindow(const QString& Window, MythScreenType* Screen);
49 
51  TV* m_tv { nullptr };
52  MythPlayerUI* m_player { nullptr };
53  MythPainter* m_painter { nullptr };
54  QRect m_rect;
55  bool m_uiScaleOverride { false };
56  float m_savedWMult { 1.0F };
57  float m_savedHMult { 1.0F };
59  int m_fontStretch { 0 };
60  int m_savedFontStretch { 0 };
61  QMap<QString, MythScreenType*> m_children;
62 };
63 
64 #endif
MythOverlayWindow::m_themed
bool m_themed
Definition: mythmediaoverlay.h:27
MythMediaOverlay::RevertUIScale
void RevertUIScale()
Definition: mythmediaoverlay.cpp:154
MythMediaOverlay::InitWindow
MythScreenType * InitWindow(const QString &Window, MythScreenType *Screen)
Definition: mythmediaoverlay.cpp:100
MythMediaOverlay::m_uiScaleOverride
bool m_uiScaleOverride
Definition: mythmediaoverlay.h:55
MythMediaOverlay::m_savedWMult
float m_savedWMult
Definition: mythmediaoverlay.h:56
MythScreenStack
Definition: mythscreenstack.h:16
MythMediaOverlay::Bounds
QRect Bounds() const
Definition: mythmediaoverlay.cpp:52
MythMediaOverlay::HideWindow
virtual void HideWindow(const QString &Window)
Definition: mythmediaoverlay.cpp:74
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
MythMediaOverlay::m_player
MythPlayerUI * m_player
Definition: mythmediaoverlay.h:52
MythMediaOverlay::~MythMediaOverlay
~MythMediaOverlay() override
Definition: mythmediaoverlay.cpp:35
MythMediaOverlay::m_savedFontStretch
int m_savedFontStretch
Definition: mythmediaoverlay.h:60
MythOverlayWindow
Definition: mythmediaoverlay.h:18
MythPlayerUI
Definition: mythplayerui.h:12
MythMediaOverlay::m_rect
QRect m_rect
Definition: mythmediaoverlay.h:54
MythMediaOverlay::HasWindow
bool HasWindow(const QString &Window)
Definition: mythmediaoverlay.cpp:87
MythMediaOverlay::m_painter
MythPainter * m_painter
Definition: mythmediaoverlay.h:53
MythMediaOverlay::m_fontStretch
int m_fontStretch
Definition: mythmediaoverlay.h:59
MythMediaOverlay::m_tv
TV * m_tv
Definition: mythmediaoverlay.h:51
MythMediaOverlay::MythMediaOverlay
MythMediaOverlay(MythMainWindow *MainWindow, TV *Tv, MythPlayerUI *Player, MythPainter *Painter)
Definition: mythmediaoverlay.cpp:27
MythMediaOverlay::m_savedHMult
float m_savedHMult
Definition: mythmediaoverlay.h:57
MythMediaOverlay::m_children
QMap< QString, MythScreenType * > m_children
Definition: mythmediaoverlay.h:61
MythMediaOverlay::SetPlayer
void SetPlayer(MythPlayerUI *Player)
Definition: mythmediaoverlay.cpp:40
MythMediaOverlay::m_savedUIRect
QRect m_savedUIRect
Definition: mythmediaoverlay.h:58
MythMediaOverlay::Init
virtual bool Init(QRect Rect, float FontAspect)
Definition: mythmediaoverlay.cpp:62
MythMediaOverlay::GetWindow
virtual MythScreenType * GetWindow(const QString &Window)
Definition: mythmediaoverlay.cpp:92
MythMediaOverlay
Definition: mythmediaoverlay.h:30
MythPainter
Definition: mythpainter.h:34
Name
Definition: channelsettings.cpp:71
MythMediaOverlay::m_mainWindow
MythMainWindow * m_mainWindow
Definition: mythmediaoverlay.h:50
MythOverlayWindow::MythOverlayWindow
MythOverlayWindow(MythScreenStack *Parent, MythPainter *Painter, const QString &Name, bool Themed)
Definition: mythmediaoverlay.cpp:12
MythMediaOverlay::GetFontStretch
int GetFontStretch() const
Definition: mythmediaoverlay.cpp:57
MythOverlayWindow::Create
bool Create() override
Definition: mythmediaoverlay.cpp:20
Player
Definition: zmliveplayer.h:34
MythMediaOverlay::TearDown
virtual void TearDown()
Definition: mythmediaoverlay.cpp:45
MythMediaOverlay::OverrideUIScale
void OverrideUIScale(bool Log=true)
Definition: mythmediaoverlay.cpp:121
MythMainWindow
Definition: mythmainwindow.h:28
mythscreentype.h
TV
Control TV playback.
Definition: tv_play.h:154