Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Settings Class Reference

The Settings class. More...

#include <settings.h>

+ Inheritance diagram for Settings:

Public Member Functions

 Settings ()
 Constructor. More...
 
 ~Settings ()
 Empty destructor. More...
 
const std::string & getLanguageId () const
 Get the language id (en, de, fr,-...) More...
 
virtual void setLanguageId (const std::string &id)
 Set the language id (en, de, fr,-...) More...
 
virtual std::string getUserLanguageId () const
 Settings::getUserLanguageId. More...
 
const std::string & getLastUsedAlgorithm () const
 Get the name of the last used algorithm. More...
 
virtual void setLastUsedAlgorithm (const std::string &name)
 Set the name of the last used algorithm. More...
 
SoundGenerator::SoundGeneratorMode getSoundGeneratorMode () const
 Get the last operation mode of the sound generator. More...
 
virtual void setSoundGeneratorMode (SoundGenerator::SoundGeneratorMode mode)
 Set the last operation mode of the sound generator. More...
 
bool isSoundGeneratorVolumeDynamic () const
 Get flag for dynamic volume adaption in the tuning mode. More...
 
virtual void setSoundGeneratorVolumeDynamic (bool dynamic)
 Set flag for dynamic volume adaption in the tuning mode. More...
 
bool isAutomaticKeySelectionDisabled () const
 Get flag disabling automatic selection of the key during tuning. More...
 
virtual void setDisableAutomaticKeySelection (bool disable)
 Set flag disabling automatic selection of the key during tuning. More...
 
bool isStroboscopeActive () const
 Get flag indicating the stroboscopic mode of the tuning indicator. More...
 
virtual void setStroboscopeMode (bool enable)
 Set flag indicating the stroboscopic mode of the tuning indicator. More...
 

Static Public Member Functions

static SettingsgetSingleton ()
 Get a pointer to the singleton instance. More...
 

Protected Attributes

std::string mLanguageId
 Language Id. More...
 
std::string mLastUsedAlgorithm
 The algorithm that has been used last time. More...
 
SoundGenerator::SoundGeneratorMode mSoundGeneratorMode
 The sound generator mode (sine or synthesizer) More...
 
bool mSoundGeneratorVolumeDynamic
 Flag for automatic volume adjustment. More...
 
bool mDisableAutomaticKeySelection
 Flag suppressing automatic key selection. More...
 
bool mStroboscopeActive
 Flag indicating stroboscopic tuning indicator mode. More...
 

Static Private Attributes

static std::unique_ptr< SettingsmSingleton
 Singleton pointer. More...
 

Detailed Description

The Settings class.

This class holds and manages the piano-independent settings of the application.

This class is a singleton class (one global instance)

Definition at line 41 of file settings.h.

Constructor & Destructor Documentation

Settings::Settings ( )

Constructor.

Definition at line 31 of file settings.cpp.

Settings::~Settings ( )
inline

Empty destructor.

Definition at line 45 of file settings.h.

Member Function Documentation

const std::string& Settings::getLanguageId ( ) const
inline

Get the language id (en, de, fr,-...)

Definition at line 50 of file settings.h.

const std::string& Settings::getLastUsedAlgorithm ( ) const
inline

Get the name of the last used algorithm.

Definition at line 57 of file settings.h.

Settings & Settings::getSingleton ( )
static

Get a pointer to the singleton instance.

Returns
Pointer to singleton

Definition at line 46 of file settings.cpp.

SoundGenerator::SoundGeneratorMode Settings::getSoundGeneratorMode ( ) const
inline

Get the last operation mode of the sound generator.

Definition at line 62 of file settings.h.

std::string Settings::getUserLanguageId ( ) const
virtual

Settings::getUserLanguageId.

Returns
String containing the language id

Reimplemented in SettingsForQt.

Definition at line 62 of file settings.cpp.

bool Settings::isAutomaticKeySelectionDisabled ( ) const
inline

Get flag disabling automatic selection of the key during tuning.

Definition at line 72 of file settings.h.

bool Settings::isSoundGeneratorVolumeDynamic ( ) const
inline

Get flag for dynamic volume adaption in the tuning mode.

Definition at line 67 of file settings.h.

bool Settings::isStroboscopeActive ( ) const
inline

Get flag indicating the stroboscopic mode of the tuning indicator.

Definition at line 77 of file settings.h.

virtual void Settings::setDisableAutomaticKeySelection ( bool  disable)
inlinevirtual

Set flag disabling automatic selection of the key during tuning.

Reimplemented in SettingsForQt.

Definition at line 74 of file settings.h.

virtual void Settings::setLanguageId ( const std::string &  id)
inlinevirtual

Set the language id (en, de, fr,-...)

Reimplemented in SettingsForQt.

Definition at line 52 of file settings.h.

virtual void Settings::setLastUsedAlgorithm ( const std::string &  name)
inlinevirtual

Set the name of the last used algorithm.

Reimplemented in SettingsForQt.

Definition at line 59 of file settings.h.

virtual void Settings::setSoundGeneratorMode ( SoundGenerator::SoundGeneratorMode  mode)
inlinevirtual

Set the last operation mode of the sound generator.

Reimplemented in SettingsForQt.

Definition at line 64 of file settings.h.

virtual void Settings::setSoundGeneratorVolumeDynamic ( bool  dynamic)
inlinevirtual

Set flag for dynamic volume adaption in the tuning mode.

Reimplemented in SettingsForQt.

Definition at line 69 of file settings.h.

virtual void Settings::setStroboscopeMode ( bool  enable)
inlinevirtual

Set flag indicating the stroboscopic mode of the tuning indicator.

Reimplemented in SettingsForQt.

Definition at line 79 of file settings.h.

Member Data Documentation

bool Settings::mDisableAutomaticKeySelection
protected

Flag suppressing automatic key selection.

Definition at line 93 of file settings.h.

std::string Settings::mLanguageId
protected

Language Id.

This member variable holds the language shortcut (en, de, fr, ...). If empty the default system language will be used.

Definition at line 88 of file settings.h.

std::string Settings::mLastUsedAlgorithm
protected

The algorithm that has been used last time.

Definition at line 90 of file settings.h.

std::unique_ptr< Settings > Settings::mSingleton
staticprivate

Singleton pointer.

Definition at line 97 of file settings.h.

SoundGenerator::SoundGeneratorMode Settings::mSoundGeneratorMode
protected

The sound generator mode (sine or synthesizer)

Definition at line 91 of file settings.h.

bool Settings::mSoundGeneratorVolumeDynamic
protected

Flag for automatic volume adjustment.

Definition at line 92 of file settings.h.

bool Settings::mStroboscopeActive
protected

Flag indicating stroboscopic tuning indicator mode.

Definition at line 94 of file settings.h.


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