![]() |
Mixxx
|
00001 /*************************************************************************** 00002 softtakeover.h - description 00003 -------------- 00004 begin : Thu Mar 17 2011 00005 copyright : (C) 2011 by Sean M. Pappalardo 00006 email : spappalardo@mixxx.org 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 #ifndef SOFTTAKEOVER_H 00018 #define SOFTTAKEOVER_H 00019 00020 #include "mixxxcontrol.h" 00021 00022 class SoftTakeover { 00023 00024 public: 00027 void enable(MixxxControl control); 00028 void enable(QString group, QString name); 00030 void disable(MixxxControl control); 00031 void disable(QString group, QString name); 00033 bool ignore(MixxxControl control, float newValue, bool midiVal = false); 00035 bool ignore(QString group, QString name, float newValue); 00036 00037 private: 00043 static const uint SUBSEQUENT_VALUE_OVERRIDE_TIME = 50; // Milliseconds 00044 //qint64 currentTimeMsecs(); 00045 //QHash<MixxxControl,qint64> m_times; 00046 uint currentTimeMsecs(); 00047 QHash<MixxxControl,uint> m_times; 00048 }; 00049 00050 #endif