drumstick 2.10.0
C++ MIDI libraries using Qt objects, idioms, and style.
BackendManager Class Reference

The BackendManager class manages lists of dynamic and static backends for applications based on drumstick-rt. More...

#include <backendmanager.h>

Public Member Functions

 BackendManager ()
 BackendManager constructor. More...
 
virtual ~BackendManager ()
 ~BackendManager destructor More...
 
void refresh (QSettings *settings=nullptr)
 refresh the list of backends More...
 
void refresh (const QVariantMap &map)
 refresh the list of backends More...
 
QList< MIDIInput * > availableInputs ()
 availableInputs More...
 
QList< MIDIOutput * > availableOutputs ()
 availableOutputs More...
 
QStringList defaultPaths ()
 defaultPaths More...
 
MIDIInputinputBackendByName (const QString name)
 inputBackendByName More...
 
MIDIOutputoutputBackendByName (const QString name)
 outputBackendByName More...
 
MIDIInputfindInput (QString name)
 findInput returns the backend corresponding to the provided name, or a suitable input instead. More...
 
MIDIOutputfindOutput (QString name)
 findOutput returns the backend corresponding to the provided name, or a suitable output instead. More...
 

Detailed Description

The BackendManager class manages lists of dynamic and static backends for applications based on drumstick-rt.

Examples
vpiano.cpp.

Definition at line 59 of file backendmanager.h.

Constructor & Destructor Documentation

◆ BackendManager()

BackendManager ( )
explicit

BackendManager constructor.

Constructor.

Definition at line 112 of file backendmanager.cpp.

References BackendManager::refresh().

◆ ~BackendManager()

~BackendManager ( )
virtual

~BackendManager destructor

Destructor.

Definition at line 126 of file backendmanager.cpp.

Member Function Documentation

◆ availableInputs()

QList< MIDIInput * > availableInputs ( )

availableInputs

Returns
list of available MIDI inputs

Definition at line 277 of file backendmanager.cpp.

◆ availableOutputs()

QList< MIDIOutput * > availableOutputs ( )

availableOutputs

Returns
list of available MIDI outputs

Definition at line 282 of file backendmanager.cpp.

◆ defaultPaths()

QStringList defaultPaths ( )

defaultPaths

returns the paths where backends are searched

Returns
list of paths for backends search
list of paths

Definition at line 135 of file backendmanager.cpp.

Referenced by BackendManager::refresh().

◆ findInput()

MIDIInput * findInput ( QString  name)

findInput returns the backend corresponding to the provided name, or a suitable input instead.

Parameters
nameThe name of some input backend
Returns
Input backend instance if available

Definition at line 307 of file backendmanager.cpp.

References MIDIInput::backendName().

◆ findOutput()

MIDIOutput * findOutput ( QString  name)

findOutput returns the backend corresponding to the provided name, or a suitable output instead.

Parameters
nameThe name of some output backend
Returns
Output backend instance if available

Definition at line 324 of file backendmanager.cpp.

References MIDIOutput::backendName().

◆ inputBackendByName()

MIDIInput * inputBackendByName ( const QString  name)

inputBackendByName

Parameters
nameThe name of some input backend
Returns
Input backend instance if available

Definition at line 287 of file backendmanager.cpp.

References MIDIInput::backendName().

Referenced by drumstick::widgets::configureInputDriver(), and drumstick::widgets::inputDriverIsConfigurable().

◆ outputBackendByName()

MIDIOutput * outputBackendByName ( const QString  name)

outputBackendByName

Parameters
nameThe name of some output backend
Returns
Output backend instance if available

Definition at line 297 of file backendmanager.cpp.

References MIDIOutput::backendName().

Referenced by drumstick::widgets::configureOutputDriver(), and drumstick::widgets::outputDriverIsConfigurable().

◆ refresh() [1/2]

void refresh ( const QVariantMap &  map)

refresh the list of backends

BackendManager::refresh finds the installed backends searching the list of paths provided by the function defaultPaths() applying the provided settings map as well.

Parameters
mapProgram settings relevant section

Definition at line 201 of file backendmanager.cpp.

References BackendManager::defaultPaths(), MIDIInput::setExcludedConnections(), MIDIOutput::setExcludedConnections(), MIDIInput::setPublicName(), and MIDIOutput::setPublicName().

◆ refresh() [2/2]

void refresh ( QSettings settings = nullptr)

refresh the list of backends

BackendManager::refresh finds the installed backends applying the provided settings.

Parameters
settingsProgram settings

Definition at line 182 of file backendmanager.cpp.

References BackendManager::refresh().

Referenced by BackendManager::BackendManager(), and BackendManager::refresh().


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