HulaLoop
Simple cross-platform audio loopback and recording.
Signals | Public Member Functions | List of all members
hula::QMLBridge Class Reference

Class for communicating between QML and C++. More...

#include <QMLBridge.h>

Inheritance diagram for hula::QMLBridge:
Inheritance graph
[legend]
Collaboration diagram for hula::QMLBridge:
Collaboration graph
[legend]

Signals

void stateChanged ()
 Signal emmitted when the Transport changes states. More...
 

Public Member Functions

 QMLBridge (QObject *parent=nullptr)
 Construct a new instance of the QMLBridge class. More...
 
Q_INVOKABLE void setActiveInputDevice (QString QDeviceName)
 Match a string that the user chose to the input device list and notify the backend.
 
Q_INVOKABLE void setActiveOutputDevice (QString QDeviceName)
 Match a string that the user chose to the output device list and notify the backend.
 
Q_INVOKABLE QString getInputDevices ()
 Get the current input devices. More...
 
Q_INVOKABLE QString getOutputDevices ()
 Get the current output devices. More...
 
Q_INVOKABLE QString getTransportState () const
 Return the current state of the Transport instance as a QString. More...
 
Q_INVOKABLE void record ()
 Trigger record in the Transport and update the UI state via signal.
 
Q_INVOKABLE void stop ()
 Trigger stop in the Transport and update the UI state via signal.
 
Q_INVOKABLE void play ()
 Trigger playback in the Transport and update the UI state via signal.
 
Q_INVOKABLE void pause ()
 Trigger pause in the Transport and update the UI state via signal.
 
Q_INVOKABLE void saveFile (QString dir)
 Get the directory the user wants to save to. More...
 
Q_INVOKABLE void launchUpdateProcess ()
 Launch the updater process.
 

Detailed Description

Class for communicating between QML and C++.

This is designed to be added as a QML type and used in QML.

Constructor & Destructor Documentation

QMLBridge::QMLBridge ( QObject *  parent = nullptr)
explicit

Construct a new instance of the QMLBridge class.

Parameters
parentObject which QMLBridge should be child of.

Member Function Documentation

QString QMLBridge::getInputDevices ( )

Get the current input devices.

Returns
QString containing current input devices
QString QMLBridge::getOutputDevices ( )

Get the current output devices.

Returns
QString containing current output devices
QString QMLBridge::getTransportState ( ) const

Return the current state of the Transport instance as a QString.

Returns
state State of Transport instance
void QMLBridge::saveFile ( QString  dir)

Get the directory the user wants to save to.

Parameters
QStringcontaining the directory
Returns
String containing the directory
void hula::QMLBridge::stateChanged ( )
signal

Signal emmitted when the Transport changes states.

Keeps the UI's state machine on the same page.


The documentation for this class was generated from the following files: