BBEditor.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * BBEditor.h - view-component of BB-Editor
  3. *
  4. * Copyright (c) 2004-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 BB_EDITOR_H
  25. #define BB_EDITOR_H
  26. #include "Editor.h"
  27. #include "TrackContainerView.h"
  28. class BBTrackContainer;
  29. class ComboBox;
  30. class BBTrackContainerView;
  31. class BBEditor : public Editor
  32. {
  33. Q_OBJECT
  34. public:
  35. BBEditor( BBTrackContainer * _tc );
  36. ~BBEditor();
  37. QSize sizeHint() const override;
  38. const BBTrackContainerView* trackContainerView() const {
  39. return m_trackContainerView;
  40. }
  41. BBTrackContainerView* trackContainerView() {
  42. return m_trackContainerView;
  43. }
  44. void removeBBView( int bb );
  45. public slots:
  46. void play() override;
  47. void stop() override;
  48. private:
  49. BBTrackContainerView* m_trackContainerView;
  50. ComboBox * m_bbComboBox;
  51. } ;
  52. class BBTrackContainerView : public TrackContainerView
  53. {
  54. Q_OBJECT
  55. public:
  56. BBTrackContainerView(BBTrackContainer* tc);
  57. bool fixedTCOs() const override
  58. {
  59. return true;
  60. }
  61. void removeBBView(int bb);
  62. void saveSettings(QDomDocument& doc, QDomElement& element) override;
  63. void loadSettings(const QDomElement& element) override;
  64. public slots:
  65. void addSteps();
  66. void cloneSteps();
  67. void removeSteps();
  68. void addSampleTrack();
  69. void addAutomationTrack();
  70. protected slots:
  71. void dropEvent(QDropEvent * de ) override;
  72. void updatePosition();
  73. private:
  74. BBTrackContainer * m_bbtc;
  75. void makeSteps( bool clone );
  76. };
  77. #endif