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 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 
e
QDomElement e
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1420
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(GrabberScript *)
VideoSelector::clearAll
void clearAll(void)
Definition: videoselector.cpp:162
VideoSelector::setCategory
void setCategory(MythUIButtonListItem *item)
Definition: videoselector.cpp:507
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:98
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:39
VideoSelector::toggleSelected
void toggleSelected(MythUIButtonListItem *item)
Definition: videoselector.cpp:171
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:368
VideoInfo::plot
QString plot
Definition: videoselector.h:30
VideoSelector::updateSelectedList
void updateSelectedList(void)
Definition: videoselector.cpp:513
ParentalLevelChangeChecker
Definition: parentalcontrols.h:44
VideoSelector::m_parentalLevelChecker
ParentalLevelChangeChecker * m_parentalLevelChecker
Definition: videoselector.h:75
VideoSelector::titleChanged
void titleChanged(MythUIButtonListItem *item)
Definition: videoselector.cpp:190
VideoSelector::m_titleText
MythUIText * m_titleText
Definition: videoselector.h:89
VideoSelector::cancelPressed
void cancelPressed(void)
Definition: videoselector.cpp:311
VideoSelector::m_videoList
std::vector< VideoInfo * > * m_videoList
Definition: videoselector.h:78
VideoSelector::selectAll
void selectAll(void)
Definition: videoselector.cpp:150
VideoSelector::setParentalLevel
void setParentalLevel(ParentalLevel::Level level)
Definition: videoselector.cpp:534
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
VideoSelector::Create
bool Create() override
Definition: videoselector.cpp:43
VideoSelector::m_archiveList
QList< ArchiveItem * > * m_archiveList
Definition: videoselector.h:77
VideoSelector::keyPressEvent
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
Definition: videoselector.cpp:92
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:539
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
VideoSelector::OKPressed
void OKPressed(void)
Definition: videoselector.cpp:239
VideoInfo
Definition: videoselector.h:27
VideoSelector::ShowMenu
void ShowMenu(void) override
Definition: videoselector.cpp:135
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:68
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
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:25
VideoSelector::~VideoSelector
~VideoSelector(void) override
Definition: videoselector.cpp:34
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:144
VideoSelector::updateVideoList
void updateVideoList(void)
Definition: videoselector.cpp:317
VideoSelector::m_videoButtonList
MythUIButtonList * m_videoButtonList
Definition: videoselector.h:84
VideoSelector::getVideoList
void getVideoList(void)
Definition: videoselector.cpp:471
mythscreentype.h
VideoInfo::coverfile
QString coverfile
Definition: videoselector.h:33