SampleTrackView.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * SampleTrackView.h
  3. *
  4. * Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  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. #ifndef SAMPLE_TRACK_VIEW_H
  25. #define SAMPLE_TRACK_VIEW_H
  26. #include "SampleTrack.h"
  27. #include "TrackView.h"
  28. class Knob;
  29. class SampleTrack;
  30. class SampleTrackWindow;
  31. class TrackLabelButton;
  32. class SampleTrackView : public TrackView
  33. {
  34. Q_OBJECT
  35. public:
  36. SampleTrackView( SampleTrack* Track, TrackContainerView* tcv );
  37. virtual ~SampleTrackView();
  38. SampleTrackWindow * getSampleTrackWindow()
  39. {
  40. return m_window;
  41. }
  42. SampleTrack * model()
  43. {
  44. return castModel<SampleTrack>();
  45. }
  46. const SampleTrack * model() const
  47. {
  48. return castModel<SampleTrack>();
  49. }
  50. QMenu * createMixerMenu( QString title, QString newMixerLabel ) override;
  51. public slots:
  52. void showEffects();
  53. void updateIndicator();
  54. protected:
  55. void modelChanged() override;
  56. QString nodeName() const override
  57. {
  58. return "SampleTrackView";
  59. }
  60. void dragEnterEvent(QDragEnterEvent *dee) override;
  61. void dropEvent(QDropEvent *de) override;
  62. private slots:
  63. void assignMixerLine( int channelIndex );
  64. void createMixerLine();
  65. private:
  66. SampleTrackWindow * m_window;
  67. Knob * m_volumeKnob;
  68. Knob * m_panningKnob;
  69. FadeButton * m_activityIndicator;
  70. TrackLabelButton * m_tlb;
  71. FadeButton * getActivityIndicator() override
  72. {
  73. return m_activityIndicator;
  74. }
  75. friend class SampleTrackWindow;
  76. } ;
  77. #endif