00001 #ifndef MYTH_SYSTEM_EVENT_H_ 00002 #define MYTH_SYSTEM_EVENT_H_ 00003 00004 #include <QEvent> 00005 #include <QObject> 00006 00007 #include "programinfo.h" 00008 #include "recordinginfo.h" 00009 #include "rawsettingseditor.h" 00010 00011 // Helper commands for formatting and sending a MythSystemEvent 00012 MTV_PUBLIC void SendMythSystemRecEvent(const QString msg, 00013 const RecordingInfo *pginfo); 00014 MTV_PUBLIC void SendMythSystemPlayEvent(const QString msg, 00015 const ProgramInfo *pginfo); 00016 00024 class MTV_PUBLIC MythSystemEventHandler : public QObject 00025 { 00026 Q_OBJECT 00027 00028 public: 00029 // Constructor 00030 MythSystemEventHandler(); 00031 00032 // Destructor 00033 ~MythSystemEventHandler(); 00034 00035 private: 00036 // Helpers for converting incoming events to command lines 00037 void SubstituteMatches(const QStringList &tokens, QString &command); 00038 QString EventNameToSetting(const QString &name); 00039 00040 // Custom Event Handler 00041 void customEvent(QEvent *e); 00042 }; 00043 00050 class MTV_PUBLIC MythSystemEventEditor : public RawSettingsEditor 00051 { 00052 Q_OBJECT 00053 00054 public: 00055 MythSystemEventEditor(MythScreenStack *parent, const char *name = 0); 00056 }; 00057 00058 #endif 00059 00060 /* vim: set expandtab tabstop=4 shiftwidth=4: */
1.6.3