MythTV  master
zmplayer.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 ZMPLAYER_H
16 #define ZMPLAYER_H
17 
18 #include <vector>
19 
20 // qt
21 #include <QKeyEvent>
22 
23 // myth
24 #include <mythscreentype.h>
25 #include <mythuibutton.h>
26 #include <mythuiimage.h>
27 #include <mythuitext.h>
28 
29 // zm
30 #include "zmdefines.h"
31 
32 class ZMPlayer : public MythScreenType
33 {
34  Q_OBJECT
35 
36  public:
37  ZMPlayer(MythScreenStack *parent, const char *name,
38  std::vector<Event *> *eventList, int *currentEvent);
39  ~ZMPlayer();
40 
41  bool Create(void) override; // MythScreenType
42  bool keyPressEvent(QKeyEvent *) override; // MythScreenType
43 
44  private slots:
45  void updateFrame(void);
46  void playPressed(void);
47  void deletePressed(void);
48  void prevPressed(void);
49  void nextPressed(void);
50 
51  private:
52  void getEventInfo(void);
53  void getFrame(void);
54 
55  void stopPlayer(void);
56 
60 
62  MythUIText *m_eventText {nullptr};
64  MythUIText *m_frameText {nullptr};
65  MythUIText *m_dateText {nullptr};
66 
71 
72  int *m_currentEvent {nullptr};
73  std::vector<Event *> *m_eventList {nullptr};
74 
75  std::vector<Frame *> *m_frameList {nullptr};
76  QTimer *m_frameTimer {nullptr};
78 
79  bool m_paused {false};
80  bool m_fullScreen {false};
81 
82  MythImage *m_image {nullptr};
83 };
84 
85 #endif
86 
bool m_fullScreen
Definition: zmplayer.h:80
unsigned int slots[4]
Definition: element.c:38
~ZMPlayer()
Definition: zmplayer.cpp:48
MythUIImage * m_frameImageFS
Definition: zmplayer.h:58
MythUIButton * m_nextButton
Definition: zmplayer.h:69
MythImage * m_image
Definition: zmplayer.h:82
void getEventInfo(void)
Definition: zmplayer.cpp:127
void playPressed(void)
Definition: zmplayer.cpp:264
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
QTimer * m_frameTimer
Definition: zmplayer.h:76
MythUIText * m_noEventsText
Definition: zmplayer.h:61
MythUIButton * m_deleteButton
Definition: zmplayer.h:68
void nextPressed(void)
Definition: zmplayer.cpp:312
MythUIButton * m_playButton
Definition: zmplayer.h:67
void getFrame(void)
Definition: zmplayer.cpp:367
unsigned int uint
Definition: compat.h:140
void updateFrame(void)
Definition: zmplayer.cpp:347
MythUIImage * m_frameImage
Definition: zmplayer.h:59
std::vector< Event * > * m_eventList
Definition: zmplayer.h:73
MythUIText * m_dateText
Definition: zmplayer.h:65
uint m_curFrame
Definition: zmplayer.h:77
void prevPressed(void)
Definition: zmplayer.cpp:328
ZMPlayer(MythScreenStack *parent, const char *name, std::vector< Event * > *eventList, int *currentEvent)
Definition: zmplayer.cpp:37
MythUIButton * m_prevButton
Definition: zmplayer.h:70
const char * name
Definition: ParseText.cpp:328
A single button widget.
Definition: mythuibutton.h:21
MythUIText * m_eventText
Definition: zmplayer.h:62
void deletePressed(void)
Definition: zmplayer.cpp:285
MythUIText * m_frameText
Definition: zmplayer.h:64
void stopPlayer(void)
Definition: zmplayer.cpp:57
MythUIText * m_cameraText
Definition: zmplayer.h:63
Screen in which all other widgets are contained and rendered.
bool keyPressEvent(QKeyEvent *) override
Key event handler.
Definition: zmplayer.cpp:177
bool Create(void) override
Definition: zmplayer.cpp:62
std::vector< Frame * > * m_frameList
Definition: zmplayer.h:75
MythUIImage * m_activeFrameImage
Definition: zmplayer.h:57
bool m_paused
Definition: zmplayer.h:79
int * m_currentEvent
Definition: zmplayer.h:72