FlangerControlsDialog.cpp 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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( 233, 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 * lfoPhaseKnob = new Knob( knobBright_26, this );
  56. lfoPhaseKnob->move( 123,10 );
  57. lfoPhaseKnob->setVolumeKnob( false );
  58. lfoPhaseKnob->setModel( &controls->m_lfoPhaseModel );
  59. lfoPhaseKnob->setLabel( tr( "PHASE" ) );
  60. lfoPhaseKnob->setHintText( tr( "Phase:" ) , " degrees" );
  61. Knob * feedbackKnob = new Knob( knobBright_26, this );
  62. feedbackKnob->move( 160,10 );
  63. feedbackKnob->setVolumeKnob( true) ;
  64. feedbackKnob->setModel( &controls->m_feedbackModel );
  65. feedbackKnob->setLabel( tr( "FDBK" ) );
  66. feedbackKnob->setHintText( tr( "Feedback amount:" ) , "" );
  67. Knob * whiteNoiseKnob = new Knob( knobBright_26, this );
  68. whiteNoiseKnob->move( 196,10 );
  69. whiteNoiseKnob->setVolumeKnob( true) ;
  70. whiteNoiseKnob->setModel( &controls->m_whiteNoiseAmountModel );
  71. whiteNoiseKnob->setLabel( tr( "NOISE" ) );
  72. whiteNoiseKnob->setHintText( tr( "White noise amount:" ) , "" );
  73. LedCheckBox * invertCb = new LedCheckBox( tr( "Invert" ), this );
  74. invertCb->move( 10,53 );
  75. }