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

#include <mythdialogbox.h>

Collaboration diagram for MythMenu:
Collaboration graph
[legend]

Public Member Functions

 MythMenu (QString text, QObject *retobject, QString resultid)
 
 MythMenu (QString title, QString text, QObject *retobject, QString resultid)
 
 ~MythMenu (void)
 
void AddItemV (const QString &title, QVariant data=0, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
 
void AddItem (const QString &title)
 
void AddItem (const QString &title, const MythUICallbackNMF &slot, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
 
template<typename SLOT >
std::enable_if_t< FunctionPointerTest< SLOT >::MemberFunction > AddItem (const QString &title, const SLOT &slot, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
 
template<typename SLOT >
std::enable_if_t< FunctionPointerTest< SLOT >::MemberConstFunction > AddItem (const QString &title, const SLOT &slot, MythMenu *subMenu=nullptr, bool selected=false, bool checked=false)
 
void SetSelectedByTitle (const QString &title)
 
void SetSelectedByData (const QVariant &data)
 
void SetParent (MythMenu *parent)
 
bool IsEmpty ()
 

Private Member Functions

void Init (void)
 
void AddItem (MythMenuItem *item, bool selected, MythMenu *subMenu)
 

Private Attributes

MythMenum_parentMenu {nullptr}
 
QString m_title
 
QString m_text
 
QString m_resultid
 
QObject * m_retObject {nullptr}
 
QList< MythMenuItem * > m_menuItems
 
int m_selectedItem {0}
 

Friends

class MythDialogBox
 

Detailed Description

Definition at line 99 of file mythdialogbox.h.

Constructor & Destructor Documentation

◆ MythMenu() [1/2]

MythMenu::MythMenu ( QString  text,
QObject *  retobject,
QString  resultid 
)

Definition at line 36 of file mythdialogbox.cpp.

◆ MythMenu() [2/2]

MythMenu::MythMenu ( QString  title,
QString  text,
QObject *  retobject,
QString  resultid 
)

Definition at line 42 of file mythdialogbox.cpp.

◆ ~MythMenu()

MythMenu::~MythMenu ( void  )

Definition at line 49 of file mythdialogbox.cpp.

Member Function Documentation

◆ AddItemV()

void MythMenu::AddItemV ( const QString &  title,
QVariant  data = 0,
MythMenu subMenu = nullptr,
bool  selected = false,
bool  checked = false 
)

Definition at line 60 of file mythdialogbox.cpp.

◆ AddItem() [1/5]

void MythMenu::AddItem ( const QString &  title)
inline

◆ AddItem() [2/5]

void MythMenu::AddItem ( const QString &  title,
const MythUICallbackNMF slot,
MythMenu subMenu = nullptr,
bool  selected = false,
bool  checked = false 
)

Definition at line 68 of file mythdialogbox.cpp.

◆ AddItem() [3/5]

template<typename SLOT >
std::enable_if_t<FunctionPointerTest<SLOT>::MemberFunction> MythMenu::AddItem ( const QString &  title,
const SLOT &  slot,
MythMenu subMenu = nullptr,
bool  selected = false,
bool  checked = false 
)
inline

Definition at line 118 of file mythdialogbox.h.

◆ AddItem() [4/5]

template<typename SLOT >
std::enable_if_t<FunctionPointerTest<SLOT>::MemberConstFunction> MythMenu::AddItem ( const QString &  title,
const SLOT &  slot,
MythMenu subMenu = nullptr,
bool  selected = false,
bool  checked = false 
)
inline

Definition at line 129 of file mythdialogbox.h.

◆ SetSelectedByTitle()

void MythMenu::SetSelectedByTitle ( const QString &  title)

Definition at line 86 of file mythdialogbox.cpp.

◆ SetSelectedByData()

void MythMenu::SetSelectedByData ( const QVariant &  data)

Definition at line 101 of file mythdialogbox.cpp.

◆ SetParent()

void MythMenu::SetParent ( MythMenu parent)
inline

Definition at line 141 of file mythdialogbox.h.

Referenced by AddItem().

◆ IsEmpty()

bool MythMenu::IsEmpty ( void  )
inline

Definition at line 143 of file mythdialogbox.h.

◆ Init()

void MythMenu::Init ( void  )
inlineprivate

Definition at line 146 of file mythdialogbox.h.

Referenced by MythMenu().

◆ AddItem() [5/5]

void MythMenu::AddItem ( MythMenuItem item,
bool  selected,
MythMenu subMenu 
)
private

Definition at line 75 of file mythdialogbox.cpp.

Friends And Related Function Documentation

◆ MythDialogBox

friend class MythDialogBox
friend

Definition at line 101 of file mythdialogbox.h.

Member Data Documentation

◆ m_parentMenu

MythMenu* MythMenu::m_parentMenu {nullptr}
private

Definition at line 149 of file mythdialogbox.h.

Referenced by MythDialogBox::keyPressEvent().

◆ m_title

QString MythMenu::m_title
private

Definition at line 150 of file mythdialogbox.h.

Referenced by MythDialogBox::updateMenu().

◆ m_text

QString MythMenu::m_text
private

Definition at line 151 of file mythdialogbox.h.

Referenced by MythDialogBox::updateMenu().

◆ m_resultid

QString MythMenu::m_resultid
private

Definition at line 152 of file mythdialogbox.h.

Referenced by MythDialogBox::SendEvent().

◆ m_retObject

QObject* MythMenu::m_retObject {nullptr}
private

Definition at line 153 of file mythdialogbox.h.

Referenced by MythDialogBox::Select(), and MythDialogBox::SendEvent().

◆ m_menuItems

QList<MythMenuItem*> MythMenu::m_menuItems
private

◆ m_selectedItem

int MythMenu::m_selectedItem {0}
private

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