InterpolationInspectorWidget.hpp
1 #pragma once
2 #include <Device/Widgets/AddressAccessorEditWidget.hpp>
3 
4 #include <Process/Inspector/ProcessInspectorWidgetDelegate.hpp>
5 #include <Process/Inspector/ProcessInspectorWidgetDelegateFactory.hpp>
6 
7 #include <Inspector/InspectorWidgetBase.hpp>
8 #include <Inspector/InspectorWidgetFactoryInterface.hpp>
9 
10 #include <score/command/Dispatchers/CommandDispatcher.hpp>
11 
12 #include <Interpolation/InterpolationProcess.hpp>
13 class QLabel;
14 class QCheckBox;
15 namespace Interpolation
16 {
17 class ProcessModel;
18 class InspectorWidget final
19  : public Process::InspectorWidgetDelegate_T<Interpolation::ProcessModel>
20 {
21 public:
22  explicit InspectorWidget(
23  const ProcessModel& object, const score::DocumentContext& context,
24  QWidget* parent);
25 
26 private:
27  void on_addressChange(const ::State::AddressAccessor& newText);
29  QCheckBox* m_tween{};
30  QLabel* m_label;
31 
32  CommandDispatcher<> m_dispatcher;
33  void on_tweenChanged();
34 };
35 
36 class InspectorFactory final
37  : public Process::InspectorWidgetDelegateFactory_T<ProcessModel, InspectorWidget>
38 {
39  SCORE_CONCRETE("5159eabc-cd5c-4a00-a790-bd58936aace0")
40 };
41 
43 {
44 public:
45  explicit StateInspectorWidget(
46  const ProcessState& object, const score::DocumentContext& context,
47  QWidget* parent = nullptr);
48 
49 private:
50  void on_stateChanged();
51 
52  const ProcessState& m_state;
53  QLabel* m_label{};
54 };
55 
57 {
58  SCORE_CONCRETE("ea035d49-1897-4413-94e4-e5d6c90b21e6")
59 public:
61 
62  QWidget* make(
63  const InspectedObjects& sourceElements, const score::DocumentContext& doc,
64  QWidget* parent) const override;
65 
66  bool matches(const InspectedObjects& objects) const override;
67 };
68 }
The CommandDispatcher class.
Definition: CommandDispatcher.hpp:13
Definition: AddressAccessorEditWidget.hpp:26
The InspectorWidgetBase class Set the global structuration for an inspected element.
Definition: InspectorWidgetBase.hpp:37
The InspectorWidgetFactoryInterface class.
Definition: InspectorWidgetFactoryInterface.hpp:32
Definition: InterpolationInspectorWidget.hpp:38
Definition: InterpolationInspectorWidget.hpp:20
Definition: InterpolationInspectorWidget.hpp:57
QWidget * make(const InspectedObjects &sourceElements, const score::DocumentContext &doc, QWidget *parent) const override
makeWidget Makes a widget for the inspector from an object
Definition: InterpolationInspectorWidget.cpp:119
Definition: InterpolationInspectorWidget.hpp:43
Definition: ProcessInspectorWidgetDelegate.hpp:13
Definition: ProcessInspectorWidgetDelegateFactory.hpp:53
Definition: ObjectMatches.hpp:6
Definition: DocumentContext.hpp:18