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() 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};
71  int m_currentCamera {-1};
72  int m_currentDate {-1};
73 
75 
77 
80 
83 
85 };
86 
87 #endif
ZMEvents::Create
bool Create(void) override
Definition: zmevents.cpp:44
doDelete
bool doDelete
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:638
zmdefines.h
ZMEvents::m_menuPopup
MythDialogBox * m_menuPopup
Definition: zmevents.h:84
ZMEvents::changeView
void changeView(void)
Definition: zmevents.cpp:448
ZMEvents::cameraChanged
void cameraChanged(void)
Definition: zmevents.cpp:202
mythdialogbox.h
MythScreenStack
Definition: mythscreenstack.h:16
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
ZMEvents::m_deleteButton
MythUIButton * m_deleteButton
Definition: zmevents.h:79
ZMEvents::m_eventGrid
MythUIButtonList * m_eventGrid
Definition: zmevents.h:76
ZMEvents::eventChanged
void eventChanged(MythUIButtonListItem *item)
Definition: zmevents.cpp:222
ZMEvents::m_dateList
QStringList m_dateList
Definition: zmevents.h:69
ZMEvents::m_savedPosition
size_t m_savedPosition
Definition: zmevents.h:70
mythuibuttonlist.h
ZMEvents::updateUIList
void updateUIList()
Definition: zmevents.cpp:177
ZMEvents::eventVisible
static void eventVisible(MythUIButtonListItem *item)
Definition: zmevents.cpp:240
ZMEvents::playPressed
void playPressed(void)
Definition: zmevents.cpp:268
MythUIButtonListItem
Definition: mythuibuttonlist.h:28
ZMEvents::m_eventNoText
MythUIText * m_eventNoText
Definition: zmevents.h:74
ZMEvents::deletePressed
void deletePressed(void)
Definition: zmevents.cpp:300
Event
Event details.
Definition: zmdefines.h:27
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:167
ZMEvents::~ZMEvents
~ZMEvents() override
Definition: zmevents.cpp:34
ZMEvents
Definition: zmevents.h:31
MythUIButton
A single button widget.
Definition: mythuibutton.h:22
ZMEvents::m_layout
int m_layout
Definition: zmevents.h:66
ZMEvents::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: zmevents.cpp:98
ZMEvents::m_showContinuous
bool m_showContinuous
Definition: zmevents.h:65
ZMEvents::doDeleteAll
void doDeleteAll(bool doDelete)
Definition: zmevents.cpp:475
ZMEvents::m_cameraSelector
MythUIButtonList * m_cameraSelector
Definition: zmevents.h:81
ZMEvents::m_playButton
MythUIButton * m_playButton
Definition: zmevents.h:78
ZMEvents::ZMEvents
ZMEvents(MythScreenStack *parent)
Definition: zmevents.h:35
ZMEvents::getEventList
void getEventList(void)
Definition: zmevents.cpp:158
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:29
ZMEvents::setGridLayout
void setGridLayout(int layout)
Definition: zmevents.cpp:370
ZMEvents::ShowMenu
void ShowMenu(void) override
Definition: zmevents.cpp:426
ZMEvents::getDateList
void getDateList(void)
Definition: zmevents.cpp:345
ZMEvents::m_dateSelector
MythUIButtonList * m_dateSelector
Definition: zmevents.h:82
ZMEvents::deleteAll
void deleteAll(void)
Definition: zmevents.cpp:459
ZMEvents::m_currentCamera
int m_currentCamera
Definition: zmevents.h:71
ZMEvents::m_eventList
std::vector< Event * > * m_eventList
Definition: zmevents.h:68
ZMEvents::m_currentDate
int m_currentDate
Definition: zmevents.h:72
ZMEvents::m_oldestFirst
bool m_oldestFirst
Definition: zmevents.h:64
ZMEvents::getCameraList
void getCameraList(void)
Definition: zmevents.cpp:327
MythUIButtonList
List widget, displays list items in a variety of themeable arrangements and can trigger signals when ...
Definition: mythuibuttonlist.h:152
ZMEvents::dateChanged
void dateChanged(void)
Definition: zmevents.cpp:212
mythscreentype.h
ZMEvents::toggleShowContinuous
void toggleShowContinuous(void)
Definition: zmevents.cpp:453
ZMEvents::playerExited
void playerExited(void)
Definition: zmevents.cpp:289