00001 /* ============================================================ 00002 * This program is free software; you can redistribute it 00003 * and/or modify it under the terms of the GNU General 00004 * Public License as published bythe Free Software Foundation; 00005 * either version 2, or (at your option) 00006 * any later version. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 * 00013 * ============================================================ */ 00014 00015 #ifndef ZMPLAYER_H 00016 #define ZMPLAYER_H 00017 00018 #include <vector> 00019 00020 // qt 00021 #include <QKeyEvent> 00022 00023 // myth 00024 #include <mythscreentype.h> 00025 #include <mythuibutton.h> 00026 #include <mythuiimage.h> 00027 #include <mythuitext.h> 00028 00029 // zm 00030 #include "zmdefines.h" 00031 00032 class ZMPlayer : public MythScreenType 00033 { 00034 Q_OBJECT 00035 00036 public: 00037 ZMPlayer(MythScreenStack *parent, const char *name, 00038 std::vector<Event *> *eventList, int *currentEvent); 00039 ~ZMPlayer(); 00040 00041 bool Create(void); 00042 bool keyPressEvent(QKeyEvent *); 00043 00044 private slots: 00045 void updateFrame(void); 00046 void playPressed(void); 00047 void deletePressed(void); 00048 void prevPressed(void); 00049 void nextPressed(void); 00050 00051 private: 00052 void getEventInfo(void); 00053 void getFrame(void); 00054 00055 void stopPlayer(void); 00056 00057 MythUIImage *m_frameImage; 00058 00059 MythUIText *m_noEventsText; 00060 MythUIText *m_eventText; 00061 MythUIText *m_cameraText; 00062 MythUIText *m_frameText; 00063 MythUIText *m_dateText; 00064 00065 MythUIButton *m_playButton; 00066 MythUIButton *m_deleteButton; 00067 MythUIButton *m_nextButton; 00068 MythUIButton *m_prevButton; 00069 00070 int *m_currentEvent; 00071 std::vector<Event *> *m_eventList; 00072 00073 std::vector<Frame *> *m_frameList; 00074 QTimer *m_frameTimer; 00075 int m_curFrame; 00076 int m_lastFrame; 00077 00078 bool m_paused; 00079 bool m_fullScreen; 00080 00081 MythImage *m_image; 00082 }; 00083 00084 #endif 00085
1.6.3