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 <QKeyEvent>
20#include <QPixmap>
21
22// MythTV
26
27// zm
28#include <zmdefines.h>
29
31{
32 Q_OBJECT
33
34public:
35 explicit ZMEvents(MythScreenStack *parent)
36 : MythScreenType(parent, "zmevents"),
37 m_eventList(new std::vector<Event*>) {}
38 ~ZMEvents() override;
39
40 bool Create(void) override; // MythScreenType
41 bool keyPressEvent(QKeyEvent *event) 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);
52 static void eventVisible(MythUIButtonListItem *item);
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 size_t m_savedPosition {0};
72 int m_currentDate {-1};
73
75
77
80
83
85};
86
87#endif
Event details.
Definition: zmdefines.h:28
Basic menu dialog, message and a list of options.
Screen in which all other widgets are contained and rendered.
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
A single button widget.
Definition: mythuibutton.h:22
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
void playPressed(void)
Definition: zmevents.cpp:277
~ZMEvents() override
Definition: zmevents.cpp:37
void eventChanged(MythUIButtonListItem *item)
Definition: zmevents.cpp:233
void cameraChanged(void)
Definition: zmevents.cpp:213
void doDeleteAll(bool doDelete)
Definition: zmevents.cpp:483
bool m_showContinuous
Definition: zmevents.h:65
MythUIButtonList * m_eventGrid
Definition: zmevents.h:76
void deletePressed(void)
Definition: zmevents.cpp:308
void updateUIList()
Definition: zmevents.cpp:188
void deleteAll(void)
Definition: zmevents.cpp:467
void playerExited(void)
Definition: zmevents.cpp:298
void changeView(void)
Definition: zmevents.cpp:456
bool Create(void) override
Definition: zmevents.cpp:47
MythUIButton * m_playButton
Definition: zmevents.h:78
MythUIButtonList * m_dateSelector
Definition: zmevents.h:82
ZMEvents(MythScreenStack *parent)
Definition: zmevents.h:35
static void eventVisible(MythUIButtonListItem *item)
Definition: zmevents.cpp:249
int m_currentDate
Definition: zmevents.h:72
int m_currentCamera
Definition: zmevents.h:71
void setGridLayout(int layout)
Definition: zmevents.cpp:378
std::vector< Event * > * m_eventList
Definition: zmevents.h:68
void getDateList(void)
Definition: zmevents.cpp:353
MythUIButton * m_deleteButton
Definition: zmevents.h:79
MythUIText * m_eventNoText
Definition: zmevents.h:74
void getCameraList(void)
Definition: zmevents.cpp:335
void dateChanged(void)
Definition: zmevents.cpp:223
MythDialogBox * m_menuPopup
Definition: zmevents.h:84
size_t m_savedPosition
Definition: zmevents.h:70
void toggleShowContinuous(void)
Definition: zmevents.cpp:461
bool m_oldestFirst
Definition: zmevents.h:64
void getEventList(void)
Definition: zmevents.cpp:169
void ShowMenu(void) override
Definition: zmevents.cpp:434
MythUIButtonList * m_cameraSelector
Definition: zmevents.h:81
QStringList m_dateList
Definition: zmevents.h:69
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: zmevents.cpp:101
int m_layout
Definition: zmevents.h:66
STL namespace.