MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
MythTVMenu Class Reference

#include <mythtvmenu.h>

Public Member Functions

 MythTVMenu ()=default
 
 ~MythTVMenu ()
 
bool LoadFromFile (MenuTypeId id, const QString &Filename, const QString &Menuname, const char *TranslationContext, const QString &KeyBindingContext, int IncludeLevel=0)
 
bool LoadFromString (MenuTypeId id, const QString &Text, const QString &Menuname, const char *TranslationContext, const QString &KeyBindingContext, int IncludeLevel=0)
 
bool IsLoaded () const
 
QDomElement GetRoot () const
 
QString Translate (const QString &Text) const
 
bool Show (const QDomNode &Node, const QDomNode &Selected, MythTVMenuItemDisplayer &Displayer, MythOSDDialogData *Menu, bool Display=true) const
 
QString GetName () const
 
const char * GetTranslationContext () const
 
const QString & GetKeyBindingContext () const
 
QDomNode GetNodeFromPath (const QString &path) const
 

Static Public Member Functions

static bool MatchesGroup (const QString &Name, const QString &Prefix, MenuCategory Category, QString &OutPrefix)
 
static QString GetPathFromNode (QDomNode Node)
 

Private Member Functions

void ProcessIncludes (QDomElement &Root, int IncludeLevel)
 

Private Attributes

MenuTypeId m_id { kMenuIdUnknown }
 
QDomDocument * m_document { nullptr }
 
const char * m_translationContext { "" }
 
QString m_menuName
 
QString m_keyBindingContext
 

Friends

class TV
 

Detailed Description

Definition at line 83 of file mythtvmenu.h.

Constructor & Destructor Documentation

◆ MythTVMenu()

MythTVMenu::MythTVMenu ( )
default

◆ ~MythTVMenu()

MythTVMenu::~MythTVMenu ( )

Definition at line 88 of file mythtvmenu.cpp.

Member Function Documentation

◆ MatchesGroup()

bool MythTVMenu::MatchesGroup ( const QString &  Name,
const QString &  Prefix,
MenuCategory  Category,
QString &  OutPrefix 
)
static

Definition at line 123 of file mythtvmenu.cpp.

Referenced by TV::MenuItemDisplayPlayback().

◆ LoadFromFile()

bool MythTVMenu::LoadFromFile ( MenuTypeId  id,
const QString &  Filename,
const QString &  Menuname,
const char *  TranslationContext,
const QString &  KeyBindingContext,
int  IncludeLevel = 0 
)

Definition at line 189 of file mythtvmenu.cpp.

Referenced by TV::ShowOSDCutpoint(), and TV::ShowOSDMenu().

◆ LoadFromString()

bool MythTVMenu::LoadFromString ( MenuTypeId  id,
const QString &  Text,
const QString &  Menuname,
const char *  TranslationContext,
const QString &  KeyBindingContext,
int  IncludeLevel = 0 
)

Definition at line 230 of file mythtvmenu.cpp.

◆ IsLoaded()

bool MythTVMenu::IsLoaded ( ) const

Definition at line 98 of file mythtvmenu.cpp.

Referenced by TV::ShowOSDCutpoint(), and TV::ShowOSDMenu().

◆ GetRoot()

QDomElement MythTVMenu::GetRoot ( ) const

◆ Translate()

QString MythTVMenu::Translate ( const QString &  Text) const

Definition at line 118 of file mythtvmenu.cpp.

Referenced by LoadFromFile(), LoadFromString(), TV::PlaybackMenuShow(), and Show().

◆ Show()

bool MythTVMenu::Show ( const QDomNode &  Node,
const QDomNode &  Selected,
MythTVMenuItemDisplayer Displayer,
MythOSDDialogData Menu,
bool  Display = true 
) const

◆ GetName()

QString MythTVMenu::GetName ( ) const

Definition at line 93 of file mythtvmenu.cpp.

Referenced by TV::PlaybackMenuShow().

◆ GetTranslationContext()

const char * MythTVMenu::GetTranslationContext ( ) const

Definition at line 108 of file mythtvmenu.cpp.

◆ GetKeyBindingContext()

const QString & MythTVMenu::GetKeyBindingContext ( ) const

Definition at line 113 of file mythtvmenu.cpp.

Referenced by TV::MenuItemDisplayCutlist(), and TV::MenuItemDisplayPlayback().

◆ GetPathFromNode()

QString MythTVMenu::GetPathFromNode ( QDomNode  Node)
static

◆ GetNodeFromPath()

QDomNode MythTVMenu::GetNodeFromPath ( const QString &  path) const

Definition at line 149 of file mythtvmenu.cpp.

◆ ProcessIncludes()

void MythTVMenu::ProcessIncludes ( QDomElement &  Root,
int  IncludeLevel 
)
private

Definition at line 255 of file mythtvmenu.cpp.

Referenced by LoadFromFile(), and LoadFromString().

Friends And Related Function Documentation

◆ TV

friend class TV
friend

Definition at line 107 of file mythtvmenu.h.

Member Data Documentation

◆ m_id

MenuTypeId MythTVMenu::m_id { kMenuIdUnknown }
private

◆ m_document

QDomDocument* MythTVMenu::m_document { nullptr }
private

◆ m_translationContext

const char* MythTVMenu::m_translationContext { "" }
private

◆ m_menuName

QString MythTVMenu::m_menuName
private

Definition at line 115 of file mythtvmenu.h.

Referenced by GetName(), LoadFromFile(), and LoadFromString().

◆ m_keyBindingContext

QString MythTVMenu::m_keyBindingContext
private

Definition at line 116 of file mythtvmenu.h.

Referenced by GetKeyBindingContext(), LoadFromFile(), LoadFromString(), and ProcessIncludes().


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