EffectRackView.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. * EffectRackView.h - view for effectChain-model
  3. *
  4. * Copyright (c) 2006-2007 Danny McRae <khjklujn@netscape.net>
  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 EFFECT_RACK_VIEW_H
  26. #define EFFECT_RACK_VIEW_H
  27. #include <QWidget>
  28. #include "EffectChain.h"
  29. #include "ModelView.h"
  30. #include "lmms_basics.h"
  31. class QScrollArea;
  32. class QVBoxLayout;
  33. class EffectView;
  34. class GroupBox;
  35. class EffectRackView : public QWidget, public ModelView
  36. {
  37. Q_OBJECT
  38. public:
  39. EffectRackView( EffectChain* model, QWidget* parent = NULL );
  40. virtual ~EffectRackView();
  41. public slots:
  42. void clearViews();
  43. void moveUp( EffectView* view );
  44. void moveDown( EffectView* view );
  45. void deletePlugin( EffectView* view );
  46. private slots:
  47. virtual void update();
  48. void addEffect();
  49. private:
  50. void modelChanged() override;
  51. inline EffectChain* fxChain()
  52. {
  53. return castModel<EffectChain>();
  54. }
  55. inline const EffectChain* fxChain() const
  56. {
  57. return castModel<EffectChain>();
  58. }
  59. QVector<EffectView *> m_effectViews;
  60. GroupBox* m_effectsGroupBox;
  61. QScrollArea* m_scrollArea;
  62. int m_lastY;
  63. } ;
  64. #endif