BassBoosterControlDialog.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * BassBoosterControlDialog.cpp - control dialog for bassbooster effect
  3. *
  4. * Copyright (c) 2006-2014 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 <QLayout>
  25. #include "BassBoosterControlDialog.h"
  26. #include "BassBoosterControls.h"
  27. #include "embed.h"
  28. BassBoosterControlDialog::BassBoosterControlDialog( BassBoosterControls* controls ) :
  29. EffectControlDialog( controls )
  30. {
  31. setAutoFillBackground( true );
  32. QPalette pal;
  33. pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
  34. setPalette( pal );
  35. setFixedSize( 120, 60 );
  36. QVBoxLayout * tl = new QVBoxLayout( this );
  37. tl->addSpacing( 4 );
  38. QHBoxLayout * l = new QHBoxLayout;
  39. Knob * freqKnob = new Knob( knobBright_26, this);
  40. freqKnob->setModel( &controls->m_freqModel );
  41. freqKnob->setLabel( tr( "FREQ" ) );
  42. freqKnob->setHintText( tr( "Frequency:" ) , "Hz" );
  43. Knob * gainKnob = new Knob( knobBright_26, this );
  44. gainKnob->setModel( &controls->m_gainModel );
  45. gainKnob->setLabel( tr( "GAIN" ) );
  46. gainKnob->setHintText( tr( "Gain:" ) , "" );
  47. Knob * ratioKnob = new Knob( knobBright_26, this );
  48. ratioKnob->setModel( &controls->m_ratioModel );
  49. ratioKnob->setLabel( tr( "RATIO" ) );
  50. ratioKnob->setHintText( tr( "Ratio:" ) , "" );
  51. l->addWidget( freqKnob );
  52. l->addWidget( gainKnob );
  53. l->addWidget( ratioKnob );
  54. tl->addLayout( l );
  55. setLayout( tl );
  56. }