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

#include <osd.h>

Inheritance diagram for OSD:
Inheritance graph
[legend]
Collaboration diagram for OSD:
Collaboration graph
[legend]

Public Slots

void SetText (const QString &Window, const InfoMap &Map, OSDTimeout Timeout)
 
void DialogQuit ()
 
void HideAll (bool KeepSubs=true, MythScreenType *Except=nullptr, bool DropNotification=false)
 

Signals

void HideOSD (OSDFunctionalType Type)
 

Public Member Functions

 OSD (MythMainWindow *MainWindow, TV *Tv, MythPlayerUI *Player, MythPainter *Painter)
 
 ~OSD () override
 
bool Init (QRect Rect, float FontAspect) override
 
void HideWindow (const QString &Window) override
 
void SetFunctionalWindow (const QString &Window, enum OSDFunctionalType Type)
 
void SetExpiry (const QString &Window, enum OSDTimeout Timeout, int CustomTimeout=0)
 
void ResetWindow (const QString &Window)
 
void Draw (QRect Rect)
 
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 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 DialogGetText (InfoMap &Map)
 
- Public Member Functions inherited from MythMediaOverlay
 MythMediaOverlay (MythMainWindow *MainWindow, TV *Tv, MythPlayerUI *Player, MythPainter *Painter)
 
 ~MythMediaOverlay () override
 
void SetPlayer (MythPlayerUI *Player)
 
QRect Bounds () const
 
int GetFontStretch () const
 
bool HasWindow (const QString &Window)
 
virtual MythScreenTypeGetWindow (const QString &Window)
 

Protected Slots

void ShowDialog (const MythOSDDialogData &Data)
 Show a dialog menu, removing any existing dialog. More...
 
void IsOSDVisible (bool &Visible)
 

Private Member Functions

void PositionWindow (MythScreenType *Window)
 
void RemoveWindow (const QString &Window)
 
void DialogShow (const QString &Window, const QString &Text="", int UpdateFor=0)
 
void DialogAddButton (const QString &Text, QVariant Data, bool Menu=false, bool Current=false)
 
void DialogBack (const QString &Text="", const QVariant &Data=0, bool Exit=false)
 
void TearDown () override
 
void LoadWindows ()
 
void CheckExpiry ()
 
void SetExpiryPriv (const QString &Window, enum OSDTimeout Timeout, int CustomTimeout)
 

Private Attributes

int m_fadeTime { kOSDFadeTime }
 
MythScreenTypem_dialog { nullptr }
 
QString m_pulsedDialogText { }
 
QDateTime m_nextPulseUpdate { }
 
std::array< int, 4 > m_timeouts { -1, 3000, 5000, 13000 }
 
QString m_functionalWindow { }
 
QHash< MythScreenType *, QDateTime > m_expireTimes { }
 

Additional Inherited Members

- Protected Member Functions inherited from MythMediaOverlay
void OverrideUIScale (bool Log=true)
 
void RevertUIScale ()
 
MythScreenTypeInitWindow (const QString &Window, MythScreenType *Screen)
 
- Protected Attributes inherited from MythMediaOverlay
MythMainWindowm_mainWindow { nullptr }
 
TVm_tv { nullptr }
 
MythPlayerUIm_player { nullptr }
 
MythPainterm_painter { nullptr }
 
QRect m_rect { }
 
bool m_uiScaleOverride { false }
 
float m_savedWMult { 1.0F }
 
float m_savedHMult { 1.0F }
 
QRect m_savedUIRect { }
 
int m_fontStretch { 0 }
 
int m_savedFontStretch { 0 }
 
QMap< QString, MythScreenType * > m_children { }
 

Detailed Description

Definition at line 94 of file osd.h.

Constructor & Destructor Documentation

◆ OSD()

OSD::OSD ( MythMainWindow MainWindow,
TV Tv,
MythPlayerUI Player,
MythPainter Painter 
)

Definition at line 30 of file osd.cpp.

◆ ~OSD()

OSD::~OSD ( )
override

Definition at line 39 of file osd.cpp.

Member Function Documentation

◆ HideOSD

void OSD::HideOSD ( OSDFunctionalType  Type)
signal

◆ SetText

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

◆ DialogQuit

void OSD::DialogQuit ( )
slot

◆ HideAll

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

◆ ShowDialog

void OSD::ShowDialog ( const MythOSDDialogData Data)
protectedslot

Show a dialog menu, removing any existing dialog.

This slot deliberately uses a const reference despite the minor performance penalty. This simplifies memory management (e.g. if the signal is not delivered when there is no OSD) and allows for possible future changes where the OSD and TV objects do not reside in the same thread.

Definition at line 721 of file osd.cpp.

Referenced by OSD().

◆ IsOSDVisible

void OSD::IsOSDVisible ( bool Visible)
protectedslot

Definition at line 77 of file osd.cpp.

Referenced by OSD().

◆ Init()

bool OSD::Init ( QRect  Rect,
float  FontAspect 
)
overridevirtual

Reimplemented from MythMediaOverlay.

Definition at line 50 of file osd.cpp.

Referenced by MythPlayerVideoUI::ReinitOSD(), and MythPlayerUI::VideoStart().

◆ HideWindow()

void OSD::HideWindow ( const QString &  Window)
overridevirtual

◆ SetFunctionalWindow()

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

Definition at line 651 of file osd.cpp.

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

◆ SetExpiry()

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

◆ ResetWindow()

void OSD::ResetWindow ( const QString &  Window)

◆ Draw()

void OSD::Draw ( QRect  Rect)

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

◆ SetRegions()

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

Definition at line 369 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ SetGraph()

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

Definition at line 435 of file osd.cpp.

Referenced by DeleteMap::UpdateOSD().

◆ IsWindowVisible()

bool OSD::IsWindowVisible ( const QString &  Window)

◆ DialogVisible()

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

◆ DialogHandleKeypress()

bool OSD::DialogHandleKeypress ( QKeyEvent *  Event)

Definition at line 690 of file osd.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ DialogHandleGesture()

bool OSD::DialogHandleGesture ( MythGestureEvent Event)

Definition at line 697 of file osd.cpp.

Referenced by TV::ProcessKeypressOrGesture().

◆ DialogGetText()

void OSD::DialogGetText ( InfoMap Map)

Definition at line 820 of file osd.cpp.

Referenced by TV::HandleOSDChannelEdit().

◆ PositionWindow()

void OSD::PositionWindow ( MythScreenType Window)
private

Definition at line 630 of file osd.cpp.

Referenced by DialogShow(), and LoadWindows().

◆ RemoveWindow()

void OSD::RemoveWindow ( const QString &  Window)
private

Definition at line 640 of file osd.cpp.

Referenced by DialogQuit().

◆ DialogShow()

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

Definition at line 730 of file osd.cpp.

Referenced by ShowDialog().

◆ DialogAddButton()

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

Definition at line 813 of file osd.cpp.

◆ DialogBack()

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

Definition at line 802 of file osd.cpp.

Referenced by DialogShow(), and ShowDialog().

◆ TearDown()

void OSD::TearDown ( )
overrideprivatevirtual

Reimplemented from MythMediaOverlay.

Definition at line 44 of file osd.cpp.

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

◆ LoadWindows()

void OSD::LoadWindows ( )
private

Definition at line 115 of file osd.cpp.

Referenced by Init().

◆ CheckExpiry()

void OSD::CheckExpiry ( )
private

Definition at line 538 of file osd.cpp.

Referenced by Draw().

◆ SetExpiryPriv()

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

Definition at line 593 of file osd.cpp.

Referenced by SetExpiry().

Member Data Documentation

◆ m_fadeTime

int OSD::m_fadeTime { kOSDFadeTime }
private

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

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

◆ m_nextPulseUpdate

QDateTime OSD::m_nextPulseUpdate { }
private

Definition at line 148 of file osd.h.

Referenced by CheckExpiry(), and DialogShow().

◆ m_timeouts

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

Definition at line 149 of file osd.h.

Referenced by SetExpiryPriv().

◆ m_functionalWindow

QString OSD::m_functionalWindow { }
private

Definition at line 151 of file osd.h.

Referenced by HideWindow(), and SetFunctionalWindow().

◆ m_expireTimes

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

Definition at line 152 of file osd.h.

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


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