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
13class TV;
14class MythMainWindow;
15class MythPlayerUI;
16class 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
30class MythMediaOverlay : public QObject
31{
32 public:
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 };
61 QMap<QString, MythScreenType*> m_children;
62};
63
64#endif
MythPlayerUI * m_player
virtual void TearDown()
~MythMediaOverlay() override
MythPainter * m_painter
QMap< QString, MythScreenType * > m_children
virtual bool Init(QRect Rect, float FontAspect)
virtual MythScreenType * GetWindow(const QString &Window)
MythMediaOverlay(MythMainWindow *MainWindow, TV *Tv, MythPlayerUI *Player, MythPainter *Painter)
QRect Bounds() const
MythMainWindow * m_mainWindow
void OverrideUIScale(bool Log=true)
void SetPlayer(MythPlayerUI *Player)
MythScreenType * InitWindow(const QString &Window, MythScreenType *Screen)
int GetFontStretch() const
virtual void HideWindow(const QString &Window)
bool HasWindow(const QString &Window)
bool Create() override
MythOverlayWindow(MythScreenStack *Parent, MythPainter *Painter, const QString &Name, bool Themed)
Screen in which all other widgets are contained and rendered.
Control TV playback.
Definition: tv_play.h:156