MythTV  master
proginfolist.h
Go to the documentation of this file.
1 
4 #ifndef PROG_INFO_LIST_H
5 #define PROG_INFO_LIST_H
6 
7 #include "mythuibuttonlist.h"
8 
9 class MythScreenType;
10 
12 class ProgInfoList : QObject
13 {
14  Q_OBJECT
15 
16  public:
17  enum VisibleLevel { kNone = 0, kLevel1 = 1, kLevel2 = 2 };
18 
19  // name, data, level
20  using DataItem = std::tuple<QString, QString, int>;
21  using DataList = QList<DataItem>;
22 
23  public:
24  explicit ProgInfoList(MythScreenType &screen)
25  : m_screen(screen) {}
26 
27  bool Create(bool focusable);
28  void Toggle(void);
29  bool Hide(void);
30  void Display(const DataList& data);
31  VisibleLevel GetLevel(void) const { return m_infoVisible; }
32 
35 
36  private slots:
37  void Clear() { m_btnList->Reset(); }
38 
39  private:
40  void CreateButton(const QString &name, const QString &value);
41 
45 };
46 
47 #endif // PROG_INFO_LIST_H
ProgInfoList::GetLevel
VisibleLevel GetLevel(void) const
Definition: proginfolist.h:31
ProgInfoList::kNone
@ kNone
Definition: proginfolist.h:17
ProgInfoList::DataItem
std::tuple< QString, QString, int > DataItem
Definition: proginfolist.h:20
MythUIButtonList::MoveDown
virtual bool MoveDown(MovementUnit unit=MoveItem, uint amount=0)
Definition: mythuibuttonlist.cpp:2163
ProgInfoList::kLevel1
@ kLevel1
Definition: proginfolist.h:17
ProgInfoList
The info/details buttonlist overlay that displays key:data info.
Definition: proginfolist.h:13
ProgInfoList::ProgInfoList
ProgInfoList(MythScreenType &screen)
Definition: proginfolist.h:24
slots
unsigned int slots[4]
Definition: element.cpp:38
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
mythuibuttonlist.h
ProgInfoList::PageUp
void PageUp(void)
Definition: proginfolist.h:34
MythUIButtonList::MovePage
@ MovePage
Definition: mythuibuttonlist.h:157
ProgInfoList::PageDown
void PageDown(void)
Definition: proginfolist.h:33
ProgInfoList::Create
bool Create(bool focusable)
Initialise buttonlist from XML.
Definition: proginfolist.cpp:11
ProgInfoList::Toggle
void Toggle(void)
Toggle infolist state. Focusable widgets toggle between Basic & Full info. Non-focusable widgets togg...
Definition: proginfolist.cpp:28
ProgInfoList::kLevel2
@ kLevel2
Definition: proginfolist.h:17
ProgInfoList::m_infoVisible
VisibleLevel m_infoVisible
Info list state.
Definition: proginfolist.h:44
MythUIButtonList::MoveUp
virtual bool MoveUp(MovementUnit unit=MoveItem, uint amount=0)
Definition: mythuibuttonlist.cpp:1945
ProgInfoList::Display
void Display(const DataList &data)
Build list of key:value buttons.
Definition: proginfolist.cpp:93
ProgInfoList::DataList
QList< DataItem > DataList
Definition: proginfolist.h:21
ProgInfoList::CreateButton
void CreateButton(const QString &name, const QString &value)
Populate a buttonlist item with name & value.
Definition: proginfolist.cpp:74
MythUIButtonList::Reset
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
Definition: mythuibuttonlist.cpp:114
ProgInfoList::Clear
void Clear()
Definition: proginfolist.h:37
ProgInfoList::m_btnList
MythUIButtonList * m_btnList
Overlay buttonlist.
Definition: proginfolist.h:43
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
ProgInfoList::Hide
bool Hide(void)
Remove infolist from display.
Definition: proginfolist.cpp:56
ProgInfoList::m_screen
MythScreenType & m_screen
Parent screen.
Definition: proginfolist.h:42
ProgInfoList::VisibleLevel
VisibleLevel
Definition: proginfolist.h:17