MythTV master
proginfolist.h
Go to the documentation of this file.
1
3
4#ifndef PROG_INFO_LIST_H
5#define PROG_INFO_LIST_H
6
8
10
12class ProgInfoList : QObject
13{
14 Q_OBJECT
15
16 public:
17 enum VisibleLevel : std::uint8_t { 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
Screen in which all other widgets are contained and rendered.
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
virtual bool MoveDown(MovementUnit unit=MoveItem, uint amount=0)
void Reset() override
Reset the widget to it's original state, should not reset changes made by the theme.
virtual bool MoveUp(MovementUnit unit=MoveItem, uint amount=0)
The info/details buttonlist overlay that displays key:data info.
Definition: proginfolist.h:13
ProgInfoList(MythScreenType &screen)
Definition: proginfolist.h:24
void PageDown(void)
Definition: proginfolist.h:33
std::tuple< QString, QString, int > DataItem
Definition: proginfolist.h:20
void CreateButton(const QString &name, const QString &value)
Populate a buttonlist item with name & value.
void PageUp(void)
Definition: proginfolist.h:34
VisibleLevel m_infoVisible
Info list state.
Definition: proginfolist.h:44
VisibleLevel GetLevel(void) const
Definition: proginfolist.h:31
MythUIButtonList * m_btnList
Overlay buttonlist.
Definition: proginfolist.h:43
bool Create(bool focusable)
Initialise buttonlist from XML.
QList< DataItem > DataList
Definition: proginfolist.h:21
void Display(const DataList &data)
Build list of key:value buttons.
bool Hide(void)
Remove infolist from display.
MythScreenType & m_screen
Parent screen.
Definition: proginfolist.h:42
void Toggle(void)
Toggle infolist state. Focusable widgets toggle between Basic & Full info. Non-focusable widgets togg...
void Clear()
Definition: proginfolist.h:37