![]() |
Mixxx
|
00001 #ifndef SCRIPT_SCRIPTCONTROLQUEUE_H 00002 #define SCRIPT_SCRIPTCONTROLQUEUE_H 00003 00004 #include <QLinkedList> 00005 #include <qdatetime.h> 00006 #include <qtimer.h> 00007 #include <qstring.h> 00008 #include "scriptcontrolevent.h" 00009 00010 class ScriptEngine; 00011 00012 class ScriptControlQueue : public QObject { 00013 Q_OBJECT 00014 00015 public: 00016 ScriptControlQueue(ScriptEngine* parent); 00017 ~ScriptControlQueue(); 00018 void schedule(ScriptControlEvent *event); 00019 void schedule(int channel, QString path, QDateTime base, \ 00020 int offset, int process, int tag = -1); 00021 void schedule(const char* group, const char* name, \ 00022 double value, const QDateTime *base, \ 00023 int offset, int process, int tag = -1); 00024 void interpolate(const char* group, const char* name, \ 00025 const QDateTime *base, int time1, double val1, \ 00026 int time2, double val2, int process, \ 00027 int tag = -1, bool addLast = TRUE, \ 00028 int minres = 15); 00029 00030 void killProcess(int process); 00031 void killTag(int process, int tag); 00032 public slots: 00033 void timerCallback(); 00034 00035 protected: 00036 void setupCallbacks(); 00037 QDateTime getWhen(const QDateTime* base, int offset); 00038 00039 QLinkedList<ScriptControlEvent*> m_q; 00040 QTimer m_timer; 00041 00042 ScriptEngine* m_parent; 00043 }; 00044 00045 #endif