DisplayedElementsToolPaletteFactory.hpp
1 #pragma once
2 #include <score/plugins/Interface.hpp>
3 #include <score/statemachine/GraphicsSceneToolPalette.hpp>
4 
5 #include <score_plugin_scenario_export.h>
6 
7 #include <memory>
8 class QGraphicsItem;
9 namespace Scenario
10 {
11 class IntervalModel;
12 class ScenarioDocumentPresenter;
13 class DisplayedElementsPresenter;
14 
15 class SCORE_PLUGIN_SCENARIO_EXPORT DisplayedElementsToolPaletteFactory
16  : public score::InterfaceBase
17 {
18  SCORE_INTERFACE(
19  DisplayedElementsToolPaletteFactory, "0884edb9-81e4-44ff-856f-fbc772f6d683")
20 public:
22 
23  virtual bool matches(const IntervalModel& interval) const = 0;
24 
25  bool matches(
27  const IntervalModel& interval, QGraphicsItem*) const
28  {
29  return matches(interval);
30  }
31 
32  virtual std::unique_ptr<GraphicsSceneToolPalette> make(
34  const IntervalModel& interval, QGraphicsItem* parent)
35  = 0;
36 };
37 }
Definition: DisplayedElementsPresenter.hpp:25
Definition: DisplayedElementsToolPaletteFactory.hpp:17
Definition: IntervalModel.hpp:50
The ScenarioDocumentPresenter class.
Definition: ScenarioDocumentPresenter.hpp:58
Base class for plug-in interfaces.
Definition: Interface.hpp:52
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: ObjectMatches.hpp:6