DisplayedElementsProvider.hpp
1 #pragma once
2 #include <Scenario/Document/DisplayedElements/DisplayedElementsContainer.hpp>
3 
4 #include <score/plugins/Interface.hpp>
5 
6 class QGraphicsItem;
7 namespace Process
8 {
9 struct Context;
10 }
11 namespace Scenario
12 {
13 class IntervalModel;
14 
15 class SCORE_PLUGIN_SCENARIO_EXPORT DisplayedElementsProvider
16  : public score::InterfaceBase
17 {
18  SCORE_INTERFACE(DisplayedElementsProvider, "4bfcf0ee-6c47-405a-a15d-9da73436e273")
19 public:
20  virtual ~DisplayedElementsProvider();
21  virtual bool matches(const IntervalModel& cst) const = 0;
22  bool matches(
23  ZoomRatio zoom, const IntervalModel& cst, const Process::Context& ctx,
24  QGraphicsItem* view_parent, QObject* parent) const
25  {
26  return matches(cst);
27  }
28 
29  virtual DisplayedElementsContainer make(IntervalModel& cst) const = 0;
30  virtual DisplayedElementsPresenterContainer make_presenters(
31  ZoomRatio zoom, const IntervalModel& m, const Process::Context& ctx,
32  QGraphicsItem* view_parent, QObject* parent) const = 0;
33 };
34 }
Definition: DisplayedElementsProvider.hpp:17
Definition: IntervalModel.hpp:50
Base class for plug-in interfaces.
Definition: Interface.hpp:52
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: ProcessContext.hpp:12
Definition: DisplayedElementsContainer.hpp:17
Definition: DisplayedElementsContainer.hpp:44
Definition: ObjectMatches.hpp:6