FlangerControlsDialog.cpp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * flangercontrolsdialog.cpp - defination of FlangerControlsDialog class.
  3. *
  4. * Copyright (c) 2014 David French <dave/dot/french3/at/googlemail/dot/com>
  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 "FlangerControlsDialog.h"
  25. #include "FlangerControls.h"
  26. #include "embed.h"
  27. #include "LedCheckbox.h"
  28. #include "TempoSyncKnob.h"
  29. FlangerControlsDialog::FlangerControlsDialog( FlangerControls *controls ) :
  30. EffectControlDialog( controls )
  31. {
  32. setAutoFillBackground( true );
  33. QPalette pal;
  34. pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap( "artwork" ) );
  35. setPalette( pal );
  36. setFixedSize( 195, 75 );
  37. Knob* delayKnob = new Knob( knobBright_26, this );
  38. delayKnob->move( 10,10 );
  39. delayKnob->setVolumeKnob( false );
  40. delayKnob->setModel( &controls->m_delayTimeModel );
  41. delayKnob->setLabel( tr( "DELAY" ) );
  42. delayKnob->setHintText( tr( "Delay Time:" ) + " ", "s" );
  43. TempoSyncKnob * lfoFreqKnob = new TempoSyncKnob( knobBright_26, this );
  44. lfoFreqKnob->move( 48,10 );
  45. lfoFreqKnob->setVolumeKnob( false );
  46. lfoFreqKnob->setModel( &controls->m_lfoFrequencyModel );
  47. lfoFreqKnob->setLabel( tr( "RATE" ) );
  48. lfoFreqKnob->setHintText( tr ( "Period:" ) , " Sec" );
  49. Knob * lfoAmtKnob = new Knob( knobBright_26, this );
  50. lfoAmtKnob->move( 85,10 );
  51. lfoAmtKnob->setVolumeKnob( false );
  52. lfoAmtKnob->setModel( &controls->m_lfoAmountModel );
  53. lfoAmtKnob->setLabel( tr( "AMNT" ) );
  54. lfoAmtKnob->setHintText( tr ( "Amount:" ) , "" );
  55. Knob * feedbackKnob = new Knob( knobBright_26, this );
  56. feedbackKnob->move( 122,10 );
  57. feedbackKnob->setVolumeKnob( true) ;
  58. feedbackKnob->setModel( &controls->m_feedbackModel );
  59. feedbackKnob->setLabel( tr( "FDBK" ) );
  60. feedbackKnob->setHintText( tr ( "Feedback Amount:" ) , "" );
  61. Knob * whiteNoiseKnob = new Knob( knobBright_26, this );
  62. whiteNoiseKnob->move( 156,10 );
  63. whiteNoiseKnob->setVolumeKnob( true) ;
  64. whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
  65. whiteNoiseKnob->setLabel( tr( "NOISE" ) );
  66. whiteNoiseKnob->setHintText( tr ( "White Noise Amount:" ) , "" );
  67. LedCheckBox * invertCb = new LedCheckBox( tr( "Invert" ), this );
  68. invertCb->move( 10,53 );
  69. }