Loading...
Searching...
No Matches
WidgetInlets.hpp
1#pragma once
2#include <Process/Dataflow/Port.hpp>
3
5
6#include <ossia/network/domain/domain.hpp>
7
8namespace Process
9{
10struct FloatSlider;
11struct FloatKnob;
12struct LogFloatSlider;
13struct IntSlider;
14struct IntRangeSlider;
15struct FloatRangeSlider;
16struct IntRangeSpinBox;
17struct FloatRangeSpinBox;
18struct IntSpinBox;
19struct FloatSpinBox;
20struct TimeChooser;
21struct Toggle;
22struct ChooserToggle;
23struct ComboBox;
24struct LineEdit;
25struct ProgramEdit;
26struct FileChooser;
27struct AudioFileChooser;
28struct VideoFileChooser;
29struct Enum;
30struct Button;
31struct ImpulseButton;
32struct HSVSlider;
33struct XYSlider;
34struct XYZSlider;
35struct XYSpinboxes;
36struct XYZSpinboxes;
37struct MultiSlider;
38struct Bargraph;
39} // namespace Process
40UUID_METADATA(
41 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FloatSlider,
42 "af2b4fc3-aecb-4c15-a5aa-1c573a239925")
43UUID_METADATA(
44 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FloatKnob,
45 "82427d27-084a-4ab6-9c4e-db83929a1200")
46UUID_METADATA(
47 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::LogFloatSlider,
48 "5554eb67-bcc8-45ab-8ec2-37a3f191aa64")
49
50UUID_METADATA(
51 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::IntSlider,
52 "348b80a4-45dc-4f70-8f5f-6546c85089a2")
53
54UUID_METADATA(
55 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::IntRangeSlider,
56 "0c1902bc-e282-11ec-8fea-0242ac120002")
57UUID_METADATA(
58 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FloatRangeSlider,
59 "73ae3e85-0c91-497e-b612-b1391f87ac72")
60
61UUID_METADATA(
62 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::IntRangeSpinBox,
63 "54dc640b-4385-4a5a-b9da-e44fe63701d9")
64UUID_METADATA(
65 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FloatRangeSpinBox,
66 "25be1f08-a3fb-4ce3-a34e-4d8f54f15874")
67
68UUID_METADATA(
69 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::IntSpinBox,
70 "238399a0-7e81-47e3-896f-08e8856e2973")
71UUID_METADATA(
72 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FloatSpinBox,
73 "10d62b0d-5bc9-4ac9-9540-9e8ac0c24947")
74
75UUID_METADATA(
76 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::Toggle,
77 "fb27e4cb-ea7f-41e2-ad92-2354498c1b6b")
78
79UUID_METADATA(
80 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::ChooserToggle,
81 "27d488b6-784b-4bfc-8e7f-e28ef030c248")
82UUID_METADATA(
83 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::TimeChooser,
84 "b631d9b7-cbe3-4d9c-b470-f139e348aecb")
85
86UUID_METADATA(
87 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::LineEdit,
88 "9ae797ea-d94c-4792-acec-9ec1932bae5d")
89UUID_METADATA(
90 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::FileChooser,
91 "40833147-4c42-4b8b-bb80-0b1d15dae129")
92UUID_METADATA(
93 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::AudioFileChooser,
94 "c347b510-927a-4924-9da1-c76871623567")
95UUID_METADATA(
96 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::VideoFileChooser,
97 "7d5a68ae-501f-4038-bb24-4a7ffc049923")
98UUID_METADATA(
99 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::ProgramEdit,
100 "de15c0da-429b-49d3-bb07-7c41f5f205c8")
101
102UUID_METADATA(
103 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::Enum,
104 "8b1d76c4-3838-4ac0-9b9c-c12bc5db8e8a")
105
106UUID_METADATA(
107 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::ComboBox,
108 "485680cc-b8b9-4a01-acc7-3e8334bdc016")
109
110UUID_METADATA(
111 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::Button,
112 "feb87e84-e0d2-428f-96ff-a123ac964f59")
113
114UUID_METADATA(
115 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::ImpulseButton,
116 "7cd210d3-ebd1-4f71-9de6-cccfb639cbc3")
117
118UUID_METADATA(
119 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::HSVSlider,
120 "8f38638e-9f9f-48b0-ae36-1cba86ef5703")
121UUID_METADATA(
122 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::XYSlider,
123 "8093743c-584f-4bb9-97d4-6c7602f87116")
124UUID_METADATA(
125 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::XYZSlider,
126 "bae00244-cd93-4893-a4ad-71489adb3fa1")
127UUID_METADATA(
128 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::XYSpinboxes,
129 "0adbbdda-fda4-451e-91cc-1da731bde9d5")
130UUID_METADATA(
131 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::XYZSpinboxes,
132 "377e8205-b442-4d54-8832-3761def522b2")
133UUID_METADATA(
134 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::MultiSlider,
135 "25de6d71-1554-4fe1-bf3f-9cbf12bdadeb")
136
137UUID_METADATA(
138 SCORE_LIB_PROCESS_EXPORT, Process::Port, Process::Bargraph,
139 "f6d740ce-acc0-44c0-932a-0a03345af84f")
140
141namespace Process
142{
143struct SCORE_LIB_PROCESS_EXPORT FloatSlider : public Process::ControlInlet
144{
145 MODEL_METADATA_IMPL(FloatSlider)
146 FloatSlider(
147 float min, float max, float init, const QString& name, Id<Process::Port> id,
148 QObject* parent);
149 ~FloatSlider();
150
151 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
152 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
153 void setupExecution(ossia::inlet& inl) const noexcept override;
154 using Process::ControlInlet::ControlInlet;
155};
156
157struct SCORE_LIB_PROCESS_EXPORT FloatKnob : public Process::ControlInlet
158{
159 MODEL_METADATA_IMPL(FloatKnob)
160 FloatKnob(
161 float min, float max, float init, const QString& name, Id<Process::Port> id,
162 QObject* parent);
163 ~FloatKnob();
164
165 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
166 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
167 void setupExecution(ossia::inlet& inl) const noexcept override;
168
169 using Process::ControlInlet::ControlInlet;
170};
171
172struct SCORE_LIB_PROCESS_EXPORT LogFloatSlider : public Process::ControlInlet
173{
174 MODEL_METADATA_IMPL(LogFloatSlider)
175 LogFloatSlider(
176 float min, float max, float init, const QString& name, Id<Process::Port> id,
177 QObject* parent);
178 ~LogFloatSlider();
179
180 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
181 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
182 void setupExecution(ossia::inlet& inl) const noexcept override;
183
184 using Process::ControlInlet::ControlInlet;
185};
186
187struct SCORE_LIB_PROCESS_EXPORT IntSlider : public Process::ControlInlet
188{
189 MODEL_METADATA_IMPL(IntSlider)
190 IntSlider(
191 int min, int max, int init, const QString& name, Id<Process::Port> id,
192 QObject* parent);
193 ~IntSlider();
194
195 auto getMin() const noexcept { return domain().get().convert_min<int>(); }
196 auto getMax() const noexcept { return domain().get().convert_max<int>(); }
197 void setupExecution(ossia::inlet& inl) const noexcept override;
198
199 using Process::ControlInlet::ControlInlet;
200};
201
202struct SCORE_LIB_PROCESS_EXPORT IntRangeSlider : public Process::ControlInlet
203{
204 MODEL_METADATA_IMPL(IntRangeSlider)
205 IntRangeSlider(
206 int min, int max, ossia::vec2f init, const QString& name, Id<Process::Port> id,
207 QObject* parent);
208 ~IntRangeSlider();
209
210 auto getMin() const noexcept { return domain().get().convert_min<int>(); }
211 auto getMax() const noexcept { return domain().get().convert_max<int>(); }
212 auto getInit() const noexcept { return ossia::convert<ossia::vec2f>(this->init()); }
213 void setupExecution(ossia::inlet& inl) const noexcept override;
214
215 using Process::ControlInlet::ControlInlet;
216};
217
218struct SCORE_LIB_PROCESS_EXPORT FloatRangeSlider : public Process::ControlInlet
219{
220 MODEL_METADATA_IMPL(FloatRangeSlider)
221 FloatRangeSlider(
222 float min, float max, ossia::vec2f init, const QString& name, Id<Process::Port> id,
223 QObject* parent);
224 ~FloatRangeSlider();
225
226 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
227 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
228 auto getInit() const noexcept { return ossia::convert<ossia::vec2f>(this->init()); }
229 void setupExecution(ossia::inlet& inl) const noexcept override;
230
231 using Process::ControlInlet::ControlInlet;
232};
233
234struct SCORE_LIB_PROCESS_EXPORT IntRangeSpinBox : public Process::ControlInlet
235{
236 MODEL_METADATA_IMPL(IntRangeSpinBox)
237 IntRangeSpinBox(
238 int min, int max, ossia::vec2f init, const QString& name, Id<Process::Port> id,
239 QObject* parent);
240 ~IntRangeSpinBox();
241
242 auto getMin() const noexcept { return domain().get().convert_min<int>(); }
243 auto getMax() const noexcept { return domain().get().convert_max<int>(); }
244 auto getInit() const noexcept { return ossia::convert<ossia::vec2f>(this->init()); }
245 void setupExecution(ossia::inlet& inl) const noexcept override;
246
247 using Process::ControlInlet::ControlInlet;
248};
249
250struct SCORE_LIB_PROCESS_EXPORT FloatRangeSpinBox : public Process::ControlInlet
251{
252 MODEL_METADATA_IMPL(FloatRangeSpinBox)
253 FloatRangeSpinBox(
254 float min, float max, ossia::vec2f init, const QString& name, Id<Process::Port> id,
255 QObject* parent);
256 ~FloatRangeSpinBox();
257
258 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
259 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
260 auto getInit() const noexcept { return ossia::convert<ossia::vec2f>(this->init()); }
261 void setupExecution(ossia::inlet& inl) const noexcept override;
262
263 using Process::ControlInlet::ControlInlet;
264};
265
266struct SCORE_LIB_PROCESS_EXPORT IntSpinBox : public Process::ControlInlet
267{
268 MODEL_METADATA_IMPL(IntSpinBox)
269 IntSpinBox(
270 int min, int max, int init, const QString& name, Id<Process::Port> id,
271 QObject* parent);
272 ~IntSpinBox();
273
274 auto getMin() const noexcept { return domain().get().convert_min<int>(); }
275 auto getMax() const noexcept { return domain().get().convert_max<int>(); }
276 void setupExecution(ossia::inlet& inl) const noexcept override;
277
278 using Process::ControlInlet::ControlInlet;
279};
280
281struct SCORE_LIB_PROCESS_EXPORT FloatSpinBox : public Process::ControlInlet
282{
283 MODEL_METADATA_IMPL(FloatSpinBox)
284 FloatSpinBox(
285 float min, float max, float init, const QString& name, Id<Process::Port> id,
286 QObject* parent);
287 ~FloatSpinBox();
288
289 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
290 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
291 void setupExecution(ossia::inlet& inl) const noexcept override;
292
293 using Process::ControlInlet::ControlInlet;
294};
295struct SCORE_LIB_PROCESS_EXPORT TimeChooser : public Process::ControlInlet
296{
297 MODEL_METADATA_IMPL(TimeChooser)
298 TimeChooser(
299 float min, float max, float init, const QString& name, Id<Process::Port> id,
300 QObject* parent);
301 ~TimeChooser();
302
303 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
304 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
305 void setupExecution(ossia::inlet& inl) const noexcept override;
306 using Process::ControlInlet::ControlInlet;
307};
308
309struct SCORE_LIB_PROCESS_EXPORT Toggle : public Process::ControlInlet
310{
311 MODEL_METADATA_IMPL(Toggle)
312 Toggle(bool init, const QString& name, Id<Process::Port> id, QObject* parent);
313 ~Toggle();
314
315 void setupExecution(ossia::inlet& inl) const noexcept override;
316
317 using Process::ControlInlet::ControlInlet;
318};
319
320struct SCORE_LIB_PROCESS_EXPORT ChooserToggle : public Process::ControlInlet
321{
322 MODEL_METADATA_IMPL(ChooserToggle)
323 ChooserToggle(
324 QStringList alternatives, bool init, const QString& name, Id<Process::Port> id,
325 QObject* parent);
326 ~ChooserToggle();
327
328 QStringList alternatives() const noexcept;
329 void setupExecution(ossia::inlet& inl) const noexcept override;
330
331 using Process::ControlInlet::ControlInlet;
332};
333
334struct SCORE_LIB_PROCESS_EXPORT LineEdit : public Process::ControlInlet
335{
336 MODEL_METADATA_IMPL(LineEdit)
337 LineEdit(QString init, const QString& name, Id<Process::Port> id, QObject* parent);
338 ~LineEdit();
339
340 void setupExecution(ossia::inlet& inl) const noexcept override;
341
342 using Process::ControlInlet::ControlInlet;
343};
344
345struct SCORE_LIB_PROCESS_EXPORT FileChooserBase : public Process::ControlInlet
346{
347 W_OBJECT(FileChooserBase)
348public:
349 FileChooserBase(
350 QString init, QString filters, const QString& name, Id<Process::Port> id,
351 QObject* parent);
352 ~FileChooserBase();
353 using Process::ControlInlet::ControlInlet;
354
355 void setupExecution(ossia::inlet& inl) const noexcept override;
356 const QString& filters() const noexcept { return m_filters; };
357 void setFilters(QString nf) { m_filters = std::move(nf); }
358
359 void enableFileWatch();
360 void destroying() W_SIGNAL(destroying);
361
362private:
363 QString m_filters;
364};
365struct SCORE_LIB_PROCESS_EXPORT FileChooser : public FileChooserBase
366{
367 MODEL_METADATA_IMPL(FileChooser)
368 W_OBJECT(FileChooser)
369public:
370 FileChooser(
371 QString init, QString filters, const QString& name, Id<Process::Port> id,
372 QObject* parent);
373 ~FileChooser();
374 using Process::FileChooserBase::FileChooserBase;
375};
376
377struct SCORE_LIB_PROCESS_EXPORT AudioFileChooser : public FileChooserBase
378{
379 MODEL_METADATA_IMPL(AudioFileChooser)
380 W_OBJECT(AudioFileChooser)
381public:
382 AudioFileChooser(
383 QString init, QString filters, const QString& name, Id<Process::Port> id,
384 QObject* parent);
385 ~AudioFileChooser();
386 using Process::FileChooserBase::FileChooserBase;
387};
388
389struct SCORE_LIB_PROCESS_EXPORT VideoFileChooser : public FileChooserBase
390{
391 MODEL_METADATA_IMPL(VideoFileChooser)
392 W_OBJECT(VideoFileChooser)
393public:
394 VideoFileChooser(
395 QString init, QString filters, const QString& name, Id<Process::Port> id,
396 QObject* parent);
397 ~VideoFileChooser();
398 using Process::FileChooserBase::FileChooserBase;
399};
400
401struct SCORE_LIB_PROCESS_EXPORT ProgramEdit : public Process::ControlInlet
402{
403 MODEL_METADATA_IMPL(ProgramEdit)
404 ProgramEdit(QString init, const QString& name, Id<Process::Port> id, QObject* parent);
405 ~ProgramEdit();
406
407 std::string language;
408
409 void setupExecution(ossia::inlet& inl) const noexcept override;
410
411 using Process::ControlInlet::ControlInlet;
412};
413
414struct SCORE_LIB_PROCESS_EXPORT ComboBox : public Process::ControlInlet
415{
416 MODEL_METADATA_IMPL(ComboBox)
417 std::vector<std::pair<QString, ossia::value>> alternatives;
418 ComboBox(
419 std::vector<std::pair<QString, ossia::value>> values, ossia::value init,
420 const QString& name, Id<Process::Port> id, QObject* parent);
421 ~ComboBox();
422
423 const auto& getValues() const noexcept { return alternatives; }
424 auto count() const noexcept { return alternatives.size(); }
425
426 ComboBox(DataStream::Deserializer& vis, QObject* parent);
427 ComboBox(JSONObject::Deserializer& vis, QObject* parent);
428 ComboBox(DataStream::Deserializer&& vis, QObject* parent);
429 ComboBox(JSONObject::Deserializer&& vis, QObject* parent);
430
431 void setupExecution(ossia::inlet& inl) const noexcept override;
432};
433
434struct SCORE_LIB_PROCESS_EXPORT Enum : public Process::ControlInlet
435{
436 MODEL_METADATA_IMPL(Enum)
437 std::vector<QString> values;
438 std::vector<QString> pixmaps;
439 Enum(
440 const std::vector<std::string>& dom, std::vector<QString> pixmaps,
441 std::string init, const QString& name, Id<Process::Port> id, QObject* parent);
442
443 Enum(
444 const QStringList& values, std::vector<QString> pixmaps, std::string init,
445 const QString& name, Id<Process::Port> id, QObject* parent);
446 ~Enum();
447
448 const std::vector<QString>& getValues() const { return values; }
449
450 Enum(DataStream::Deserializer& vis, QObject* parent);
451 Enum(JSONObject::Deserializer& vis, QObject* parent);
452 Enum(DataStream::Deserializer&& vis, QObject* parent);
453 Enum(JSONObject::Deserializer&& vis, QObject* parent);
454
455 void setupExecution(ossia::inlet& inl) const noexcept override;
456};
457
458struct SCORE_LIB_PROCESS_EXPORT Button : public Process::ControlInlet
459{
460 MODEL_METADATA_IMPL(Button)
461 Button(const QString& name, Id<Process::Port> id, QObject* parent);
462 ~Button();
463
464 void setupExecution(ossia::inlet& inl) const noexcept override;
465
466 using Process::ControlInlet::ControlInlet;
467};
468
469struct SCORE_LIB_PROCESS_EXPORT ImpulseButton : public Process::ControlInlet
470{
471 MODEL_METADATA_IMPL(ImpulseButton)
472 W_OBJECT(ImpulseButton)
473public:
474 ImpulseButton(const QString& name, Id<Process::Port> id, QObject* parent);
475 ~ImpulseButton();
476
477 void setupExecution(ossia::inlet& inl) const noexcept override;
478
479 using Process::ControlInlet::ControlInlet;
480};
481
482struct SCORE_LIB_PROCESS_EXPORT HSVSlider : public Process::ControlInlet
483{
484 MODEL_METADATA_IMPL(HSVSlider)
485 HSVSlider(
486 ossia::vec4f init, const QString& name, Id<Process::Port> id, QObject* parent);
487 ~HSVSlider();
488
489 void setupExecution(ossia::inlet&) const noexcept override;
490 auto getMin() const noexcept { return ossia::vec4f{0., 0., 0., 0.}; }
491 auto getMax() const noexcept { return ossia::vec4f{1., 1., 1., 1.}; }
492 using Process::ControlInlet::ControlInlet;
493};
494
495struct SCORE_LIB_PROCESS_EXPORT XYSlider : public Process::ControlInlet
496{
497 MODEL_METADATA_IMPL(XYSlider)
498 XYSlider(
499 ossia::vec2f init, const QString& name, Id<Process::Port> id, QObject* parent);
500 XYSlider(
501 ossia::vec2f min, ossia::vec2f max, ossia::vec2f init, const QString& name,
502 Id<Process::Port> id, QObject* parent);
503 ~XYSlider();
504
505 auto getMin() const noexcept { return domain().get().convert_min<ossia::vec2f>(); }
506 auto getMax() const noexcept { return domain().get().convert_max<ossia::vec2f>(); }
507 void setupExecution(ossia::inlet& inl) const noexcept override;
508
509 using Process::ControlInlet::ControlInlet;
510};
511
512struct SCORE_LIB_PROCESS_EXPORT XYZSlider : public Process::ControlInlet
513{
514 MODEL_METADATA_IMPL(XYZSlider)
515 XYZSlider(
516 ossia::vec3f init, const QString& name, Id<Process::Port> id, QObject* parent);
517 XYZSlider(
518 ossia::vec3f min, ossia::vec3f max, ossia::vec3f init, const QString& name,
519 Id<Process::Port> id, QObject* parent);
520 ~XYZSlider();
521
522 auto getMin() const noexcept { return domain().get().convert_min<ossia::vec3f>(); }
523 auto getMax() const noexcept { return domain().get().convert_max<ossia::vec3f>(); }
524 void setupExecution(ossia::inlet& inl) const noexcept override;
525
526 using Process::ControlInlet::ControlInlet;
527};
528
529struct SCORE_LIB_PROCESS_EXPORT XYSpinboxes : public Process::ControlInlet
530{
531 MODEL_METADATA_IMPL(XYSpinboxes)
532 XYSpinboxes(
533 ossia::vec2f init, const QString& name, Id<Process::Port> id, QObject* parent);
534 XYSpinboxes(
535 ossia::vec2f min, ossia::vec2f max, ossia::vec2f init, bool integral,
536 const QString& name, Id<Process::Port> id, QObject* parent);
537 ~XYSpinboxes();
538
539 auto getMin() const noexcept { return domain().get().convert_min<ossia::vec2f>(); }
540 auto getMax() const noexcept { return domain().get().convert_max<ossia::vec2f>(); }
541 void setupExecution(ossia::inlet& inl) const noexcept override;
542
543 using Process::ControlInlet::ControlInlet;
544
545 const bool integral{};
546};
547
548struct SCORE_LIB_PROCESS_EXPORT XYZSpinboxes : public Process::ControlInlet
549{
550 MODEL_METADATA_IMPL(XYZSpinboxes)
551 XYZSpinboxes(
552 ossia::vec3f init, const QString& name, Id<Process::Port> id, QObject* parent);
553 XYZSpinboxes(
554 ossia::vec3f min, ossia::vec3f max, ossia::vec3f init, const QString& name,
555 Id<Process::Port> id, QObject* parent);
556 ~XYZSpinboxes();
557
558 auto getMin() const noexcept { return domain().get().convert_min<ossia::vec3f>(); }
559 auto getMax() const noexcept { return domain().get().convert_max<ossia::vec3f>(); }
560 void setupExecution(ossia::inlet& inl) const noexcept override;
561
562 using Process::ControlInlet::ControlInlet;
563};
564
565struct SCORE_LIB_PROCESS_EXPORT MultiSlider : public Process::ControlInlet
566{
567 MODEL_METADATA_IMPL(MultiSlider)
568 MultiSlider(
569 ossia::value init, const QString& name, Id<Process::Port> id, QObject* parent);
570 ~MultiSlider();
571
572 ossia::value getMin() const noexcept;
573 ossia::value getMax() const noexcept;
574 void setupExecution(ossia::inlet& inl) const noexcept override;
575
576 using Process::ControlInlet::ControlInlet;
577};
578
579// Outlets
580
581struct SCORE_LIB_PROCESS_EXPORT Bargraph : public Process::ControlOutlet
582{
583 MODEL_METADATA_IMPL(Bargraph)
584 Bargraph(
585 float min, float max, float init, const QString& name, Id<Process::Port> id,
586 QObject* parent);
587 ~Bargraph();
588
589 auto getMin() const noexcept { return domain().get().convert_min<float>(); }
590 auto getMax() const noexcept { return domain().get().convert_max<float>(); }
591
592 using Process::ControlOutlet::ControlOutlet;
593};
594
595} // namespace Process
Definition DataStreamVisitor.hpp:202
Definition JSONVisitor.hpp:423
Definition Port.hpp:203
Definition Port.hpp:102
The id_base_t class.
Definition Identifier.hpp:57
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324