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, size_t *currentEvent);
39  ~ZMPlayer() override;
40 
41  bool Create(void) override; // MythScreenType
42  bool keyPressEvent(QKeyEvent *event) 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  size_t *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 
ZMPlayer::m_noEventsText
MythUIText * m_noEventsText
Definition: zmplayer.h:61
ZMPlayer::m_frameImage
MythUIImage * m_frameImage
Definition: zmplayer.h:59
ZMPlayer::deletePressed
void deletePressed(void)
Definition: zmplayer.cpp:285
mythuitext.h
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
ZMPlayer::stopPlayer
void stopPlayer(void)
Definition: zmplayer.cpp:57
ZMPlayer::m_eventText
MythUIText * m_eventText
Definition: zmplayer.h:62
zmdefines.h
ZMPlayer
Definition: zmplayer.h:32
ZMPlayer::m_dateText
MythUIText * m_dateText
Definition: zmplayer.h:65
ZMPlayer::prevPressed
void prevPressed(void)
Definition: zmplayer.cpp:328
ZMPlayer::Create
bool Create(void) override
Definition: zmplayer.cpp:62
ZMPlayer::m_activeFrameImage
MythUIImage * m_activeFrameImage
Definition: zmplayer.h:57
MythScreenStack
Definition: mythscreenstack.h:15
slots
unsigned int slots[4]
Definition: element.cpp:38
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:44
ZMPlayer::m_prevButton
MythUIButton * m_prevButton
Definition: zmplayer.h:70
ZMPlayer::m_currentEvent
size_t * m_currentEvent
Definition: zmplayer.h:72
ZMPlayer::m_fullScreen
bool m_fullScreen
Definition: zmplayer.h:80
mythuiimage.h
ZMPlayer::m_nextButton
MythUIButton * m_nextButton
Definition: zmplayer.h:69
ZMPlayer::m_frameText
MythUIText * m_frameText
Definition: zmplayer.h:64
ZMPlayer::playPressed
void playPressed(void)
Definition: zmplayer.cpp:264
ZMPlayer::updateFrame
void updateFrame(void)
Definition: zmplayer.cpp:347
ZMPlayer::~ZMPlayer
~ZMPlayer() override
Definition: zmplayer.cpp:48
ZMPlayer::nextPressed
void nextPressed(void)
Definition: zmplayer.cpp:312
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
ZMPlayer::m_paused
bool m_paused
Definition: zmplayer.h:79
ZMPlayer::m_curFrame
uint m_curFrame
Definition: zmplayer.h:77
ZMPlayer::ZMPlayer
ZMPlayer(MythScreenStack *parent, const char *name, std::vector< Event * > *eventList, size_t *currentEvent)
Definition: zmplayer.cpp:37
uint
unsigned int uint
Definition: compat.h:140
ZMPlayer::m_cameraText
MythUIText * m_cameraText
Definition: zmplayer.h:63
ZMPlayer::getEventInfo
void getEventInfo(void)
Definition: zmplayer.cpp:127
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
MythImage
Definition: mythimage.h:36
ZMPlayer::m_deleteButton
MythUIButton * m_deleteButton
Definition: zmplayer.h:68
ZMPlayer::m_frameList
std::vector< Frame * > * m_frameList
Definition: zmplayer.h:75
ZMPlayer::m_image
MythImage * m_image
Definition: zmplayer.h:82
ZMPlayer::getFrame
void getFrame(void)
Definition: zmplayer.cpp:367
ZMPlayer::m_frameTimer
QTimer * m_frameTimer
Definition: zmplayer.h:76
mythuibutton.h
ZMPlayer::m_eventList
std::vector< Event * > * m_eventList
Definition: zmplayer.h:73
ZMPlayer::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: zmplayer.cpp:177
ZMPlayer::m_playButton
MythUIButton * m_playButton
Definition: zmplayer.h:67
ZMPlayer::m_frameImageFS
MythUIImage * m_frameImageFS
Definition: zmplayer.h:58
mythscreentype.h