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  QString view, QString extraArg,
43  QDateTime selectedTime = QDateTime());
44  explicit ProgLister(MythScreenStack *parent, uint recid = 0,
45  QString title = QString());
46  ~ProgLister() override;
48  bool Create(void) override; // MythScreenType
49  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
50  void customEvent(QEvent *event) 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  static bool PowerStringToSQL(
93  const QString &qphrase, QString &output, MSqlBindings &bindings) ;
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
QString m_title
Definition: proglist.h:98
~ProgLister() override
Definition: proglist.cpp:91
ProgramInfo * GetCurrentProgram(void) const override
Definition: proglist.cpp:577
void ShowMenu(void) override
Definition: proglist.cpp:270
void FillItemList(bool restorePosition, bool updateDisp=true)
Definition: proglist.cpp:1068
QStringList m_typeList
Definition: proglist.h:116
void SetViewFromTime(QDateTime searchTime)
Definition: proglist.cpp:506
static bool PowerStringToSQL(const QString &qphrase, QString &output, MSqlBindings &bindings)
Definition: proglist.cpp:527
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void FillViewList(const QString &view)
Definition: proglist.cpp:725
ProgListType m_type
Definition: proglist.h:96
Definition: proglist.h:13
MythUIText * m_curviewText
Definition: proglist.h:126
void ShowDeleteOldEpisodeMenu(void)
Definition: proglist.cpp:624
bool Create(void) override
Definition: proglist.cpp:98
void SetViewFromList(const QString &item)
Definition: proglist.cpp:520
void ShowChooseViewMenu(void)
Definition: proglist.cpp:416
QString m_extraArg
Definition: proglist.h:99
unsigned int slots[4]
Definition: element.cpp:38
void ShowDeleteItemMenu(void)
Definition: proglist.cpp:585
ProgLister(MythScreenStack *parent, ProgListType pltype, QString view, QString extraArg, QDateTime selectedTime=QDateTime())
Definition: proglist.cpp:37
QStringList m_stationList
Definition: proglist.h:118
void ClearCurrentProgramInfo(void)
Definition: proglist.cpp:1436
bool m_titleSort
Definition: proglist.h:121
void customEvent(QEvent *event) override
Definition: proglist.cpp:1596
bool m_allowViewDialog
Definition: proglist.h:131
MythUIText * m_positionText
Definition: proglist.h:127
QString m_channelOrdering
Definition: proglist.h:103
void RestoreSelection(const ProgramInfo *selected, int selectedOffset)
Definition: proglist.cpp:1481
ProgramList m_itemList
Definition: proglist.h:112
Holds information on recordings and videos.
Definition: programinfo.h:67
RecSearchType m_searchType
Definition: proglist.h:105
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:98
void DeleteOldEpisode(bool ok)
Definition: proglist.cpp:636
ProgramList m_schedList
Definition: proglist.h:114
void ShowDeleteOldSeriesMenu(void)
Definition: proglist.cpp:657
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:171
void SwitchToNextView(void)
Definition: proglist.cpp:347
MythUIText * m_messageText
Definition: proglist.h:129
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: proglist.cpp:182
unsigned int uint
Definition: compat.h:140
void UpdateDisplay(const ProgramInfo *selected=nullptr)
Definition: proglist.cpp:1447
void ShowOldRecordedMenu(void)
Definition: proglist.cpp:690
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:1392
bool m_useGenres
Definition: proglist.h:123
QDateTime m_searchTime
Definition: proglist.h:101
void SwitchToPreviousView(void)
Definition: proglist.cpp:324
QStringList m_viewTextList
Definition: proglist.h:110
friend class TimePopup
Definition: proglist.h:34
ProgramList m_itemListSave
Definition: proglist.h:113
QDateTime m_startTime
Definition: proglist.h:100
void UpdateButtonList(void)
Definition: proglist.cpp:1542
bool m_reverseSort
Definition: proglist.h:122
void HandleVisible(MythUIButtonListItem *item)
Definition: proglist.cpp:1509
QDateTime m_selectedTime
Definition: proglist.h:102
void UpdateKeywordInDB(const QString &text, const QString &oldValue)
Definition: proglist.cpp:371
void DeleteOldSeries(bool ok)
Definition: proglist.cpp:669
void ShowDeleteRuleMenu(void)
Definition: proglist.cpp:593
uint m_recid
Definition: proglist.h:97
void SortList(SortBy sortby, bool reverseSort)
Definition: proglist.cpp:1401
#define output
void HandleSelected(MythUIButtonListItem *item)
Definition: proglist.cpp:1558
MythUIText * m_schedText
Definition: proglist.h:125