MythTV  master
Go to the documentation of this file.
1 #ifndef PROGLIST_H_
2 #define PROGLIST_H_
4 // Qt headers
5 #include <QDateTime>
6 #include <QString>
8 // MythTV headers
9 #include "programinfo.h" // for ProgramList
10 #include "schedulecommon.h"
11 #include "proglist_helpers.h"
14  plUnknown = 0,
15  plTitle = 1,
29 };
31 class ProgLister : public ScheduleCommon
32 {
33  friend class PhrasePopup;
34  friend class TimePopup;
35  friend class PowerSearchPopup;
36  friend class EditPowerSearchPopup;
40  public:
41  ProgLister(MythScreenStack *parent, ProgListType pltype,
42  const QString &view, const QString &extraArg,
43  const QDateTime &selectedTime = QDateTime());
44  explicit ProgLister(MythScreenStack *parent, uint recid = 0,
45  const QString &title = QString());
46  ~ProgLister();
48  bool Create(void) override; // MythScreenType
49  bool keyPressEvent(QKeyEvent *) override; // MythScreenType
50  void customEvent(QEvent *) override; // ScheduleCommon
52  protected slots:
56  void DeleteOldEpisode(bool ok);
57  void DeleteOldSeries(bool ok);
59  void SetViewFromList(const QString& item);
60  void SetViewFromTime(QDateTime searchTime);
62  void ShowDeleteRuleMenu(void);
63  void ShowDeleteOldEpisodeMenu(void);
64  void ShowChooseViewMenu(void);
65  void ShowOldRecordedMenu(void);
67  private:
68  void Load(void) override; // MythScreenType
70  void FillViewList(const QString &view);
71  void FillItemList(bool restorePosition, bool updateDisp = true);
73  void ClearCurrentProgramInfo(void);
74  void UpdateDisplay(const ProgramInfo *selected = nullptr);
75  void RestoreSelection(const ProgramInfo *selected, int selectedOffset);
76  void UpdateButtonList(void);
77  void UpdateKeywordInDB(const QString &text, const QString &oldValue);
79  void ShowMenu(void) override; // MythScreenType
80  void ShowDeleteItemMenu(void);
81  void ShowDeleteOldSeriesMenu(void);
83  void SwitchToPreviousView(void);
84  void SwitchToNextView(void);
87  SortBy GetSortBy(void) const;
88  void SortList(SortBy sortby, bool reverseSort);
90  ProgramInfo *GetCurrentProgram(void) const override; // ScheduleCommon
92  bool PowerStringToSQL(
93  const QString &qphrase, QString &output, MSqlBindings &bindings) const;
95  private:
98  QString m_title;
99  QString m_extraArg;
100  QDateTime m_startTime;
101  QDateTime m_searchTime;
102  QDateTime m_selectedTime;
107  QString m_view;
108  int m_curView {-1};
109  QStringList m_viewList;
110  QStringList m_viewTextList;
116  QStringList m_typeList;
117  QStringList m_genreList;
118  QStringList m_stationList;
120  bool m_allowEvents {true};
121  bool m_titleSort {false};
122  bool m_reverseSort {false};
123  bool m_useGenres {false};
131  bool m_allowViewDialog {true};
132 };
134 #endif
int m_curView
Definition: proglist.h:108
QStringList m_genreList
Definition: proglist.h:117
enum RecSearchTypes RecSearchType
QString m_title
Definition: proglist.h:98
ProgramInfo * GetCurrentProgram(void) const override
Definition: proglist.cpp:574
void ShowMenu(void) override
Definition: proglist.cpp:267
unsigned int slots[4]
Definition: element.c:38
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition: proglist.cpp:179
void FillItemList(bool restorePosition, bool updateDisp=true)
Definition: proglist.cpp:1065
QStringList m_typeList
Definition: proglist.h:116
void SetViewFromTime(QDateTime searchTime)
Definition: proglist.cpp:503
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void FillViewList(const QString &view)
Definition: proglist.cpp:722
ProgListType m_type
Definition: proglist.h:96
Definition: proglist.h:13
MythUIText * m_curviewText
Definition: proglist.h:126
void ShowDeleteOldEpisodeMenu(void)
Definition: proglist.cpp:621
bool Create(void) override
Definition: proglist.cpp:98
void SetViewFromList(const QString &item)
Definition: proglist.cpp:517
void ShowChooseViewMenu(void)
Definition: proglist.cpp:413
QString m_extraArg
Definition: proglist.h:99
void ShowDeleteItemMenu(void)
Definition: proglist.cpp:582
unsigned int uint
Definition: compat.h:140
void customEvent(QEvent *) override
Definition: proglist.cpp:1565
QStringList m_stationList
Definition: proglist.h:118
void ClearCurrentProgramInfo(void)
Definition: proglist.cpp:1404
bool m_titleSort
Definition: proglist.h:121
bool m_allowViewDialog
Definition: proglist.h:131
MythUIText * m_positionText
Definition: proglist.h:127
QString m_channelOrdering
Definition: proglist.h:103
ProgLister(MythScreenStack *parent, ProgListType pltype, const QString &view, const QString &extraArg, const QDateTime &selectedTime=QDateTime())
Definition: proglist.cpp:37
void RestoreSelection(const ProgramInfo *selected, int selectedOffset)
Definition: proglist.cpp:1449
ProgramList m_itemList
Definition: proglist.h:112
Holds information on recordings and videos.
Definition: programinfo.h:66
RecSearchType m_searchType
Definition: proglist.h:105
void DeleteOldEpisode(bool ok)
Definition: proglist.cpp:633
ProgramList m_schedList
Definition: proglist.h:114
void ShowDeleteOldSeriesMenu(void)
Definition: proglist.cpp:654
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: proglist.cpp:167
void SwitchToNextView(void)
Definition: proglist.cpp:344
MythUIText * m_messageText
Definition: proglist.h:129
void UpdateDisplay(const ProgramInfo *selected=nullptr)
Definition: proglist.cpp:1415
void ShowOldRecordedMenu(void)
Definition: proglist.cpp:687
MythUIButtonList * m_progList
Definition: proglist.h:128
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
bool m_allowEvents
Definition: proglist.h:120
QStringList m_viewList
Definition: proglist.h:109
QString m_view
Definition: proglist.h:107
SortBy GetSortBy(void) const
Definition: proglist.cpp:1371
bool m_useGenres
Definition: proglist.h:123
QDateTime m_searchTime
Definition: proglist.h:101
void SwitchToPreviousView(void)
Definition: proglist.cpp:321
QStringList m_viewTextList
Definition: proglist.h:110
friend class TimePopup
Definition: proglist.h:34
bool PowerStringToSQL(const QString &qphrase, QString &output, MSqlBindings &bindings) const
Definition: proglist.cpp:524
ProgramList m_itemListSave
Definition: proglist.h:113
QDateTime m_startTime
Definition: proglist.h:100
void UpdateButtonList(void)
Definition: proglist.cpp:1510
bool m_reverseSort
Definition: proglist.h:122
void HandleVisible(MythUIButtonListItem *item)
Definition: proglist.cpp:1477
QDateTime m_selectedTime
Definition: proglist.h:102
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:98
void UpdateKeywordInDB(const QString &text, const QString &oldValue)
Definition: proglist.cpp:368
void DeleteOldSeries(bool ok)
Definition: proglist.cpp:666
void ShowDeleteRuleMenu(void)
Definition: proglist.cpp:590
uint m_recid
Definition: proglist.h:97
void SortList(SortBy sortby, bool reverseSort)
Definition: proglist.cpp:1380
#define output
void HandleSelected(MythUIButtonListItem *item)
Definition: proglist.cpp:1527
MythUIText * m_schedText
Definition: proglist.h:125