AutomationTrack.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * AutomationTrack.h - declaration of class AutomationTrack, which handles
  3. * automation of objects without a track
  4. *
  5. * Copyright (c) 2008-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  6. * Copyright (c) 2006-2008 Javier Serrano Polo <jasp00/at/users.sourceforge.net>
  7. *
  8. * This file is part of LMMS - https://lmms.io
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2 of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public
  21. * License along with this program (see COPYING); if not, write to the
  22. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. * Boston, MA 02110-1301 USA.
  24. *
  25. */
  26. #ifndef AUTOMATION_TRACK_H
  27. #define AUTOMATION_TRACK_H
  28. #include "Track.h"
  29. class LMMS_EXPORT AutomationTrack : public Track
  30. {
  31. Q_OBJECT
  32. public:
  33. AutomationTrack( TrackContainer* tc, bool _hidden = false );
  34. virtual ~AutomationTrack() = default;
  35. virtual bool play( const MidiTime & _start, const fpp_t _frames,
  36. const f_cnt_t _frame_base, int _tco_num = -1 ) override;
  37. QString nodeName() const override
  38. {
  39. return "automationtrack";
  40. }
  41. TrackView * createView( TrackContainerView* ) override;
  42. TrackContentObject * createTCO( const MidiTime & _pos ) override;
  43. virtual void saveTrackSpecificSettings( QDomDocument & _doc,
  44. QDomElement & _parent ) override;
  45. void loadTrackSpecificSettings( const QDomElement & _this ) override;
  46. private:
  47. friend class AutomationTrackView;
  48. } ;
  49. class AutomationTrackView : public TrackView
  50. {
  51. public:
  52. AutomationTrackView( AutomationTrack* at, TrackContainerView* tcv );
  53. virtual ~AutomationTrackView() = default;
  54. void dragEnterEvent( QDragEnterEvent * _dee ) override;
  55. void dropEvent( QDropEvent * _de ) override;
  56. } ;
  57. #endif