HulaLoop
Simple cross-platform audio loopback and recording.
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hula::HulaSettings Class Reference

Singleton class containing all settings for the application. More...

#include <HulaSettings.h>

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

Public Member Functions

void setOutputFileEncoding (Encoding)
 Set the output encoding for the current global configuration. More...
 
Encoding getOutputFileEncoding ()
 Get the output encoding for the current global configuration. More...
 
QTranslator * getTranslator ()
 Fetch a pointer to the translation object setup for Qt. More...
 
bool loadLanguage (QCoreApplication *app, const std::string &id)
 Remove and delete the current translator, replacing it with a new translator of the specified language. More...
 
 ~HulaSettings ()
 Destructor for HulaSettings.
 
- Public Member Functions inherited from hula::HulaAudioSettings
bool getShowRecordDevices ()
 Getters. More...
 
int getNumberOfChannels ()
 Get the number of channels for the current global device configuration. More...
 
int getSampleRate ()
 Get the number of channels for the current global device configuration. More...
 
int getSampleSize ()
 Get the sample size for the current global device configuration. More...
 
void setShowRecordDevices (bool)
 Setters. More...
 
void setNumberOfChannels (int)
 Set the number of channels for the current global device configuration. More...
 
void setSampleRate (int)
 Set the number of channels for the current global device configuration. More...
 
void setSampleSize (int)
 Set the sample size for the current global device configuration. More...
 
 ~HulaAudioSettings ()
 Destructor for HulaAudioSettings.
 

Static Public Member Functions

static HulaSettingsgetInstance ()
 Retreive the singular instance of HulaSettings or construct a new one if none exists. More...
 
- Static Public Member Functions inherited from hula::HulaAudioSettings
static HulaAudioSettingsgetInstance ()
 Retreive the singular instance of HulaSettings or construct a new one if none exists. More...
 

Protected Member Functions

 HulaSettings ()
 Private constructor to enforce singleton pattern. More...
 
- Protected Member Functions inherited from hula::HulaAudioSettings
 HulaAudioSettings ()
 Private constructor to enforce the singleton pattern. More...
 

Protected Attributes

QTranslator * trans
 

Detailed Description

Singleton class containing all settings for the application.

This includes audio specific settings.

Constructor & Destructor Documentation

◆ HulaSettings()

HulaSettings::HulaSettings ( )
protected

Private constructor to enforce singleton pattern.

Initializes all settings to default values.

Member Function Documentation

◆ getInstance()

HulaSettings * HulaSettings::getInstance ( )
static

Retreive the singular instance of HulaSettings or construct a new one if none exists.

Returns
Pointer to the HulaSettings instance.

◆ getOutputFileEncoding()

Encoding HulaSettings::getOutputFileEncoding ( )

Get the output encoding for the current global configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Returns
Encoding enum value indicating current encoding type

◆ getTranslator()

QTranslator * HulaSettings::getTranslator ( )

Fetch a pointer to the translation object setup for Qt.

This translator can be loaded with different languages at runtime to suit the needs of the user.

Returns
QTranslator * Translator object with locale loaded.

◆ loadLanguage()

bool HulaSettings::loadLanguage ( QCoreApplication *  app,
const std::string &  id 
)

Remove and delete the current translator, replacing it with a new translator of the specified language.

id should be formated as

lang_country
Parameters
appReference to the targeted application.
idLanguage code and country code of targeted file.

◆ setOutputFileEncoding()

void HulaSettings::setOutputFileEncoding ( Encoding  val)

Set the output encoding for the current global configuration.

This is the configuration that buffers and output files have been setup for. Changing it mid-anything may break stuff.

Parameters
valEncoding enum value indicating current encoding type

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