![]() |
Mixxx
|
00001 /*************************************************************************** 00002 wabstractcontrol.cpp - Abstract Control Widget 00003 ------------------- 00004 copyright : (C) 2007 by Wesley Stessens 00005 ***************************************************************************/ 00006 00007 /*************************************************************************** 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 ***************************************************************************/ 00015 00016 #include "wabstractcontrol.h" 00017 00018 WAbstractControl::WAbstractControl(QWidget *parent, float defaultValue) 00019 : WWidget(parent) 00020 { 00021 m_fDefaultValue = defaultValue; 00022 m_bRightButtonPressed = false; 00023 } 00024 00025 WAbstractControl::~WAbstractControl() 00026 { 00027 } 00028 00029 void WAbstractControl::setDefaultValue(float value) 00030 { 00031 m_fDefaultValue = value; 00032 } 00033 00034 void WAbstractControl::reset() 00035 { 00036 setValue(m_fDefaultValue); 00037 emit(valueChangedLeftUp(m_fValue)); 00038 emit(valueChangedLeftDown(m_fValue)); 00039 }