2 #include <Process/Process.hpp>
4 #include <Effect/EffectLayer.hpp>
5 #include <Effect/EffectLayout.hpp>
7 #include <score/model/Skin.hpp>
9 #include <ossia/network/value/format_value.hpp>
13 #include <halp/controls.hpp>
14 #include <halp/meta.hpp>
15 namespace Ui::ValueDisplay
19 halp_meta(name,
"Value display")
20 halp_meta(c_name,
"Display")
21 halp_meta(category,
"Monitoring")
22 halp_meta(author,
"ossia score")
23 halp_meta(manual_url,
"")
24 halp_meta(description,
"Visualize an input value")
25 halp_meta(uuid,
"3f4a41f2-fa39-420f-ab0f-0af6b8409edb")
26 halp_flag(fully_custom_item);
29 struct : halp::val_port<
"in", ossia::value>
45 QGraphicsItem* parent)
48 setAcceptedMouseButtons({});
55 auto fact = portFactory.get(inl->concreteKey());
56 auto port = fact->makePortItem(*inl, doc,
this,
this);
60 inl, &Process::ControlInlet::executionValueChanged,
this,
61 [
this](
const ossia::value& v) {
69 m_value = ossia::value{};
73 void paint_impl(QPainter* p)
const override
78 p->setRenderHint(QPainter::Antialiasing,
true);
79 p->setPen(score::Skin::instance().Light.main.pen1_solid_flat_miter);
81 p->drawText(boundingRect(), QString::fromStdString(fmt::format(
"{}", m_value)));
83 p->setRenderHint(QPainter::Antialiasing,
false);
Definition: EffectLayer.hpp:16
Definition: PortFactory.hpp:74
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ProcessContext.hpp:12
Definition: ValueDisplay.hpp:39
Definition: ValueDisplay.hpp:18
const T & interfaces() const
Access to a specific interface list.
Definition: ApplicationContext.hpp:67