2 #include <Process/Dataflow/PortListWidget.hpp>
4 #include <Dataflow/ControlInletItem.hpp>
5 #include <Dataflow/ControlOutletItem.hpp>
6 #include <Dataflow/PortItem.hpp>
10 SCORE_PLUGIN_DATAFLOW_EXPORT
11 QWidget* makeGraphicsViewForInspectorItem(QGraphicsItem* item, QWidget* parent);
13 template <
typename T,
typename W
idget>
19 return Model_T::static_concreteKey();
24 return score::deserialize_dyn(vis, [&](
auto&& deserializer) {
25 return new Model_T{deserializer, parent};
29 void setupInletInspector(
33 auto& ctrl =
const_cast<Model_T&
>(
static_cast<const Model_T&
>(port));
34 auto widg = Widget::make_widget(ctrl, ctx, parent, parent);
37 Process::PortWidgetSetup::setupControl(ctrl, widg, ctx, lay, parent);
41 auto item = makeControlItem(ctrl, ctx,
nullptr, context);
42 auto widg = makeGraphicsViewForInspectorItem(item, parent);
43 Process::PortWidgetSetup::setupControl(ctrl, widg, ctx, lay, parent);
47 QGraphicsItem* makeControlItem(
49 QGraphicsItem* parent, QObject* context)
override
51 auto& ctrl =
static_cast<Model_T&
>(port);
52 return Widget::make_item(ctrl, ctrl, ctx,
nullptr, context);
57 return Widget::layout();
61 template <
typename T,
typename W
idget>
72 return score::deserialize_dyn(vis, [&](
auto&& deserializer) {
73 return new Model_T{deserializer, parent};
77 void setupOutletInspector(
81 auto& ctrl =
static_cast<const Model_T&
>(port);
82 auto widg = Widget::make_widget(ctrl, ctx, parent, parent);
83 Process::PortWidgetSetup::setupControl(ctrl, widg, ctx, lay, parent);
86 QGraphicsItem* makeControlItem(
88 QGraphicsItem* parent, QObject* context)
override
90 auto& ctrl =
static_cast<Model_T&
>(port);
91 return Widget::make_item(ctrl, ctrl, ctx,
nullptr, context);
96 return Widget::layout();
Definition: lib/score/widgets/Layout.hpp:29
Definition: UuidKey.hpp:343
Definition: ControlInletItem.hpp:7
Definition: ControlOutletItem.hpp:7
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26
Definition: DocumentContext.hpp:18