EffectView.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*
  2. * EffectView.h - view-component for an effect
  3. *
  4. * Copyright (c) 2006-2007 Danny McRae <khjklujn/at/users.sourceforge.net>
  5. * Copyright (c) 2007-2010 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 EFFECT_VIEW_H
  26. #define EFFECT_VIEW_H
  27. #include "AutomatableModel.h"
  28. #include "PluginView.h"
  29. #include "Effect.h"
  30. class QGroupBox;
  31. class QLabel;
  32. class QPushButton;
  33. class QMdiSubWindow;
  34. class EffectControlDialog;
  35. class Knob;
  36. class LedCheckBox;
  37. class TempoSyncKnob;
  38. class EffectView : public PluginView
  39. {
  40. Q_OBJECT
  41. public:
  42. EffectView( Effect * _model, QWidget * _parent );
  43. virtual ~EffectView();
  44. inline Effect * effect()
  45. {
  46. return castModel<Effect>();
  47. }
  48. inline const Effect * effect() const
  49. {
  50. return castModel<Effect>();
  51. }
  52. public slots:
  53. void editControls();
  54. void moveUp();
  55. void moveDown();
  56. void deletePlugin();
  57. void closeEffects();
  58. signals:
  59. void moveUp( EffectView * _plugin );
  60. void moveDown( EffectView * _plugin );
  61. void deletePlugin( EffectView * _plugin );
  62. protected:
  63. void contextMenuEvent( QContextMenuEvent * _me ) override;
  64. void paintEvent( QPaintEvent * _pe ) override;
  65. void modelChanged() override;
  66. private:
  67. QPixmap m_bg;
  68. LedCheckBox * m_bypass;
  69. Knob * m_wetDry;
  70. TempoSyncKnob * m_autoQuit;
  71. Knob * m_gate;
  72. QMdiSubWindow * m_subWindow;
  73. EffectControlDialog * m_controlView;
  74. } ;
  75. #endif