![]() |
HulaLoop
Simple cross-platform audio loopback and recording.
|
Class for communicating between QML and C++. More...
#include <QMLBridge.h>


Signals | |
| void | stateChanged () |
| Signal emmitted when the Transport changes states. More... | |
| void | languageChanged () |
| Signal emmitted when the language changes. | |
| void | visData (const std::vector< qreal > &rawData, const std::vector< qreal > &dataIn) |
| Signal emitted when the visualizer needs to update. | |
| void | discarded () |
| Signal emmitted when the Transport successfully discards. | |
Public Member Functions | |
| QMLBridge (QObject *parent=nullptr) | |
| Construct a new instance of the QMLBridge class. More... | |
| virtual | ~QMLBridge () |
| Destructor for QMLBridge. | |
| Q_INVOKABLE void | saveSettings () |
| Saves all settings into a JSON settings file. | |
| void | loadSettings () |
| Loads all settings stored in the JSON settings file. | |
| QString | getVisualizerType () |
| Return the current visualizer type. More... | |
| void | setVisualizerType (const QString &) |
| Sets the current visualizer type. 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 void | setShowRecordDevices (bool) |
| Modifies settings to display record devices. More... | |
| Q_INVOKABLE bool | getShowRecordDevices () |
| Returns the setting value for showing record devices. More... | |
| Q_INVOKABLE bool | loadLanguage (const QString &) |
| Modifies settings to load the specified language. More... | |
| Q_INVOKABLE QString | getSelectedLanguage () |
| Returns the setting value for showing record devices. More... | |
| Q_INVOKABLE QString | getTransportState () const |
| Return the current state of the Transport instance as a QString. More... | |
| Q_INVOKABLE bool | record () |
| Trigger record in the Transport and update the UI state via signal. | |
| Q_INVOKABLE bool | stop () |
| Trigger stop in the Transport and update the UI state via signal. | |
| Q_INVOKABLE bool | play () |
| Trigger playback in the Transport and update the UI state via signal. | |
| Q_INVOKABLE bool | pause () |
| Trigger pause in the Transport and update the UI state via signal. | |
| Q_INVOKABLE void | discard () |
| Deletes all the temp files that the program has created. | |
| QString | getEmptyStr () |
| Return an empty QString to force QML to update when a new language is loaded. More... | |
| Q_INVOKABLE void | saveFile (QString dir) |
| Get the directory the user wants to save to. More... | |
| Q_INVOKABLE void | cleanTempFiles () |
| Deletes all the temp files that the program has created. | |
| Q_INVOKABLE bool | wannaClose () |
| Get if the user has unsaved files. More... | |
| void | startVisThread () |
| Start the thread that reads the ring buffer and updates the visualizer. | |
| void | stopVisThread () |
| Stop the thread that updates the visualizer. | |
| Q_INVOKABLE void | launchUpdateProcess () |
| Launch the updater process. | |
Static Public Member Functions | |
| static void | updateVisualizer (QMLBridge *_this) |
| Perform FFT and update the visualizer. | |
| static void | reverseBits (size_t x, int n) |
Properties | |
| QString | emptyStr |
| QString | visType |
Class for communicating between QML and C++.
This is designed to be added as a QML type and used in QML.
|
explicit |
| QString QMLBridge::getEmptyStr | ( | ) |
Return an empty QString to force QML to update when a new language is loaded.
| QString QMLBridge::getInputDevices | ( | ) |
Get the current input devices.
| QString QMLBridge::getOutputDevices | ( | ) |
Get the current output devices.
| QString QMLBridge::getSelectedLanguage | ( | ) |
Returns the setting value for showing record devices.
| bool QMLBridge::getShowRecordDevices | ( | ) |
Returns the setting value for showing record devices.
| QString QMLBridge::getTransportState | ( | ) | const |
| QString QMLBridge::getVisualizerType | ( | ) |
Return the current visualizer type.
| bool QMLBridge::loadLanguage | ( | const QString & | id | ) |
Modifies settings to load the specified language.
| void QMLBridge::saveFile | ( | QString | dir | ) |
Get the directory the user wants to save to.
| QString | containing the directory |
| void QMLBridge::setShowRecordDevices | ( | bool | val | ) |
Modifies settings to display record devices.
| bool | - True to show record devices, false otherwise |
| void QMLBridge::setVisualizerType | ( | const QString & | type | ) |
Sets the current visualizer type.
| QString | - The name of the visualizer |
|
signal |
Signal emmitted when the Transport changes states.
Keeps the UI's state machine on the same page.
| bool QMLBridge::wannaClose | ( | ) |
Get if the user has unsaved files.
1.8.11