MythTV  master
recordingselector.h
Go to the documentation of this file.
1 /*
2  recordingselector.h
3 
4  header for the recording selector interface screen
5 */
6 
7 #ifndef RECORDINGSELECTOR_H_
8 #define RECORDINGSELECTOR_H_
9 
10 // c++
11 #include <vector>
12 
13 // qt
14 #include <QList>
15 #include <QStringList>
16 
17 // mythtv
18 #include <mythscreentype.h>
19 
20 // mytharchive
21 #include "archiveutil.h"
22 
23 class ProgramInfo;
24 class MythUIText;
25 class MythUIButton;
26 class MythUIButtonList;
28 
30 {
31 
32  Q_OBJECT
33 
34  public:
35  RecordingSelector(MythScreenStack *parent, QList<ArchiveItem *> *archiveList)
36  : MythScreenType(parent, "RecordingSelector"),
37  m_archiveList(archiveList) {}
38  ~RecordingSelector(void);
39 
40  bool Create() override; // MythScreenType
41  bool keyPressEvent(QKeyEvent *e) override; // MythScreenType
42 
43  signals:
44  void haveResult(bool ok);
45 
46  public slots:
47  void OKPressed(void);
48  void cancelPressed(void);
49 
50  void ShowMenu(void) override; // MythScreenType
51  void selectAll(void);
52  void clearAll(void);
53 
57 
58  private:
59  void Init(void) override; // MythScreenType
60  void updateRecordingList(void);
61  void updateSelectedList(void);
62  void updateCategorySelector(void);
63  void getRecordingList(void);
64 
65  QList<ArchiveItem *> *m_archiveList {nullptr};
66  std::vector<ProgramInfo *> *m_recordingList {nullptr};
67  QList<ProgramInfo *> m_selectedList;
68  QStringList m_categories;
69 
74  MythUIText *m_titleText {nullptr};
80 
81  friend class GetRecordingListThread;
82 };
83 
84 #endif
unsigned int slots[4]
Definition: element.c:38
void toggleSelected(MythUIButtonListItem *item)
RecordingSelector(MythScreenStack *parent, QList< ArchiveItem * > *archiveList)
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void ShowMenu(void) override
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
void haveResult(bool ok)
bool Create() override
MythUIImage * m_previewImage
MythUIButtonList * m_categorySelector
MythUIText * m_titleText
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Holds information on recordings and videos.
Definition: programinfo.h:66
void titleChanged(MythUIButtonListItem *item)
MythUIText * m_filesizeText
void updateCategorySelector(void)
MythUIButtonList * m_recordingButtonList
void updateRecordingList(void)
std::vector< ProgramInfo * > * m_recordingList
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
MythUIButton * m_okButton
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
QList< ProgramInfo * > m_selectedList
A single button widget.
Definition: mythuibutton.h:21
MythUIText * m_descriptionText
MythUIText * m_datetimeText
QList< ArchiveItem * > * m_archiveList
Screen in which all other widgets are contained and rendered.
MythUIButton * m_cancelButton
MythUIImage * m_cutlistImage
void setCategory(MythUIButtonListItem *item)
QStringList m_categories