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 // C++
19 #include <vector>
20 
21 // qt
22 #include <QKeyEvent>
23 
24 // MythTV
26 #include <libmythui/mythuibutton.h>
27 #include <libmythui/mythuiimage.h>
28 #include <libmythui/mythuitext.h>
29 
30 // zm
31 #include "zmdefines.h"
32 
33 class ZMPlayer : public MythScreenType
34 {
35  Q_OBJECT
36 
37  public:
38  ZMPlayer(MythScreenStack *parent, const char *name,
39  std::vector<Event *> *eventList, size_t *currentEvent);
40  ~ZMPlayer() override;
41 
42  bool Create(void) override; // MythScreenType
43  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
44 
45  private slots:
46  void updateFrame(void);
47  void playPressed(void);
48  void deletePressed(void);
49  void prevPressed(void);
50  void nextPressed(void);
51 
52  private:
53  void getEventInfo(void);
54  void getFrame(void);
55 
56  void stopPlayer(void);
57 
61 
63  MythUIText *m_eventText {nullptr};
65  MythUIText *m_frameText {nullptr};
66  MythUIText *m_dateText {nullptr};
67 
72 
73  size_t *m_currentEvent {nullptr};
74  std::vector<Event *> *m_eventList {nullptr};
75 
76  std::vector<Frame *> *m_frameList {nullptr};
77  QTimer *m_frameTimer {nullptr};
79 
80  bool m_paused {false};
81  bool m_fullScreen {false};
82 
83  MythImage *m_image {nullptr};
84 };
85 
86 #endif
87 
ZMPlayer::m_noEventsText
MythUIText * m_noEventsText
Definition: zmplayer.h:62
ZMPlayer::m_frameImage
MythUIImage * m_frameImage
Definition: zmplayer.h:60
ZMPlayer::deletePressed
void deletePressed(void)
Definition: zmplayer.cpp:283
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:55
ZMPlayer::m_eventText
MythUIText * m_eventText
Definition: zmplayer.h:63
zmdefines.h
ZMPlayer
Definition: zmplayer.h:33
ZMPlayer::m_dateText
MythUIText * m_dateText
Definition: zmplayer.h:66
ZMPlayer::prevPressed
void prevPressed(void)
Definition: zmplayer.cpp:326
ZMPlayer::Create
bool Create(void) override
Definition: zmplayer.cpp:60
ZMPlayer::m_activeFrameImage
MythUIImage * m_activeFrameImage
Definition: zmplayer.h:58
MythScreenStack
Definition: mythscreenstack.h:16
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
ZMPlayer::m_prevButton
MythUIButton * m_prevButton
Definition: zmplayer.h:71
ZMPlayer::m_currentEvent
size_t * m_currentEvent
Definition: zmplayer.h:73
ZMPlayer::m_fullScreen
bool m_fullScreen
Definition: zmplayer.h:81
mythuiimage.h
ZMPlayer::m_nextButton
MythUIButton * m_nextButton
Definition: zmplayer.h:70
ZMPlayer::m_frameText
MythUIText * m_frameText
Definition: zmplayer.h:65
ZMPlayer::playPressed
void playPressed(void)
Definition: zmplayer.cpp:262
ZMPlayer::updateFrame
void updateFrame(void)
Definition: zmplayer.cpp:345
ZMPlayer::~ZMPlayer
~ZMPlayer() override
Definition: zmplayer.cpp:46
ZMPlayer::nextPressed
void nextPressed(void)
Definition: zmplayer.cpp:310
MythUIButton
A single button widget.
Definition: mythuibutton.h:21
ZMPlayer::m_paused
bool m_paused
Definition: zmplayer.h:80
ZMPlayer::m_curFrame
uint m_curFrame
Definition: zmplayer.h:78
ZMPlayer::ZMPlayer
ZMPlayer(MythScreenStack *parent, const char *name, std::vector< Event * > *eventList, size_t *currentEvent)
Definition: zmplayer.cpp:35
uint
unsigned int uint
Definition: compat.h:79
ZMPlayer::m_cameraText
MythUIText * m_cameraText
Definition: zmplayer.h:64
ZMPlayer::getEventInfo
void getEventInfo(void)
Definition: zmplayer.cpp:125
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:69
ZMPlayer::m_frameList
std::vector< Frame * > * m_frameList
Definition: zmplayer.h:76
ZMPlayer::m_image
MythImage * m_image
Definition: zmplayer.h:83
ZMPlayer::getFrame
void getFrame(void)
Definition: zmplayer.cpp:365
ZMPlayer::m_frameTimer
QTimer * m_frameTimer
Definition: zmplayer.h:77
mythuibutton.h
ZMPlayer::m_eventList
std::vector< Event * > * m_eventList
Definition: zmplayer.h:74
ZMPlayer::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: zmplayer.cpp:175
ZMPlayer::m_playButton
MythUIButton * m_playButton
Definition: zmplayer.h:68
ZMPlayer::m_frameImageFS
MythUIImage * m_frameImageFS
Definition: zmplayer.h:59
mythscreentype.h