![]() |
Mixxx
|
00001 /*************************************************************************** 00002 controlpotmeter.h - description 00003 ------------------- 00004 begin : Wed Feb 20 2002 00005 copyright : (C) 2002 by Tue and Ken Haste Andersen 00006 email : 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 00018 #ifndef CONTROLPOTMETER_H 00019 #define CONTROLPOTMETER_H 00020 00021 #include "configobject.h" 00022 #include "controlobject.h" 00023 #include <algorithm> 00024 00029 class ControlPushButton; 00030 00031 class ControlPotmeter : public ControlObject 00032 { 00033 Q_OBJECT 00034 public: 00035 ControlPotmeter(ConfigKey key, double dMinValue=0.0, double dMaxValue=1.0); 00036 ~ControlPotmeter(); 00038 double getMin(); 00040 double getMax(); 00042 void setStep(double); 00044 void setSmallStep(double); 00047 void setRange(double dMinValue, double dMaxValue); 00048 double getValueFromWidget(double dValue); 00049 double getValueToWidget(double dValue); 00050 double GetMidiValue(); 00051 00052 public slots: 00053 void setValueFromThread(double dValue); 00054 void setValueFromEngine(double dValue); 00056 void incValue(double); 00058 void decValue(double); 00060 void incSmallValue(double); 00062 void decSmallValue(double); 00063 00064 protected: 00065 void setValueFromMidi(MidiCategory c, double v); 00066 00067 double m_dMaxValue, m_dMinValue, m_dValueRange, m_dStep, m_dSmallStep; 00068 }; 00069 00070 #endif