MythTV  master
videoselector.h
Go to the documentation of this file.
1 /*
2  videoselector.h
3 
4  header for the video selector interface screen
5 */
6 
7 #ifndef VIDEOSELECTOR_H_
8 #define VIDEOSELECTOR_H_
9 
10 // c++
11 #include <vector>
12 
13 // mythtv
14 #include <mythscreentype.h>
16 
17 // mytharchive
18 #include "archiveutil.h"
19 
20 class ProgramInfo;
21 class MythUIText;
22 class MythUIButton;
23 class MythUIButtonList;
25 
26 typedef struct
27 {
28  int id;
29  QString title;
30  QString plot;
31  QString category;
32  QString filename;
33  QString coverfile;
35  uint64_t size;
36 } VideoInfo;
37 
39 {
40  Q_OBJECT
41 
42  public:
43  VideoSelector(MythScreenStack *parent, QList<ArchiveItem *> *archiveList);
44 
45  ~VideoSelector(void);
46 
47  bool Create() override; // MythScreenType
48  bool keyPressEvent(QKeyEvent *e) override; // MythScreenType
49 
50  signals:
51  void haveResult(bool ok);
52 
53  public slots:
54  void OKPressed(void);
55  void cancelPressed(void);
56 
57  void ShowMenu(void) override; // MythScreenType
58  void selectAll(void);
59  void clearAll(void);
60 
64 
65  void parentalLevelChanged(bool passwordValid, ParentalLevel::Level newLevel);
66 
67  private:
68  void updateVideoList(void);
69  void updateSelectedList(void);
70  void getVideoList(void);
71  void wireUpTheme(void);
72  std::vector<VideoInfo *> *getVideoListFromDB(void);
74 
76 
77  QList<ArchiveItem *> *m_archiveList {nullptr};
78  std::vector<VideoInfo *> *m_videoList {nullptr};
79  QList<VideoInfo *> m_selectedList;
80 
82 
83  MythUIText *m_plText {nullptr};
89  MythUIText *m_titleText {nullptr};
91  MythUIText *m_plotText {nullptr};
93 };
94 
96 
97 #endif
98 
99 
void titleChanged(MythUIButtonListItem *item)
unsigned int slots[4]
Definition: element.c:38
void toggleSelected(MythUIButtonListItem *item)
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void ShowMenu(void) override
MythUIImage * m_coverImage
Definition: videoselector.h:92
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
QString coverfile
Definition: videoselector.h:33
std::vector< VideoInfo * > * getVideoListFromDB(void)
void OKPressed(void)
int parentalLevel
Definition: videoselector.h:34
MythUIText * m_warningText
Definition: videoselector.h:85
Q_DECLARE_METATYPE(GrabberScript *)
QString plot
Definition: videoselector.h:30
ParentalLevel::Level m_currentParentalLevel
Definition: videoselector.h:81
MythUIButton * m_okButton
Definition: videoselector.h:86
void haveResult(bool ok)
Holds information on recordings and videos.
Definition: programinfo.h:66
QString filename
Definition: videoselector.h:32
MythUIText * m_plotText
Definition: videoselector.h:91
ParentalLevelChangeChecker * m_parentalLevelChecker
Definition: videoselector.h:75
MythUIButtonList * m_videoButtonList
Definition: videoselector.h:84
void getVideoList(void)
MythUIButton * m_cancelButton
Definition: videoselector.h:87
void setParentalLevel(ParentalLevel::Level level)
bool Create() override
void setCategory(MythUIButtonListItem *item)
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
std::vector< VideoInfo * > * m_videoList
Definition: videoselector.h:78
A single button widget.
Definition: mythuibutton.h:21
void updateVideoList(void)
void cancelPressed(void)
void selectAll(void)
QString category
Definition: videoselector.h:31
MythUIText * m_filesizeText
Definition: videoselector.h:90
MythUIButtonList * m_categorySelector
Definition: videoselector.h:88
void parentalLevelChanged(bool passwordValid, ParentalLevel::Level newLevel)
void updateSelectedList(void)
MythUIText * m_titleText
Definition: videoselector.h:89
uint64_t size
Definition: videoselector.h:35
Screen in which all other widgets are contained and rendered.
MythUIText * m_plText
Definition: videoselector.h:83
QList< ArchiveItem * > * m_archiveList
Definition: videoselector.h:77
void wireUpTheme(void)
void clearAll(void)
QList< VideoInfo * > m_selectedList
Definition: videoselector.h:79
VideoSelector(MythScreenStack *parent, QList< ArchiveItem * > *archiveList)
QString title
Definition: videoselector.h:29