HulaLoop
Simple cross-platform audio loopback and recording.
qmlbridge.h
1 #ifndef QMLBRIDGE_H
2 #define QMLBRIDGE_H
3 
4 #include <QObject>
5 #include <QString>
6 
7 #include "../control/transport.h"
8 
13 class QMLBridge : public QObject
14 {
15  Q_OBJECT
16 
17  private:
18  Transport *transport;
19 
20  public:
21  explicit QMLBridge(QObject *parent = nullptr);
22 
23  Q_INVOKABLE QString getTransportState() const;
24  Q_INVOKABLE void record();
25  Q_INVOKABLE void stop();
26  Q_INVOKABLE void play();
27  Q_INVOKABLE void pause();
28 
29  signals:
30 
35  void stateChanged();
36 };
37 
38 #endif // QMLBRIDGE_H
Q_INVOKABLE void pause()
Trigger pause in the Transport and update the UI state via signal.
Definition: qmlbridge.cpp:55
Utility class for managing state of application and all audio related processes.
Definition: transport.h:19
Q_INVOKABLE void record()
Trigger record in the Transport and update the UI state via signal.
Definition: qmlbridge.cpp:28
Q_INVOKABLE QString getTransportState() const
Return the current state of the Transport instance as a QString.
Definition: qmlbridge.cpp:20
Class for communicating between QML and C++.
Definition: qmlbridge.h:13
QMLBridge(QObject *parent=nullptr)
Construct a new instance of the QMLBridge class.
Definition: qmlbridge.cpp:10
void stateChanged()
Signal emmitted when the Transport changes states.
Q_INVOKABLE void stop()
Trigger stop in the Transport and update the UI state via signal.
Definition: qmlbridge.cpp:37
Q_INVOKABLE void play()
Trigger playback in the Transport and update the UI state via signal.
Definition: qmlbridge.cpp:46