PdInspectorWidget.hpp
1 #pragma once
2 #include <Process/Inspector/ProcessInspectorWidgetDelegate.hpp>
3 #include <Process/Inspector/ProcessInspectorWidgetDelegateFactory.hpp>
4 
5 #include <Explorer/Explorer/DeviceExplorerModel.hpp>
6 
7 #include <Pd/Commands/EditPd.hpp>
8 #include <Pd/PdProcess.hpp>
9 
10 #include <score/command/Dispatchers/CommandDispatcher.hpp>
11 #include <score/widgets/MarginLess.hpp>
12 
13 #include <QCheckBox>
14 #include <QFormLayout>
15 #include <QLineEdit>
16 #include <QSpinBox>
17 #include <QVBoxLayout>
18 namespace Pd
19 {
20 
21 class PdWidget final : public Process::InspectorWidgetDelegate_T<Pd::ProcessModel>
22 {
23  W_OBJECT(PdWidget)
24 public:
25  explicit PdWidget(
26  const Pd::ProcessModel& object, const score::DocumentContext& context,
27  QWidget* parent);
28 
29  void pressed() W_SIGNAL(pressed);
30  void contextMenuRequested(QPoint p) W_SIGNAL(contextMenuRequested, p);
31 
32 private:
33  void reinit();
34  void on_patchChange(const QString& newText);
35 
36  CommandDispatcher<> m_disp;
37  const Pd::ProcessModel& m_proc;
39 
40  QLineEdit m_ledit;
42  QWidget m_portwidg;
43 
45  QSpinBox m_audioIn, m_audioOut;
46  QCheckBox m_midiIn, m_midiOut;
47 };
48 
49 class InspectorFactory final
50  : public Process::InspectorWidgetDelegateFactory_T<ProcessModel, PdWidget>
51 {
52  SCORE_CONCRETE("ac3f1317-1381-4a19-a10f-2e7ae711bf58")
53 };
54 }
The CommandDispatcher class.
Definition: CommandDispatcher.hpp:13
Definition: DeviceExplorerModel.hpp:67
Definition: PdInspectorWidget.hpp:51
Definition: PdInspectorWidget.hpp:22
Definition: PdProcess.hpp:40
Definition: ProcessInspectorWidgetDelegate.hpp:13
Definition: ProcessInspectorWidgetDelegateFactory.hpp:53
Definition: DocumentContext.hpp:18