Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/controllogpotmeter.h

Go to the documentation of this file.
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 CONTROLLOGPOTMETER_H
00019 #define CONTROLLOGPOTMETER_H
00020 
00021 #include "controlpotmeter.h"
00022 #include "configobject.h"
00023 #include <algorithm>
00024 
00029 class ControlLogpotmeter : public ControlPotmeter
00030 {
00031     Q_OBJECT
00032 public:
00033     ControlLogpotmeter(ConfigKey key, double dMaxValue=5.);
00034     
00035     double getValueFromWidget(double dValue);
00036     double getValueToWidget(double dValue);
00037 
00038     double GetMidiValue();
00039     
00040         void setValueFromMidi(MidiCategory c, double v);
00041 
00042 protected:
00043 
00044     // This is true, if the log potmeter is divided into two states, one from 0 to 1, and
00045     // the second from 1 to m_dMaxValue. Two states is often used with knobs where the first
00046     // half rotation is used to control a value between 0 and 1, and the second half between
00047     // 1 and some bigger value.
00048     bool m_bTwoState;
00049     
00050     double m_fB1, m_fB2;
00051 };
00052 
00053 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines