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 (MythPlayer *player, QObject *parent, MythPainter *painter)
 
 ~OSD ()
 
bool Init (const QRect &rect, float font_aspect)
 
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 font_aspect)
 
void DisableFade (void)
 
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 custom_timeout=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 DrawDirect (MythPainter *painter, QSize size, bool repaint=false)
 
QRegion Draw (MythPainter *painter, QPaintDevice *device, QSize size, QRegion &changed, int alignx=0, int aligny=0)
 
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 *e)
 
bool DialogHandleGesture (MythGestureEvent *e)
 
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 forced_only=false)
 
void DisableForcedSubtitles (void)
 
void ClearSubtitles (void)
 
void DisplayDVDButton (AVSubtitle *dvdButton, QRect &pos)
 
void DisplayBDOverlay (BDOverlay *overlay)
 
MythPlayerGetPlayer (void)
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (OSD)
 
void TearDown (void)
 
void LoadWindows (void)
 
void CheckExpiry (void)
 
void SendHideEvent (void)
 
void SetExpiry1 (const QString &window, enum OSDTimeout timeout, int custom_timeout)
 

Private Attributes

MythPlayerm_parent
 
QObject * m_ParentObject
 
MythPainterm_CurrentPainter
 
QRect m_Rect
 
bool m_Effects
 
int m_FadeTime
 
MythScreenTypem_Dialog
 
QString m_PulsedDialogText
 
QDateTime m_NextPulseUpdate
 
bool m_Refresh
 
bool m_Visible
 
int m_Timeouts [4]
 
bool m_UIScaleOverride
 
float m_SavedWMult
 
float m_SavedHMult
 
QRect m_SavedUIRect
 
int m_fontStretch
 
int m_savedFontStretch
 
enum OSDFunctionalType m_FunctionalType
 
QString m_FunctionalWindow
 
QMap< QString, MythScreenType * > m_Children
 
QHash< MythScreenType *, QDateTime > m_ExpireTimes
 

Detailed Description

Definition at line 132 of file osd.h.

Constructor & Destructor Documentation

◆ OSD()

OSD::OSD ( MythPlayer player,
QObject *  parent,
MythPainter painter 
)

Definition at line 154 of file osd.cpp.

◆ ~OSD()

OSD::~OSD ( )

Definition at line 166 of file osd.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

OSD::Q_DECLARE_TR_FUNCTIONS ( OSD  )
private

◆ Init()

bool OSD::Init ( const QRect &  rect,
float  font_aspect 
)

Definition at line 179 of file osd.cpp.

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

◆ SetPainter()

void OSD::SetPainter ( MythPainter painter)

Definition at line 201 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 215 of file osd.cpp.

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

◆ RevertUIScale()

void OSD::RevertUIScale ( void  )

Definition at line 244 of file osd.cpp.

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

◆ Reinit()

bool OSD::Reinit ( const QRect &  rect,
float  font_aspect 
)

Definition at line 255 of file osd.cpp.

Referenced by MythPlayer::ReinitOSD().

◆ DisableFade()

void OSD::DisableFade ( void  )
inline

Definition at line 147 of file osd.h.

Referenced by VideoOutput::InitOSD().

◆ SetFunctionalWindow()

void OSD::SetFunctionalWindow ( const QString &  window,
enum OSDFunctionalType  type 
)

Definition at line 1125 of file osd.cpp.

Referenced by TV::UpdateOSDStatus().

◆ SetTimeouts()

void OSD::SetTimeouts ( int  _short,
int  _medium,
int  _long 
)

Definition at line 1045 of file osd.cpp.

Referenced by OSD().

◆ IsVisible()

bool OSD::IsVisible ( void  )

Definition at line 284 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  custom_timeout = 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 1061 of file osd.cpp.

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

◆ PositionWindow()

void OSD::PositionWindow ( MythScreenType window)

Definition at line 1069 of file osd.cpp.

Referenced by DialogShow(), and LoadWindows().

◆ RemoveWindow()

void OSD::RemoveWindow ( const QString &  window)

Definition at line 1079 of file osd.cpp.

Referenced by DialogQuit().

◆ DrawDirect()

bool OSD::DrawDirect ( MythPainter painter,
QSize  size,
bool  repaint = false 
)

◆ Draw()

QRegion OSD::Draw ( MythPainter painter,
QPaintDevice *  device,
QSize  size,
QRegion &  changed,
int  alignx = 0,
int  aligny = 0 
)

◆ 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 392 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 590 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ SetGraph()

void OSD::SetGraph ( const QString &  window,
const QString &  graph,
int64_t  timecode 
)

Definition at line 657 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ IsWindowVisible()

bool OSD::IsWindowVisible ( const QString &  window)

Definition at line 1053 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 *  e)

Definition at line 1176 of file osd.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ DialogHandleGesture()

bool OSD::DialogHandleGesture ( MythGestureEvent e)

Definition at line 1183 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 1271 of file osd.cpp.

Referenced by DialogShow().

◆ 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 1296 of file osd.cpp.

Referenced by TV::HandleOSDChannelEdit().

◆ InitTeletext()

TeletextScreen * OSD::InitTeletext ( void  )

Definition at line 1303 of file osd.cpp.

Referenced by EnableTeletext(), and TeletextReset().

◆ EnableTeletext()

void OSD::EnableTeletext ( bool  enable,
int  page 
)

Definition at line 1340 of file osd.cpp.

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

◆ TeletextAction()

bool OSD::TeletextAction ( const QString &  action)

Definition at line 1358 of file osd.cpp.

Referenced by MythPlayer::HandleTeletextAction().

◆ TeletextReset()

void OSD::TeletextReset ( void  )

Definition at line 1369 of file osd.cpp.

Referenced by MythPlayer::ResetTeletext().

◆ TeletextClear()

void OSD::TeletextClear ( void  )

Definition at line 1379 of file osd.cpp.

Referenced by MythPlayer::ResetCaptions().

◆ InitSubtitles()

SubtitleScreen * OSD::InitSubtitles ( void  )

◆ EnableSubtitles()

void OSD::EnableSubtitles ( int  type,
bool  forced_only = false 
)

◆ DisableForcedSubtitles()

void OSD::DisableForcedSubtitles ( void  )

Definition at line 1429 of file osd.cpp.

Referenced by MythPlayer::DoDisableForcedSubtitles().

◆ ClearSubtitles()

void OSD::ClearSubtitles ( void  )

Definition at line 1438 of file osd.cpp.

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

◆ DisplayDVDButton()

void OSD::DisplayDVDButton ( AVSubtitle *  dvdButton,
QRect &  pos 
)

Definition at line 1448 of file osd.cpp.

Referenced by MythDVDPlayer::DisplayDVDButton().

◆ DisplayBDOverlay()

void OSD::DisplayBDOverlay ( BDOverlay overlay)

Definition at line 1461 of file osd.cpp.

Referenced by MythBDPlayer::DisplayMenu().

◆ GetPlayer()

MythPlayer* OSD::GetPlayer ( void  )
inline

Definition at line 205 of file osd.h.

Referenced by OsdNavigation::Create().

◆ TearDown()

void OSD::TearDown ( void  )
private

Definition at line 171 of file osd.cpp.

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

◆ LoadWindows()

void OSD::LoadWindows ( void  )
private

Definition at line 327 of file osd.cpp.

Referenced by Init().

◆ CheckExpiry()

void OSD::CheckExpiry ( void  )
private

Definition at line 969 of file osd.cpp.

Referenced by Draw(), and DrawDirect().

◆ SendHideEvent()

void OSD::SendHideEvent ( void  )
private

Definition at line 1157 of file osd.cpp.

Referenced by HideWindow(), and SetFunctionalWindow().

◆ SetExpiry1()

void OSD::SetExpiry1 ( const QString &  window,
enum OSDTimeout  timeout,
int  custom_timeout 
)
private

Definition at line 1025 of file osd.cpp.

Referenced by SetExpiry().

Member Data Documentation

◆ m_parent

MythPlayer* OSD::m_parent
private

Definition at line 217 of file osd.h.

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

◆ m_ParentObject

QObject* OSD::m_ParentObject
private

Definition at line 218 of file osd.h.

Referenced by DialogShow(), and SendHideEvent().

◆ m_CurrentPainter

MythPainter* OSD::m_CurrentPainter
private

◆ m_Rect

QRect OSD::m_Rect
private

Definition at line 220 of file osd.h.

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

◆ m_Effects

bool OSD::m_Effects
private

Definition at line 221 of file osd.h.

Referenced by DisableFade(), Draw(), and DrawDirect().

◆ m_FadeTime

int OSD::m_FadeTime
private

Definition at line 222 of file osd.h.

Referenced by Draw(), and DrawDirect().

◆ m_Dialog

MythScreenType* OSD::m_Dialog
private

◆ m_PulsedDialogText

QString OSD::m_PulsedDialogText
private

Definition at line 224 of file osd.h.

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

◆ m_NextPulseUpdate

QDateTime OSD::m_NextPulseUpdate
private

Definition at line 225 of file osd.h.

Referenced by CheckExpiry(), and DialogShow().

◆ m_Refresh

bool OSD::m_Refresh
private

Definition at line 226 of file osd.h.

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

◆ m_Visible

bool OSD::m_Visible
private

Definition at line 227 of file osd.h.

Referenced by DrawDirect().

◆ m_Timeouts

int OSD::m_Timeouts[4]
private

Definition at line 228 of file osd.h.

Referenced by SetExpiry1(), and SetTimeouts().

◆ m_UIScaleOverride

bool OSD::m_UIScaleOverride
private

Definition at line 230 of file osd.h.

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

◆ m_SavedWMult

float OSD::m_SavedWMult
private

Definition at line 231 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_SavedHMult

float OSD::m_SavedHMult
private

Definition at line 232 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_SavedUIRect

QRect OSD::m_SavedUIRect
private

Definition at line 233 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_fontStretch

int OSD::m_fontStretch
private

Definition at line 234 of file osd.h.

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

◆ m_savedFontStretch

int OSD::m_savedFontStretch
private

Definition at line 235 of file osd.h.

Referenced by OverrideUIScale(), and RevertUIScale().

◆ m_FunctionalType

enum OSDFunctionalType OSD::m_FunctionalType
private

Definition at line 237 of file osd.h.

Referenced by HideWindow(), SendHideEvent(), and SetFunctionalWindow().

◆ m_FunctionalWindow

QString OSD::m_FunctionalWindow
private

Definition at line 238 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 241 of file osd.h.

Referenced by CheckExpiry(), Draw(), DrawDirect(), and SetExpiry1().


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