Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/midi/midiledhandler.h

Go to the documentation of this file.
00001 // By Adam Davison
00002 //  Heavily modified (hell, nearly rewritten) by Sean M. Pappalardo
00003 // Code to listen to a control object and send a midi message based on the value
00004 
00005 #ifndef MIDILEDHANDLER_H
00006 #define MIDILEDHANDLER_H
00007 
00008 #include "controlobject.h"
00009 #include "mididevice.h"
00010 
00011 class MidiLedHandler : QObject
00012 {
00013     Q_OBJECT
00014 public:
00015         MidiLedHandler(QString group, QString key, MidiDevice & midi, double min, double max,
00016                 unsigned char status, unsigned char midino, unsigned char on, unsigned char off);
00017     ~MidiLedHandler();
00018 
00019     void update();
00020 
00021         static void createHandlers(QDomNode node, MidiDevice & midi);
00022     static void updateAll();
00023     static void destroyHandlers(MidiDevice* midi);
00024         static QList<MidiLedHandler*> allhandlers;
00025 
00026 public slots:
00027         void controlChanged(double value);
00028 
00029 private:
00030     MidiDevice* getMidiDevice() { return &m_midi; };
00031     
00032         MidiDevice& m_midi;
00033         double m_min;
00034         double m_max;
00035         ControlObject* m_cobj;
00036         unsigned char m_status;
00037         unsigned char m_midino;
00038         unsigned char m_on;
00039         unsigned char m_off;
00040         QMutex m_reentracyBlock;
00041 };
00042 
00043 #endif
00044 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines