PortListWidget.hpp
1 #pragma once
2 #include <QWidget>
3 
4 #include <score_lib_process_export.h>
5 
6 namespace Inspector
7 {
8 class Layout;
9 }
10 namespace Process
11 {
12 class Port;
13 class Inlet;
14 class Outlet;
15 class ControlInlet;
16 class ControlOutlet;
17 }
18 namespace score
19 {
20 struct DocumentContext;
21 }
22 namespace Process
23 {
24 class ProcessModel;
25 
26 class SCORE_LIB_PROCESS_EXPORT PortWidgetSetup final
27 {
28 public:
29  static void setupAlone(
30  const Process::Port& port, const score::DocumentContext& ctx,
31  Inspector::Layout& lay, QWidget* parent);
32  static void setupInLayout(
33  const Process::Port& port, const score::DocumentContext& ctx,
34  Inspector::Layout& lay, QWidget* parent);
35  static void setupControl(
36  const Process::ControlInlet& inlet, QWidget* inlet_widget,
37  const score::DocumentContext& ctx, Inspector::Layout& lay, QWidget* parent);
38  static void setupControl(
39  const Process::ControlOutlet& inlet, QWidget* inlet_widget,
40  const score::DocumentContext& ctx, Inspector::Layout& lay, QWidget* parent);
41 
42  static QWidget* makeAddressWidget(
43  const Process::Port& port, const score::DocumentContext& ctx, QWidget* parent);
44 
45 private:
46  static void setupImpl(
47  const QString& txt, const Port& port, const score::DocumentContext& ctx,
48  Inspector::Layout& lay, QWidget* parent);
49 };
55 class SCORE_LIB_PROCESS_EXPORT PortListWidget final : public QWidget
56 {
57 public:
59  const Process::ProcessModel& proc, const score::DocumentContext& ctx,
60  QWidget* parent);
61 
62  void reload();
63 
64 private:
65  const Process::ProcessModel& m_process;
66  const score::DocumentContext& m_ctx;
67  std::vector<QWidget*> m_inlets;
68  std::vector<QWidget*> m_outlets;
69 };
70 }
Definition: QmlObjects.hpp:114
Definition: lib/score/widgets/Layout.hpp:29
Definition: QmlObjects.hpp:51
Definition: Port.hpp:203
Definition: Port.hpp:425
Definition: Port.hpp:102
Show the list of ports / addresses.
Definition: PortListWidget.hpp:56
Definition: PortListWidget.hpp:27
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Classes used for making and extending the inspector (default right panel).
Definition: lib/score/widgets/Layout.hpp:27
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DocumentContext.hpp:18