EnvelopeAndLfoView.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * EnvelopeAndLfoView.h - declaration of class EnvelopeAndLfoView which
  3. * is used by envelope/lfo/filter-tab of instrument track
  4. *
  5. * Copyright (c) 2004-2009 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 ENVELOPE_AND_LFO_VIEW_H
  26. #define ENVELOPE_AND_LFO_VIEW_H
  27. #include <QWidget>
  28. #include "ModelView.h"
  29. class QPaintEvent;
  30. class QPixmap;
  31. class EnvelopeAndLfoParameters;
  32. class automatableButtonGroup;
  33. class Knob;
  34. class LedCheckBox;
  35. class PixmapButton;
  36. class TempoSyncKnob;
  37. class EnvelopeAndLfoView : public QWidget, public ModelView
  38. {
  39. Q_OBJECT
  40. public:
  41. EnvelopeAndLfoView( QWidget * _parent );
  42. virtual ~EnvelopeAndLfoView();
  43. protected:
  44. void modelChanged() override;
  45. void dragEnterEvent( QDragEnterEvent * _dee ) override;
  46. void dropEvent( QDropEvent * _de ) override;
  47. void mousePressEvent( QMouseEvent * _me ) override;
  48. void paintEvent( QPaintEvent * _pe ) override;
  49. protected slots:
  50. void lfoUserWaveChanged();
  51. private:
  52. static QPixmap * s_envGraph;
  53. static QPixmap * s_lfoGraph;
  54. EnvelopeAndLfoParameters * m_params;
  55. // envelope stuff
  56. Knob * m_predelayKnob;
  57. Knob * m_attackKnob;
  58. Knob * m_holdKnob;
  59. Knob * m_decayKnob;
  60. Knob * m_sustainKnob;
  61. Knob * m_releaseKnob;
  62. Knob * m_amountKnob;
  63. // LFO stuff
  64. Knob * m_lfoPredelayKnob;
  65. Knob * m_lfoAttackKnob;
  66. TempoSyncKnob * m_lfoSpeedKnob;
  67. Knob * m_lfoAmountKnob;
  68. PixmapButton * m_userLfoBtn;
  69. automatableButtonGroup * m_lfoWaveBtnGrp;
  70. LedCheckBox * m_x100Cb;
  71. LedCheckBox * m_controlEnvAmountCb;
  72. float m_randomGraph;
  73. } ;
  74. #endif