AmplifierControlDialog.cpp 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * AmplifierControlDialog.cpp - control dialog for amplifier effect
  3. *
  4. * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
  5. * Copyright (c) 2006-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  6. *
  7. * This file is part of LMMS - https://lmms.io
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2 of the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public
  20. * License along with this program (see COPYING); if not, write to the
  21. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  22. * Boston, MA 02110-1301 USA.
  23. *
  24. */
  25. #include <QLayout>
  26. #include "AmplifierControlDialog.h"
  27. #include "AmplifierControls.h"
  28. #include "embed.h"
  29. AmplifierControlDialog::AmplifierControlDialog( AmplifierControls* controls ) :
  30. EffectControlDialog( controls )
  31. {
  32. setAutoFillBackground( true );
  33. QPalette pal;
  34. pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
  35. setPalette( pal );
  36. setFixedSize( 100, 110 );
  37. Knob * volumeKnob = new Knob( knobBright_26, this);
  38. volumeKnob -> move( 16, 10 );
  39. volumeKnob -> setVolumeKnob( true );
  40. volumeKnob->setModel( &controls->m_volumeModel );
  41. volumeKnob->setLabel( tr( "VOL" ) );
  42. volumeKnob->setHintText( tr( "Volume:" ) , "%" );
  43. Knob * panKnob = new Knob( knobBright_26, this);
  44. panKnob -> move( 57, 10 );
  45. panKnob->setModel( &controls->m_panModel );
  46. panKnob->setLabel( tr( "PAN" ) );
  47. panKnob->setHintText( tr( "Panning:" ) , "" );
  48. Knob * leftKnob = new Knob( knobBright_26, this);
  49. leftKnob -> move( 16, 65 );
  50. leftKnob -> setVolumeKnob( true );
  51. leftKnob->setModel( &controls->m_leftModel );
  52. leftKnob->setLabel( tr( "LEFT" ) );
  53. leftKnob->setHintText( tr( "Left gain:" ) , "%" );
  54. Knob * rightKnob = new Knob( knobBright_26, this);
  55. rightKnob -> move( 57, 65 );
  56. rightKnob -> setVolumeKnob( true );
  57. rightKnob->setModel( &controls->m_rightModel );
  58. rightKnob->setLabel( tr( "RIGHT" ) );
  59. rightKnob->setHintText( tr( "Right gain:" ) , "%" );
  60. }