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) override;
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
RecordingSelector::haveResult
void haveResult(bool ok)
e
QDomElement e
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1420
RecordingSelector::RecordingSelector
RecordingSelector(MythScreenStack *parent, QList< ArchiveItem * > *archiveList)
Definition: recordingselector.h:35
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
GetRecordingListThread
Definition: recordingselector.cpp:34
RecordingSelector::Create
bool Create() override
Definition: recordingselector.cpp:59
RecordingSelector::setCategory
void setCategory(MythUIButtonListItem *item)
Definition: recordingselector.cpp:488
RecordingSelector::ShowMenu
void ShowMenu(void) override
Definition: recordingselector.cpp:177
RecordingSelector::m_categorySelector
MythUIButtonList * m_categorySelector
Definition: recordingselector.h:73
MythScreenStack
Definition: mythscreenstack.h:16
RecordingSelector::toggleSelected
void toggleSelected(MythUIButtonListItem *item)
Definition: recordingselector.cpp:213
RecordingSelector::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: recordingselector.cpp:150
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
RecordingSelector::m_filesizeText
MythUIText * m_filesizeText
Definition: recordingselector.h:76
RecordingSelector::m_titleText
MythUIText * m_titleText
Definition: recordingselector.h:74
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
RecordingSelector::getRecordingList
void getRecordingList(void)
Definition: recordingselector.cpp:445
RecordingSelector::selectAll
void selectAll(void)
Definition: recordingselector.cpp:192
RecordingSelector::clearAll
void clearAll(void)
Definition: recordingselector.cpp:204
RecordingSelector::m_previewImage
MythUIImage * m_previewImage
Definition: recordingselector.h:78
RecordingSelector
Definition: recordingselector.h:30
RecordingSelector::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: recordingselector.cpp:107
archiveutil.h
RecordingSelector::titleChanged
void titleChanged(MythUIButtonListItem *item)
Definition: recordingselector.cpp:232
RecordingSelector::m_selectedList
QList< ProgramInfo * > m_selectedList
Definition: recordingselector.h:67
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
RecordingSelector::updateRecordingList
void updateRecordingList(void)
Definition: recordingselector.cpp:361
RecordingSelector::updateSelectedList
void updateSelectedList(void)
Definition: recordingselector.cpp:494
RecordingSelector::cancelPressed
void cancelPressed(void)
Definition: recordingselector.cpp:355
RecordingSelector::updateCategorySelector
void updateCategorySelector(void)
Definition: recordingselector.cpp:471
RecordingSelector::m_okButton
MythUIButton * m_okButton
Definition: recordingselector.h:71
RecordingSelector::m_recordingButtonList
MythUIButtonList * m_recordingButtonList
Definition: recordingselector.h:70
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
RecordingSelector::m_datetimeText
MythUIText * m_datetimeText
Definition: recordingselector.h:75
RecordingSelector::m_recordingList
std::vector< ProgramInfo * > * m_recordingList
Definition: recordingselector.h:66
RecordingSelector::~RecordingSelector
~RecordingSelector(void) override
Definition: recordingselector.cpp:52
RecordingSelector::m_cutlistImage
MythUIImage * m_cutlistImage
Definition: recordingselector.h:79
RecordingSelector::m_categories
QStringList m_categories
Definition: recordingselector.h:68
RecordingSelector::m_descriptionText
MythUIText * m_descriptionText
Definition: recordingselector.h:77
RecordingSelector::OKPressed
void OKPressed(void)
Definition: recordingselector.cpp:282
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:144
RecordingSelector::m_cancelButton
MythUIButton * m_cancelButton
Definition: recordingselector.h:72
mythscreentype.h
RecordingSelector::m_archiveList
QList< ArchiveItem * > * m_archiveList
Definition: recordingselector.h:65