CurveInlet.hpp
1 #pragma once
2 
3 #include <Process/Dataflow/Port.hpp>
4 
5 #include <Dataflow/PortItem.hpp>
6 
8 
9 #include <QGraphicsItem>
10 #include <QTableWidget>
11 
12 namespace Curve
13 {
14 class Model;
15 }
16 namespace Dataflow
17 {
18 struct CurveInlet;
19 }
20 
21 UUID_METADATA(
22  SCORE_PLUGIN_DATAFLOW_EXPORT, Process::Port, Dataflow::CurveInlet,
23  "87421d82-9727-4faa-b053-a372ea5fd2df")
24 
25 namespace WidgetFactory
26 {
27 struct CurveInletItems
28 {
29  static constexpr Process::PortItemLayout layout() noexcept
30  {
31  using namespace Process;
32  return {};
33  }
34  static QWidget* make_widget(
35  const Dataflow::CurveInlet& inlet, const score::DocumentContext& ctx,
36  QWidget* parent, QObject* context);
37 
38  static QGraphicsItem* make_item(
39  const Dataflow::CurveInlet& slider, const Dataflow::CurveInlet& inlet,
40  const score::DocumentContext& ctx, QGraphicsItem* parent, QObject* context);
41 };
42 }
43 
44 namespace Dataflow
45 {
46 struct SCORE_PLUGIN_DATAFLOW_EXPORT CurveInlet : public Process::ControlInlet
47 {
48  MODEL_METADATA_IMPL(CurveInlet)
49  CurveInlet(Id<Process::Port> id, QObject* parent);
50  ~CurveInlet();
51  CurveInlet(DataStream::Deserializer& vis, QObject* parent);
52  CurveInlet(JSONObject::Deserializer& vis, QObject* parent);
53  CurveInlet(DataStream::Deserializer&& vis, QObject* parent);
54  CurveInlet(JSONObject::Deserializer&& vis, QObject* parent);
55 
56  void init();
57  void on_curveChange();
58 
59  Curve::Model* m_curve{};
60 };
61 }
Definition: CurveModel.hpp:25
Definition: DataStreamVisitor.hpp:202
Definition: JSONVisitor.hpp:423
Definition: Port.hpp:203
Definition: Port.hpp:102
The id_base_t class.
Definition: Identifier.hpp:57
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Definition: CurveInlet.hpp:47
Definition: Port.hpp:90
Definition: DocumentContext.hpp:18