MythTV  master
prevreclist.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Peter G Bennett <pbennett@mythtv.org>
3  *
4  * This file is part of MythTV.
5  *
6  * MythTV is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Public License as
8  * published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * MythTV is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with MythTV. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef PREVRECLIST_H_
21 #define PREVRECLIST_H_
22 
23 // mythfrontend
24 #include "schedulecommon.h"
25 #include "programinfo.h"
26 
27 class MythMenu;
28 
30 {
31  Q_OBJECT
32  public:
33  explicit PrevRecordedList(MythScreenStack *parent, uint recid = 0,
34  QString title = QString());
35  ~PrevRecordedList() override;
36  bool Create(void) override; // MythScreenType
37  bool keyPressEvent(QKeyEvent *e) override; // MythScreenType
38  void customEvent(QEvent *event) override; // ScheduleCommon
39 
40  protected slots:
41  void ShowMenu(void) override; // MythScreenType
42  void ShowItemMenu(void);
43  void updateInfo(void);
44  void showListLoseFocus(void);
45  void showListTakeFocus(void);
46  void DeleteOldEpisode(bool ok);
47  void AllowRecord(void);
48  void PreventRecord(void);
49  void DeleteOldSeries(bool ok);
50  void ShowDeleteOldSeriesMenu(void);
51  void ShowDeleteOldEpisodeMenu(void);
52 
53  protected:
54  void Init(void) override; // MythScreenType
55  void Load(void) override; // MythScreenType
56 
57  bool LoadTitles(void);
58  bool LoadDates(void);
59  void UpdateTitleList(void);
60  void UpdateShowList(void);
61  void UpdateList(MythUIButtonList *bnList,
62  ProgramList *progData, bool isShows);
63  void LoadShowsByTitle(void);
64  void LoadShowsByDate(void);
65 
66  ProgramInfo *GetCurrentProgram(void) const override; // ScheduleCommon
67 
68  // Left hand list - titles or dates
71  // Right hand list - show details
74  // MythUIStateType *m_groupByState {nullptr};
75 
77  MythUIText *m_help1Text {nullptr};
78  MythUIText *m_help2Text {nullptr};
79 
81 
82  bool m_titleGroup {true};
83  bool m_reverseSort {false};
84  bool m_allowEvents {true};
86  QString m_title;
87  QString m_where;
88  bool m_loadShows {false};
89 };
90 
91 #endif
ProgramList m_titleData
Definition: prevreclist.h:69
bool LoadTitles(void)
bool LoadDates(void)
ProgramInfo * GetCurrentProgram(void) const override
unsigned int slots[4]
Definition: element.c:38
~PrevRecordedList() override
Definition: prevreclist.cpp:87
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
void LoadShowsByTitle(void)
PrevRecordedList(MythScreenStack *parent, uint recid=0, QString title=QString())
Definition: prevreclist.cpp:57
void showListLoseFocus(void)
void ShowMenu(void) override
InfoMap m_infoMap
Definition: prevreclist.h:80
void AllowRecord(void)
bool keyPressEvent(QKeyEvent *e) override
Key event handler.
bool Create(void) override
Holds information on recordings and videos.
Definition: programinfo.h:67
void UpdateList(MythUIButtonList *bnList, ProgramList *progData, bool isShows)
MythUIButtonList * m_titleList
Definition: prevreclist.h:70
MythUIText * m_help2Text
Definition: prevreclist.h:78
void updateInfo(void)
void DeleteOldEpisode(bool ok)
void DeleteOldSeries(bool ok)
unsigned int uint
Definition: compat.h:140
void PreventRecord(void)
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
void UpdateShowList(void)
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
MythUIText * m_curviewText
Definition: prevreclist.h:76
void ShowDeleteOldEpisodeMenu(void)
MythUIText * m_help1Text
Definition: prevreclist.h:77
void ShowDeleteOldSeriesMenu(void)
void LoadShowsByDate(void)
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
void customEvent(QEvent *event) override
ProgramList m_showData
Definition: prevreclist.h:72
MythUIButtonList * m_showList
Definition: prevreclist.h:73
void UpdateTitleList(void)
void ShowItemMenu(void)
void showListTakeFocus(void)