MythTV  master
zmevents.h
Go to the documentation of this file.
1 /* ============================================================
2  * This program is free software; you can redistribute it
3  * and/or modify it under the terms of the GNU General
4  * Public License as published bythe Free Software Foundation;
5  * either version 2, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * ============================================================ */
14 
15 #ifndef ZMEVENTS_H
16 #define ZMEVENTS_H
17 
18 // qt
19 #include <QPixmap>
20 #include <QKeyEvent>
21 
22 // mythtv
23 #include <mythuibuttonlist.h>
24 #include <mythscreentype.h>
25 #include <mythdialogbox.h>
26 
27 // zm
28 #include <zmdefines.h>
29 
30 class ZMEvents : public MythScreenType
31 {
32  Q_OBJECT
33 
34 public:
35  explicit ZMEvents(MythScreenStack *parent)
36  : MythScreenType(parent, "zmevents"),
37  m_eventList(new std::vector<Event*>) {}
38  ~ZMEvents();
39 
40  bool Create(void) override; // MythScreenType
41  bool keyPressEvent(QKeyEvent *) override; // MythScreenType
42 
43  private slots:
44  void getEventList(void);
45  void playPressed(void);
46  void deletePressed(void);
47  void deleteAll(void);
48  void doDeleteAll(bool doDelete);
49  void changeView(void);
50  void toggleShowContinuous(void);
53  void cameraChanged(void);
54  void dateChanged(void);
55  void playerExited(void);
56 
57  private:
58  void updateUIList();
59  void getCameraList(void);
60  void getDateList(void);
61  void setGridLayout(int layout);
62  void ShowMenu(void) override; // MythScreenType
63 
64  bool m_oldestFirst {false};
65  bool m_showContinuous {false};
66  int m_layout {-1};
67 
68  std::vector<Event *> *m_eventList {nullptr};
69  QStringList m_dateList;
70  int m_savedPosition {0};
71  int m_currentCamera {-1};
72  int m_currentDate {-1};
73 
75 
77 
80 
83 
85 };
86 
87 #endif
void playerExited(void)
Definition: zmevents.cpp:286
MythUIButtonList * m_eventGrid
Definition: zmevents.h:76
unsigned int slots[4]
Definition: element.c:38
bool m_oldestFirst
Definition: zmevents.h:64
void getCameraList(void)
Definition: zmevents.cpp:324
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void cameraChanged(void)
Definition: zmevents.cpp:203
MythDialogBox * m_menuPopup
Definition: zmevents.h:84
void setGridLayout(int layout)
Definition: zmevents.cpp:367
void ShowMenu(void) override
Definition: zmevents.cpp:424
Basic menu dialog, message and a list of options.
void changeView(void)
Definition: zmevents.cpp:446
MythUIButton * m_deleteButton
Definition: zmevents.h:79
void playPressed(void)
Definition: zmevents.cpp:265
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition: zmevents.cpp:98
void toggleShowContinuous(void)
Definition: zmevents.cpp:451
void eventChanged(MythUIButtonListItem *item)
Definition: zmevents.cpp:223
MythUIButtonList * m_dateSelector
Definition: zmevents.h:82
ZMEvents(MythScreenStack *parent)
Definition: zmevents.h:35
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
bool m_showContinuous
Definition: zmevents.h:65
MythUIText * m_eventNoText
Definition: zmevents.h:74
A single button widget.
Definition: mythuibutton.h:21
void doDeleteAll(bool doDelete)
Definition: zmevents.cpp:474
int m_layout
Definition: zmevents.h:66
int m_savedPosition
Definition: zmevents.h:70
void dateChanged(void)
Definition: zmevents.cpp:213
QStringList m_dateList
Definition: zmevents.h:69
void getDateList(void)
Definition: zmevents.cpp:342
void deletePressed(void)
Definition: zmevents.cpp:297
Event details.
Definition: zmdefines.h:25
std::vector< Event * > * m_eventList
Definition: zmevents.h:68
MythUIButton * m_playButton
Definition: zmevents.h:78
int m_currentDate
Definition: zmevents.h:72
void updateUIList()
Definition: zmevents.cpp:177
~ZMEvents()
Definition: zmevents.cpp:34
Screen in which all other widgets are contained and rendered.
void deleteAll(void)
Definition: zmevents.cpp:457
int m_currentCamera
Definition: zmevents.h:71
bool Create(void) override
Definition: zmevents.cpp:44
MythUIButtonList * m_cameraSelector
Definition: zmevents.h:81
void eventVisible(MythUIButtonListItem *item)
Definition: zmevents.cpp:237
void getEventList(void)
Definition: zmevents.cpp:158