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
16 
17 // mytharchive
18 #include "archiveutil.h"
19 
20 class ProgramInfo;
21 class MythUIText;
22 class MythUIButton;
23 class MythUIButtonList;
25 
26 struct VideoInfo
27 {
28  int id { 0 };
29  QString title;
30  QString plot;
31  QString category;
32  QString filename;
33  QString coverfile;
35  uint64_t size { 0 };
36 };
37 
39 {
40  Q_OBJECT
41 
42  public:
43  VideoSelector(MythScreenStack *parent, QList<ArchiveItem *> *archiveList);
44 
45  ~VideoSelector(void) override;
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  static 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 
VideoSelector::clearAll
void clearAll(void)
Definition: videoselector.cpp:164
VideoSelector::setCategory
void setCategory(MythUIButtonListItem *item)
Definition: videoselector.cpp:509
VideoSelector::m_categorySelector
MythUIButtonList * m_categorySelector
Definition: videoselector.h:88
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
VideoSelector::m_plotText
MythUIText * m_plotText
Definition: videoselector.h:91
VideoSelector::haveResult
void haveResult(bool ok)
VideoInfo::title
QString title
Definition: videoselector.h:29
parentalcontrols.h
VideoSelector::m_warningText
MythUIText * m_warningText
Definition: videoselector.h:85
VideoSelector
Definition: videoselector.h:38
VideoSelector::toggleSelected
void toggleSelected(MythUIButtonListItem *item)
Definition: videoselector.cpp:173
MythScreenStack
Definition: mythscreenstack.h:16
VideoSelector::m_selectedList
QList< VideoInfo * > m_selectedList
Definition: videoselector.h:79
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
VideoSelector::m_currentParentalLevel
ParentalLevel::Level m_currentParentalLevel
Definition: videoselector.h:81
VideoSelector::getVideoListFromDB
static std::vector< VideoInfo * > * getVideoListFromDB(void)
Definition: videoselector.cpp:370
VideoInfo::plot
QString plot
Definition: videoselector.h:30
VideoSelector::updateSelectedList
void updateSelectedList(void)
Definition: videoselector.cpp:514
ParentalLevelChangeChecker
Definition: parentalcontrols.h:43
VideoSelector::m_parentalLevelChecker
ParentalLevelChangeChecker * m_parentalLevelChecker
Definition: videoselector.h:75
VideoSelector::titleChanged
void titleChanged(MythUIButtonListItem *item)
Definition: videoselector.cpp:192
VideoSelector::m_titleText
MythUIText * m_titleText
Definition: videoselector.h:89
VideoSelector::cancelPressed
void cancelPressed(void)
Definition: videoselector.cpp:313
VideoSelector::m_videoList
std::vector< VideoInfo * > * m_videoList
Definition: videoselector.h:78
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(StandardSetting *)
VideoSelector::selectAll
void selectAll(void)
Definition: videoselector.cpp:152
VideoSelector::setParentalLevel
void setParentalLevel(ParentalLevel::Level level)
Definition: videoselector.cpp:535
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
VideoSelector::Create
bool Create() override
Definition: videoselector.cpp:45
VideoSelector::m_archiveList
QList< ArchiveItem * > * m_archiveList
Definition: videoselector.h:77
VideoSelector::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: videoselector.cpp:94
VideoSelector::m_plText
MythUIText * m_plText
Definition: videoselector.h:83
ParentalLevel::plNone
@ plNone
Definition: parentalcontrols.h:12
VideoSelector::wireUpTheme
void wireUpTheme(void)
ParentalLevel::Level
Level
Definition: parentalcontrols.h:12
archiveutil.h
VideoInfo::filename
QString filename
Definition: videoselector.h:32
VideoSelector::parentalLevelChanged
void parentalLevelChanged(bool passwordValid, ParentalLevel::Level newLevel)
Definition: videoselector.cpp:540
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
VideoSelector::OKPressed
void OKPressed(void)
Definition: videoselector.cpp:241
VideoInfo
Definition: videoselector.h:26
VideoSelector::ShowMenu
void ShowMenu(void) override
Definition: videoselector.cpp:137
VideoSelector::m_coverImage
MythUIImage * m_coverImage
Definition: videoselector.h:92
VideoSelector::m_okButton
MythUIButton * m_okButton
Definition: videoselector.h:86
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
VideoInfo::parentalLevel
int parentalLevel
Definition: videoselector.h:34
VideoSelector::m_cancelButton
MythUIButton * m_cancelButton
Definition: videoselector.h:87
VideoInfo::size
uint64_t size
Definition: videoselector.h:35
VideoSelector::m_filesizeText
MythUIText * m_filesizeText
Definition: videoselector.h:90
VideoSelector::VideoSelector
VideoSelector(MythScreenStack *parent, QList< ArchiveItem * > *archiveList)
Definition: videoselector.cpp:27
VideoSelector::~VideoSelector
~VideoSelector(void) override
Definition: videoselector.cpp:36
VideoInfo::category
QString category
Definition: videoselector.h:31
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:191
VideoSelector::updateVideoList
void updateVideoList(void)
Definition: videoselector.cpp:319
VideoSelector::m_videoButtonList
MythUIButtonList * m_videoButtonList
Definition: videoselector.h:84
VideoSelector::getVideoList
void getVideoList(void)
Definition: videoselector.cpp:473
mythscreentype.h
VideoInfo::coverfile
QString coverfile
Definition: videoselector.h:33