drumstick 2.9.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 90 of file backendmanager.cpp.

References BackendManager::refresh().

◆ ~BackendManager()

~BackendManager ( )
virtual

~BackendManager destructor

Destructor.

Definition at line 102 of file backendmanager.cpp.

Member Function Documentation

◆ availableInputs()

QList< MIDIInput * > availableInputs ( )

availableInputs

Returns
list of available MIDI inputs
Examples
vpiano.cpp.

Definition at line 247 of file backendmanager.cpp.

◆ availableOutputs()

QList< MIDIOutput * > availableOutputs ( )

availableOutputs

Returns
list of available MIDI outputs
Examples
vpiano.cpp.

Definition at line 252 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 109 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
Examples
vpiano.cpp.

Definition at line 277 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
Examples
vpiano.cpp.

Definition at line 294 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 257 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 267 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 174 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
Examples
vpiano.cpp.

Definition at line 156 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: