stereoenhancer_controls.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * stereoenhancer_controls.cpp - control-dialog for stereoenhancer-effect
  3. *
  4. * Copyright (c) 2006-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  5. *
  6. * This file is part of LMMS - https://lmms.io
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public
  19. * License along with this program (see COPYING); if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. * Boston, MA 02110-1301 USA.
  22. *
  23. */
  24. #include <QDomElement>
  25. #include "stereoenhancer_controls.h"
  26. #include "stereo_enhancer.h"
  27. stereoEnhancerControls::stereoEnhancerControls( stereoEnhancerEffect * _eff ) :
  28. EffectControls( _eff ),
  29. m_effect( _eff ),
  30. m_widthModel(0.0f, 0.0f, 180.0f, 1.0f, this, tr( "Width" ) )
  31. {
  32. connect( &m_widthModel, SIGNAL( dataChanged() ),
  33. this, SLOT( changeWideCoeff() ) );
  34. changeWideCoeff();
  35. }
  36. void stereoEnhancerControls::changeWideCoeff()
  37. {
  38. m_effect->m_seFX.setWideCoeff( m_widthModel.value() );
  39. }
  40. void stereoEnhancerControls::loadSettings( const QDomElement & _this )
  41. {
  42. m_widthModel.loadSettings( _this, "width" );
  43. }
  44. void stereoEnhancerControls::saveSettings( QDomDocument & _doc,
  45. QDomElement & _this )
  46. {
  47. m_widthModel.saveSettings( _doc, _this, "width" );
  48. }