MythTV  master
viewschedulediff.h
Go to the documentation of this file.
1 #ifndef VIEWSCHEDULEDIFF_H_
2 #define VIEWSCHEDULEDIFF_H_
3 
4 // C++ headers
5 #include <utility>
6 #include <vector>
7 
8 // mythui
9 #include "mythscreentype.h"
10 
11 // mythtv
12 #include "programinfo.h"
13 
15 {
16  public:
17  ProgramStruct() = default;
18  ProgramInfo *m_before {nullptr};
19  ProgramInfo *m_after {nullptr};
20 };
21 
22 class QKeyEvent;
23 
25 {
26  Q_OBJECT
27  public:
28  ViewScheduleDiff(MythScreenStack *parent, QString altTbl,
29  int recordid = -1, QString ltitle = "")
30  : MythScreenType(parent, "ViewScheduleDiff"),
31  m_altTable(std::move(altTbl)), m_title(std::move(ltitle)),
32  m_recordid(recordid) {}
33  ~ViewScheduleDiff() override = default;
34 
35  bool Create(void) override; // MythScreenType
36  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
37 
38  private slots:
39  void updateInfo(MythUIButtonListItem *item);
40  void showStatus(MythUIButtonListItem *item);
41 
42  private:
43  void Load(void) override; // MythScreenType
44  void Init(void) override; // MythScreenType
45 
46  void fillList(void);
47  void updateUIList();
48 
50 
51  bool m_inEvent {false};
52  bool m_inFill {false};
53 
56 
57  QString m_altTable;
58  QString m_title;
59 
61  MythUIText *m_titleText {nullptr};
63 
64  std::vector<class ProgramStruct> m_recList;
65 
66  int m_recordid {-1};
67 };
68 
69 #endif
ViewScheduleDiff::Init
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
Definition: viewschedulediff.cpp:56
ViewScheduleDiff::m_recListAfter
ProgramList m_recListAfter
Definition: viewschedulediff.h:55
ViewScheduleDiff::m_inEvent
bool m_inEvent
Definition: viewschedulediff.h:51
ViewScheduleDiff::showStatus
void showStatus(MythUIButtonListItem *item)
Definition: viewschedulediff.cpp:80
ViewScheduleDiff::updateUIList
void updateUIList()
Definition: viewschedulediff.cpp:267
ViewScheduleDiff::~ViewScheduleDiff
~ViewScheduleDiff() override=default
ViewScheduleDiff::Create
bool Create(void) override
Definition: viewschedulediff.cpp:20
ViewScheduleDiff::m_recList
std::vector< class ProgramStruct > m_recList
Definition: viewschedulediff.h:64
MythScreenStack
Definition: mythscreenstack.h:16
ProgramStruct::ProgramStruct
ProgramStruct()=default
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
ProgramStruct::m_after
ProgramInfo * m_after
Definition: viewschedulediff.h:19
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
ViewScheduleDiff::CurrentProgram
ProgramInfo * CurrentProgram(void)
Definition: viewschedulediff.cpp:332
programinfo.h
ProgramStruct
Definition: viewschedulediff.h:15
ViewScheduleDiff::updateInfo
void updateInfo(MythUIButtonListItem *item)
Definition: viewschedulediff.cpp:318
ViewScheduleDiff::m_title
QString m_title
Definition: viewschedulediff.h:58
ViewScheduleDiff::Load
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
Definition: viewschedulediff.cpp:51
ViewScheduleDiff::m_recordid
int m_recordid
recordid that differs from master (-1 = assume all)
Definition: viewschedulediff.h:66
ViewScheduleDiff::fillList
void fillList(void)
Definition: viewschedulediff.cpp:173
ViewScheduleDiff::m_titleText
MythUIText * m_titleText
Definition: viewschedulediff.h:61
ViewScheduleDiff::m_recListBefore
ProgramList m_recListBefore
Definition: viewschedulediff.h:54
ProgramStruct::m_before
ProgramInfo * m_before
Definition: viewschedulediff.h:18
ViewScheduleDiff::m_inFill
bool m_inFill
Definition: viewschedulediff.h:52
AutoDeleteDeque< ProgramInfo * >
ViewScheduleDiff
Definition: viewschedulediff.h:25
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:68
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
ViewScheduleDiff::m_noChangesText
MythUIText * m_noChangesText
Definition: viewschedulediff.h:62
ViewScheduleDiff::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: viewschedulediff.cpp:61
ViewScheduleDiff::m_conflictList
MythUIButtonList * m_conflictList
Definition: viewschedulediff.h:60
ViewScheduleDiff::ViewScheduleDiff
ViewScheduleDiff(MythScreenStack *parent, QString altTbl, int recordid=-1, QString ltitle="")
Definition: viewschedulediff.h:28
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:152
mythscreentype.h
ViewScheduleDiff::m_altTable
QString m_altTable
Definition: viewschedulediff.h:57