timeline_area.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* timeline_area.h - advanced timeline
  2. * Copyright (C) 2017 caryoscelus
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef STUDIO_WIDGETS_TIMELINE_AREA_H_642C9BBC_A699_5EA7_99D3_EDF15CA95ECD
  18. #define STUDIO_WIDGETS_TIMELINE_AREA_H_642C9BBC_A699_5EA7_99D3_EDF15CA95ECD
  19. #include <QGraphicsView>
  20. #include <core/std/memory.h>
  21. #include <core/std/map.h>
  22. #include <core/std/vector.h>
  23. #include <canvas/abstract_canvas.h>
  24. #include <canvas/registry.h>
  25. class QGraphicsScene;
  26. namespace rainynite::studio {
  27. class TimelineEditor;
  28. class TimelineArea : public AbstractCanvas {
  29. public:
  30. explicit TimelineArea(QWidget* parent = nullptr);
  31. virtual ~TimelineArea();
  32. void zoom_time_by(double factor);
  33. void add_misc_editor(shared_ptr<AbstractCanvasEditor> editor);
  34. private:
  35. vector<shared_ptr<AbstractCanvasEditor>> misc_editors;
  36. };
  37. REGISTER_CANVAS(TimelineArea);
  38. } // namespace rainynite::studio
  39. #endif