Loading...
Searching...
No Matches
PortListWidget.hpp
1#pragma once
2#include <QWidget>
3
4#include <score_lib_process_export.h>
5
6class QLabel;
7
8namespace Inspector
9{
10class Layout;
11}
12namespace Process
13{
14class Port;
15class Inlet;
16class Outlet;
17class ControlInlet;
18class ControlOutlet;
19}
20namespace score
21{
22struct DocumentContext;
23}
24namespace Process
25{
26class ProcessModel;
27
28class SCORE_LIB_PROCESS_EXPORT PortWidgetSetup final
29{
30public:
31 static void setupAlone(
32 const Process::Port& port, const score::DocumentContext& ctx,
33 Inspector::Layout& lay, QWidget* parent);
34 static void setupInLayout(
35 const Process::Port& port, const score::DocumentContext& ctx,
36 Inspector::Layout& lay, QWidget* parent);
37 static void setupControl(
38 const Process::ControlInlet& inlet, QWidget* inlet_widget,
39 const score::DocumentContext& ctx, Inspector::Layout& lay, QWidget* parent);
40 static void setupControl(
41 const Process::ControlOutlet& inlet, QWidget* inlet_widget,
42 const score::DocumentContext& ctx, Inspector::Layout& lay, QWidget* parent);
43
44 static QWidget* makeAddressWidget(
45 const Process::Port& port, const score::DocumentContext& ctx, QWidget* parent);
46
48 static QWidget* makeScriptableWidget(
49 const Process::Port& port, const score::DocumentContext& ctx, QWidget* parent);
50
51private:
52 static QLabel* setupImpl(
53 const QString& txt, const Port& port, const score::DocumentContext& ctx,
54 Inspector::Layout& lay, QWidget* parent);
55};
61class SCORE_LIB_PROCESS_EXPORT PortListWidget final : public QWidget
62{
63public:
65 const Process::ProcessModel& proc, const score::DocumentContext& ctx,
66 QWidget* parent);
67
68 void reload();
69
70private:
71 const Process::ProcessModel& m_process;
72 const score::DocumentContext& m_ctx;
73 std::vector<QWidget*> m_inlets;
74 std::vector<QWidget*> m_outlets;
75};
76}
Definition lib/score/widgets/Layout.hpp:53
Definition Port.hpp:242
Definition Port.hpp:476
Definition Port.hpp:106
Show the list of ports / addresses.
Definition PortListWidget.hpp:62
Definition PortListWidget.hpp:29
The Process class.
Definition score-lib-process/Process/Process.hpp:80
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:1115
Base toolkit upon which the software is built.
Definition Application.cpp:108
Definition DocumentContext.hpp:18