Loading...
Searching...
No Matches
TransportInterface.hpp
1#pragma once
2#include <score/plugins/Interface.hpp>
3#include <score/plugins/InterfaceList.hpp>
4
5#include <ossia/dataflow/transport.hpp>
6
7#include <ossia-qt/time_value.hpp>
8
9#include <QObject>
10
11#include <score_plugin_transport_export.h>
12
13#include <verdigris>
14namespace Transport
15{
16
17class SCORE_PLUGIN_TRANSPORT_EXPORT TransportInterface
18 : public QObject
20{
21 W_OBJECT(TransportInterface)
22 SCORE_INTERFACE(TransportInterface, "2f5845f1-548e-4729-86b7-4ae919b8e7e3")
23
24public:
25 explicit TransportInterface();
26 virtual ~TransportInterface();
27
28 virtual ossia::transport_info_fun transportUpdateFunction() = 0;
29
30 virtual void setup() = 0;
31 virtual void teardown() = 0;
32
33 virtual void requestPlay() = 0;
34 virtual void requestPause() = 0;
35 virtual void requestStop() = 0;
36 virtual void requestTransport(ossia::time_value t) = 0;
37
38 // More precise than basic transport but otherwise the same thing.
39 virtual void requestBeginScrub(ossia::time_value t);
40 virtual void requestScrub(ossia::time_value t);
41 virtual void requestEndScrub(ossia::time_value t);
42
43 void play() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, play)
44 void pause() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, pause)
45 void stop() E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, stop)
46 void transport(ossia::time_value t)
47 E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, transport, t)
48
49 void beginScrub(ossia::time_value t)
50 E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, beginScrub, t)
51 void scrub(ossia::time_value t) E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, scrub, t)
52 void endScrub(ossia::time_value t) E_SIGNAL(SCORE_PLUGIN_TRANSPORT_EXPORT, endScrub, t)
53};
54
55class SCORE_PLUGIN_TRANSPORT_EXPORT TransportInterfaceList final
56 : public score::InterfaceList<TransportInterface>
57{
58};
59
61{
62 SCORE_CONCRETE("73453569-b453-4cad-b12b-4b71c61cf9a7")
63
64public:
67
68 ossia::transport_info_fun transportUpdateFunction() override;
69
70 void setup() override;
71 void teardown() override;
72
73 void requestPlay() override;
74 void requestPause() override;
75 void requestStop() override;
76 void requestTransport(ossia::time_value t) override;
77 void requestBeginScrub(ossia::time_value t) override;
78 void requestScrub(ossia::time_value t) override;
79 void requestEndScrub(ossia::time_value t) override;
80};
81}
Definition TransportInterface.hpp:61
Definition TransportInterface.hpp:20
Definition TransportInterface.hpp:57
Base class for plug-in interfaces.
Definition Interface.hpp:52
InterfaceList Default implementation of InterfaceListBase.
Definition InterfaceList.hpp:97