MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
OSD Class Reference

#include <osd.h>

Collaboration diagram for OSD:
Collaboration graph
[legend]

Public Member Functions

 OSD (MythPlayerUI *Player, QObject *Parent, MythPainter *Painter)
 
 ~OSD ()
 
bool Init (const QRect &Rect, float FontAspect)
 
void SetPainter (MythPainter *Painter)
 
QRect Bounds (void) const
 
int GetFontStretch (void) const
 
void OverrideUIScale (bool Log=true)
 
void RevertUIScale (void)
 
bool Reinit (const QRect &Rect, float FontAspect)
 
void SetFunctionalWindow (const QString &Window, enum OSDFunctionalType Type)
 
void SetTimeouts (int Short, int Medium, int Long)
 
bool IsVisible (void)
 
void HideAll (bool KeepSubs=true, MythScreenType *Except=nullptr, bool DropNotification=false)
 
MythScreenTypeGetWindow (const QString &Window)
 
void SetExpiry (const QString &Window, enum OSDTimeout Timeout, int CustomTimeout=0)
 
void HideWindow (const QString &Window)
 
bool HasWindow (const QString &Window)
 
void ResetWindow (const QString &Window)
 
void PositionWindow (MythScreenType *Window)
 
void RemoveWindow (const QString &Window)
 
bool Draw (MythPainter *Painter, QSize Size, bool Repaint=false)
 
void SetValues (const QString &Window, const QHash< QString, int > &Map, OSDTimeout Timeout)
 
void SetValues (const QString &Window, const QHash< QString, float > &Map, OSDTimeout Timeout)
 
void SetText (const QString &Window, const InfoMap &Map, OSDTimeout Timeout)
 
void SetRegions (const QString &Window, frm_dir_map_t &Map, long long Total)
 
void SetGraph (const QString &Window, const QString &Graph, int64_t Timecode)
 
bool IsWindowVisible (const QString &Window)
 
bool DialogVisible (const QString &Window=QString())
 
bool DialogHandleKeypress (QKeyEvent *Event)
 
bool DialogHandleGesture (MythGestureEvent *Event)
 
void DialogQuit (void)
 
void DialogShow (const QString &Window, const QString &Text="", int UpdateFor=0)
 
void DialogSetText (const QString &Text)
 
void DialogBack (const QString &Text="", const QVariant &Data=0, bool Exit=false)
 
void DialogAddButton (const QString &Text, QVariant Data, bool Menu=false, bool Current=false)
 
void DialogGetText (InfoMap &Map)
 
TeletextScreenInitTeletext (void)
 
void EnableTeletext (bool Enable, int Page)
 
bool TeletextAction (const QString &Action)
 
void TeletextReset (void)
 
void TeletextClear (void)
 
SubtitleScreenInitSubtitles (void)
 
void EnableSubtitles (int Type, bool ForcedOnly=false)
 
void DisableForcedSubtitles (void)
 
void ClearSubtitles (void)
 
void DisplayDVDButton (AVSubtitle *DVDButton, QRect &Pos)
 
void DisplayBDOverlay (MythBDOverlay *Overlay)
 
MythPlayerUIGetPlayer (void)
 

Private Member Functions

void TearDown (void)
 
void LoadWindows (void)
 
void CheckExpiry (void)
 
void SendHideEvent (void)
 
void SetExpiryPriv (const QString &Window, enum OSDTimeout Timeout, int CustomTimeout)
 

Private Attributes

MythPlayerUIm_parent { nullptr }
 
QObject * m_parentObject { nullptr }
 
MythPainterm_currentPainter { nullptr }
 
QRect m_rect { }
 
int m_fadeTime { kOSDFadeTime }
 
MythScreenTypem_dialog { nullptr }
 
QString m_pulsedDialogText { }
 
QDateTime m_nextPulseUpdate { }
 
bool m_refresh { false }
 
bool m_visible { false }
 
std::array< int, 4 > m_timeouts { -1,3000,5000,13000 }
 
bool m_uiScaleOverride { false }
 
float m_savedWMult { 1.0F }
 
float m_savedHMult { 1.0F }
 
QRect m_savedUIRect { }
 
int m_fontStretch { 100 }
 
int m_savedFontStretch { 100 }
 
QString m_functionalWindow { }
 
QMap< QString, MythScreenType * > m_children { }
 
QHash< MythScreenType *, QDateTime > m_expireTimes { }
 

Detailed Description

Definition at line 131 of file osd.h.

Constructor & Destructor Documentation

◆ OSD()

OSD::OSD ( MythPlayerUI Player,
QObject *  Parent,
MythPainter Painter 
)
inline

Definition at line 136 of file osd.h.

◆ ~OSD()

OSD::~OSD ( )

Definition at line 143 of file osd.cpp.

Member Function Documentation

◆ Init()

bool OSD::Init ( const QRect &  Rect,
float  FontAspect 
)

Definition at line 156 of file osd.cpp.

Referenced by Reinit(), and MythPlayerUI::VideoStart().

◆ SetPainter()

void OSD::SetPainter ( MythPainter Painter)

Definition at line 178 of file osd.cpp.

Referenced by MythPlayer::ReinitOSD(), and MythPlayer::ReinitVideo().

◆ Bounds()

QRect OSD::Bounds ( void  ) const
inline

Definition at line 142 of file osd.h.

Referenced by MythPlayer::ReinitOSD().

◆ GetFontStretch()

int OSD::GetFontStretch ( void  ) const
inline

Definition at line 143 of file osd.h.

Referenced by MythPlayer::ReinitOSD().

◆ OverrideUIScale()

void OSD::OverrideUIScale ( bool  Log = true)

Definition at line 192 of file osd.cpp.

Referenced by DialogShow(), Draw(), Init(), InitSubtitles(), and InitTeletext().

◆ RevertUIScale()

void OSD::RevertUIScale ( void  )

Definition at line 226 of file osd.cpp.

Referenced by DialogShow(), Draw(), Init(), InitSubtitles(), and InitTeletext().

◆ Reinit()

bool OSD::Reinit ( const QRect &  Rect,
float  FontAspect 
)

Definition at line 238 of file osd.cpp.

Referenced by MythPlayer::ReinitOSD().

◆ SetFunctionalWindow()

void OSD::SetFunctionalWindow ( const QString &  Window,
enum OSDFunctionalType  Type 
)

Definition at line 897 of file osd.cpp.

Referenced by TV::UpdateOSDStatus().

◆ SetTimeouts()

void OSD::SetTimeouts ( int  Short,
int  Medium,
int  Long 
)

Definition at line 815 of file osd.cpp.

◆ IsVisible()

bool OSD::IsVisible ( void  )

Definition at line 260 of file osd.cpp.

Referenced by TV::ActiveHandleAction().

◆ HideAll()

void OSD::HideAll ( bool  KeepSubs = true,
MythScreenType Except = nullptr,
bool  DropNotification = false 
)

◆ GetWindow()

MythScreenType * OSD::GetWindow ( const QString &  Window)

◆ SetExpiry()

void OSD::SetExpiry ( const QString &  Window,
enum OSDTimeout  Timeout,
int  CustomTimeout = 0 
)

◆ HideWindow()

void OSD::HideWindow ( const QString &  Window)

◆ HasWindow()

bool OSD::HasWindow ( const QString &  Window)

◆ ResetWindow()

void OSD::ResetWindow ( const QString &  Window)

Definition at line 831 of file osd.cpp.

Referenced by TV::UpdateOSDDebug(), and TV::UpdateOSDStatus().

◆ PositionWindow()

void OSD::PositionWindow ( MythScreenType Window)

Definition at line 841 of file osd.cpp.

Referenced by DialogShow(), and LoadWindows().

◆ RemoveWindow()

void OSD::RemoveWindow ( const QString &  Window)

Definition at line 851 of file osd.cpp.

Referenced by DialogQuit().

◆ Draw()

bool OSD::Draw ( MythPainter Painter,
QSize  Size,
bool  Repaint = false 
)

Definition at line 630 of file osd.cpp.

Referenced by VideoOutputD3D::RenderFrame(), and MythVideoOutputGPU::RenderOverlays().

◆ SetValues() [1/2]

void OSD::SetValues ( const QString &  Window,
const QHash< QString, int > &  Map,
OSDTimeout  Timeout 
)

◆ SetValues() [2/2]

void OSD::SetValues ( const QString &  Window,
const QHash< QString, float > &  Map,
OSDTimeout  Timeout 
)

Definition at line 362 of file osd.cpp.

◆ SetText()

void OSD::SetText ( const QString &  Window,
const InfoMap Map,
OSDTimeout  Timeout 
)

◆ SetRegions()

void OSD::SetRegions ( const QString &  Window,
frm_dir_map_t Map,
long long  Total 
)

Definition at line 549 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ SetGraph()

void OSD::SetGraph ( const QString &  Window,
const QString &  Graph,
int64_t  Timecode 
)

Definition at line 615 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ IsWindowVisible()

bool OSD::IsWindowVisible ( const QString &  Window)

Definition at line 823 of file osd.cpp.

Referenced by SetExpiry(), TV::timerEvent(), TV::ToggleOSD(), and TV::ToggleOSDDebug().

◆ DialogVisible()

bool OSD::DialogVisible ( const QString &  Window = QString())

◆ DialogHandleKeypress()

bool OSD::DialogHandleKeypress ( QKeyEvent *  Event)

Definition at line 952 of file osd.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ DialogHandleGesture()

bool OSD::DialogHandleGesture ( MythGestureEvent Event)

Definition at line 959 of file osd.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ DialogQuit()

void OSD::DialogQuit ( void  )

◆ DialogShow()

void OSD::DialogShow ( const QString &  Window,
const QString &  Text = "",
int  UpdateFor = 0 
)

◆ DialogSetText()

void OSD::DialogSetText ( const QString &  Text)

Definition at line 1047 of file osd.cpp.

Referenced by DialogShow(), and TV::PlaybackMenuShow().

◆ DialogBack()

void OSD::DialogBack ( const QString &  Text = "",
const QVariant &  Data = 0,
bool  Exit = false 
)

◆ DialogAddButton()

void OSD::DialogAddButton ( const QString &  Text,
QVariant  Data,
bool  Menu = false,
bool  Current = false 
)

◆ DialogGetText()

void OSD::DialogGetText ( InfoMap Map)

Definition at line 1072 of file osd.cpp.

Referenced by TV::HandleOSDChannelEdit().

◆ InitTeletext()

TeletextScreen * OSD::InitTeletext ( void  )

Definition at line 1079 of file osd.cpp.

Referenced by EnableTeletext(), and TeletextReset().

◆ EnableTeletext()

void OSD::EnableTeletext ( bool  Enable,
int  Page 
)

Definition at line 1116 of file osd.cpp.

Referenced by MythPlayer::DisableTeletext(), and MythPlayer::EnableTeletext().

◆ TeletextAction()

bool OSD::TeletextAction ( const QString &  Action)

Definition at line 1134 of file osd.cpp.

Referenced by MythPlayer::HandleTeletextAction().

◆ TeletextReset()

void OSD::TeletextReset ( void  )

Definition at line 1145 of file osd.cpp.

Referenced by MythPlayer::ResetTeletext().

◆ TeletextClear()

void OSD::TeletextClear ( void  )

Definition at line 1155 of file osd.cpp.

Referenced by MythPlayer::ResetCaptions().

◆ InitSubtitles()

SubtitleScreen * OSD::InitSubtitles ( void  )

◆ EnableSubtitles()

void OSD::EnableSubtitles ( int  Type,
bool  ForcedOnly = false 
)

◆ DisableForcedSubtitles()

void OSD::DisableForcedSubtitles ( void  )

Definition at line 1205 of file osd.cpp.

Referenced by MythPlayer::DoDisableForcedSubtitles().

◆ ClearSubtitles()

void OSD::ClearSubtitles ( void  )

Definition at line 1214 of file osd.cpp.

Referenced by MythDVDPlayer::DisplayDVDButton(), and MythPlayer::ResetCaptions().

◆ DisplayDVDButton()

void OSD::DisplayDVDButton ( AVSubtitle *  DVDButton,
QRect &  Pos 
)

Definition at line 1224 of file osd.cpp.

Referenced by MythDVDPlayer::DisplayDVDButton().

◆ DisplayBDOverlay()

void OSD::DisplayBDOverlay ( MythBDOverlay Overlay)

Definition at line 1237 of file osd.cpp.

Referenced by MythBDPlayer::DisplayMenu().

◆ GetPlayer()

MythPlayerUI* OSD::GetPlayer ( void  )
inline

Definition at line 190 of file osd.h.

Referenced by OsdNavigation::Create().

◆ TearDown()

void OSD::TearDown ( void  )
private

Definition at line 148 of file osd.cpp.

Referenced by Reinit(), and ~OSD().

◆ LoadWindows()

void OSD::LoadWindows ( void  )
private

Definition at line 299 of file osd.cpp.

Referenced by Init().

◆ CheckExpiry()

void OSD::CheckExpiry ( void  )
private

Definition at line 741 of file osd.cpp.

Referenced by Draw().

◆ SendHideEvent()

void OSD::SendHideEvent ( void  )
private

Definition at line 934 of file osd.cpp.

Referenced by HideWindow(), and SetFunctionalWindow().

◆ SetExpiryPriv()

void OSD::SetExpiryPriv ( const QString &  Window,
enum OSDTimeout  Timeout,
int  CustomTimeout 
)
private

Definition at line 796 of file osd.cpp.

Referenced by SetExpiry().

Member Data Documentation

◆ m_parent

MythPlayerUI* OSD::m_parent { nullptr }
private

Definition at line 201 of file osd.h.

Referenced by GetPlayer(), GetWindow(), InitSubtitles(), InitTeletext(), and SetGraph().

◆ m_parentObject

QObject* OSD::m_parentObject { nullptr }
private

Definition at line 202 of file osd.h.

Referenced by DialogShow(), and SendHideEvent().

◆ m_currentPainter

MythPainter* OSD::m_currentPainter { nullptr }
private

Definition at line 203 of file osd.h.

Referenced by DialogShow(), Draw(), GetWindow(), InitSubtitles(), InitTeletext(), LoadWindows(), and SetPainter().

◆ m_rect

QRect OSD::m_rect { }
private

Definition at line 204 of file osd.h.

Referenced by Bounds(), Init(), OverrideUIScale(), PositionWindow(), and Reinit().

◆ m_fadeTime

int OSD::m_fadeTime { kOSDFadeTime }
private

Definition at line 205 of file osd.h.

Referenced by Draw().

◆ m_dialog

MythScreenType* OSD::m_dialog { nullptr }
private

◆ m_pulsedDialogText

QString OSD::m_pulsedDialogText { }
private

Definition at line 207 of file osd.h.

Referenced by CheckExpiry(), DialogQuit(), and DialogShow().

◆ m_nextPulseUpdate

QDateTime OSD::m_nextPulseUpdate { }
private

Definition at line 208 of file osd.h.

Referenced by CheckExpiry(), and DialogShow().

◆ m_refresh

bool OSD::m_refresh { false }
private

Definition at line 209 of file osd.h.

Referenced by Draw(), HideWindow(), and Reinit().

◆ m_visible

bool OSD::m_visible { false }
private

Definition at line 210 of file osd.h.

Referenced by Draw().

◆ m_timeouts

std::array<int,4> OSD::m_timeouts { -1,3000,5000,13000 }
private

Definition at line 211 of file osd.h.

Referenced by SetExpiryPriv(), and SetTimeouts().

◆ m_uiScaleOverride

bool OSD::m_uiScaleOverride { false }
private

Definition at line 212 of file osd.h.

Referenced by Draw(), OverrideUIScale(), and RevertUIScale().

◆ m_savedWMult

float OSD::m_savedWMult { 1.0F }
private

Definition at line 213 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_savedHMult

float OSD::m_savedHMult { 1.0F }
private

Definition at line 214 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_savedUIRect

QRect OSD::m_savedUIRect { }
private

Definition at line 215 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_fontStretch

int OSD::m_fontStretch { 100 }
private

Definition at line 216 of file osd.h.

Referenced by GetFontStretch(), Init(), InitSubtitles(), InitTeletext(), OverrideUIScale(), and Reinit().

◆ m_savedFontStretch

int OSD::m_savedFontStretch { 100 }
private

Definition at line 217 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_functionalWindow

QString OSD::m_functionalWindow { }
private

Definition at line 219 of file osd.h.

Referenced by HideWindow(), and SetFunctionalWindow().

◆ m_children

QMap<QString, MythScreenType*> OSD::m_children { }
private

◆ m_expireTimes

QHash<MythScreenType*, QDateTime> OSD::m_expireTimes { }
private

Definition at line 221 of file osd.h.

Referenced by CheckExpiry(), Draw(), and SetExpiryPriv().


The documentation for this class was generated from the following files: