DualFilterControls.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * DualFilterControls.h - controls for dual filter -effect
  3. *
  4. * Copyright (c) 2014 Vesa Kivimäki <contact/dot/diizy/at/nbl/dot/fi>
  5. * Copyright (c) 2008-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. #ifndef DUALFILTER_CONTROLS_H
  26. #define DUALFILTER_CONTROLS_H
  27. #include "EffectControls.h"
  28. #include "DualFilterControlDialog.h"
  29. #include "Knob.h"
  30. #include "ComboBoxModel.h"
  31. class DualFilterEffect;
  32. class DualFilterControls : public EffectControls
  33. {
  34. Q_OBJECT
  35. public:
  36. DualFilterControls( DualFilterEffect* effect );
  37. virtual ~DualFilterControls()
  38. {
  39. }
  40. virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );
  41. virtual void loadSettings( const QDomElement & _this );
  42. inline virtual QString nodeName() const
  43. {
  44. return "DualFilterControls";
  45. }
  46. virtual int controlCount()
  47. {
  48. return 11;
  49. }
  50. virtual EffectControlDialog* createView()
  51. {
  52. return new DualFilterControlDialog( this );
  53. }
  54. private slots:
  55. void updateFilters();
  56. private:
  57. DualFilterEffect* m_effect;
  58. BoolModel m_enabled1Model;
  59. ComboBoxModel m_filter1Model;
  60. FloatModel m_cut1Model;
  61. FloatModel m_res1Model;
  62. FloatModel m_gain1Model;
  63. FloatModel m_mixModel;
  64. BoolModel m_enabled2Model;
  65. ComboBoxModel m_filter2Model;
  66. FloatModel m_cut2Model;
  67. FloatModel m_res2Model;
  68. FloatModel m_gain2Model;
  69. friend class DualFilterControlDialog;
  70. friend class DualFilterEffect;
  71. } ;
  72. #endif