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
SettingsForQt Class Reference

Qt specific settings. More...

#include <settingsforqt.h>

+ Inheritance diagram for SettingsForQt:
+ Collaboration diagram for SettingsForQt:

Public Member Functions

 SettingsForQt ()
 Empty default constructor. More...
 
 ~SettingsForQt ()
 Empty defaul destructor. More...
 
void load ()
 Function to load the settings from the storage. More...
 
qlonglong getApplicationRuns () const
 Getter function for mApplicationRuns. More...
 
void increaseApplicationRuns ()
 Increments mApplicationRuns. More...
 
virtual void setLanguageId (const std::string &s) overridefinal
 Set the language id (en, de, fr,-...) More...
 
virtual std::string getUserLanguageId () const overridefinal
 Settings::getUserLanguageId. More...
 
bool doNotShowAgainMessageBox (int id) const
 Getter function to check if the given AutoClosingMessageBox shall not be shown again. More...
 
void setDoNotShowAgainMessageBox (int id, bool doNotShowAgain)
 Sets a AutoClosingMessageBox state whether to show again. More...
 
size_t countCurrentDoNotShowAgainMessageBoxes () const
 Get the count of all do not show again message boxes whose states are stored. More...
 
int getLastVisitedOptionsPage () const
 Getter function for mLastVisitedOptionsPage. More...
 
void setLastVisitedOptionsPage (int id)
 Setter function for mLastVisitedOptionsPage. More...
 
const QString & getInputDeviceName () const
 Getter function for mInputDeviceName. More...
 
void setInputDeviceName (const QString &s)
 Setter function for mInputDeviceName. More...
 
int getInputDeviceSamplingRate () const
 Getter function for mInputDeviceSamplingRate. More...
 
void setInputDeviceSamplingRate (int rate)
 Setter function for mInputDeviceSamplingRate. More...
 
const QString & getOuputDeviceName () const
 Getter function for mOutputDeviceName. More...
 
void setOutputDeviceName (const QString &s)
 Setter function for mOutputDeviceName. More...
 
int getOutputDeviceSamplingRate () const
 Getter function for mOutputDeviceSamplingRate. More...
 
void setOutputDeviceSamplingRate (int rate)
 Setter function for mOutputDeviceSamplingRate. More...
 
virtual void setLastUsedAlgorithm (const std::string &name) overridefinal
 Set the name of the last used algorithm. More...
 
virtual void setSoundGeneratorMode (SoundGenerator::SoundGeneratorMode mode) overridefinal
 Set the last operation mode of the sound generator. More...
 
virtual void setSoundGeneratorVolumeDynamic (bool dynamic) overridefinal
 Set flag for dynamic volume adaption in the tuning mode. More...
 
virtual void setStroboscopeMode (bool enable) overridefinal
 Set flag indicating the stroboscopic mode of the tuning indicator. More...
 
virtual void setDisableAutomaticKeySelection (bool disable) overridefinal
 Set flag disabling automatic selection of the key during tuning. More...
 
- Public Member Functions inherited from Settings
 Settings ()
 Constructor. More...
 
 ~Settings ()
 Empty destructor. More...
 
const std::string & getLanguageId () const
 Get the language id (en, de, fr,-...) More...
 
const std::string & getLastUsedAlgorithm () const
 Get the name of the last used algorithm. More...
 
SoundGenerator::SoundGeneratorMode getSoundGeneratorMode () const
 Get the last operation mode of the sound generator. More...
 
bool isSoundGeneratorVolumeDynamic () const
 Get flag for dynamic volume adaption in the tuning mode. More...
 
bool isAutomaticKeySelectionDisabled () const
 Get flag disabling automatic selection of the key during tuning. More...
 
bool isStroboscopeActive () const
 Get flag indicating the stroboscopic mode of the tuning indicator. More...
 

Static Public Member Functions

static SettingsForQtgetSingleton ()
 Getter function for the singleton. More...
 
- Static Public Member Functions inherited from Settings
static SettingsgetSingleton ()
 Get a pointer to the singleton instance. More...
 

Static Public Attributes

static const QString KEY_CURRENT_FILE_DIALOG_PATH = "app/currentFileDialogPath"
 

Private Attributes

qlonglong mApplicationRuns
 Counter for the application runs. More...
 
std::vector< int > mDoNotShowAgainMessageBoxes
 store the ids of the message boxes that wont show again More...
 
int mLastVisitedOptionsPage
 last activated options page More...
 
QString mInputDeviceName
 input device name More...
 
int mInputDeviceSamplingRate
 input device sampling rate More...
 
QString mOutputDeviceName
 output device name More...
 
int mOutputDeviceSamplingRate
 output device sampling rate More...
 
QSettings mSettings
 The QSettings that will store all values to the storage. More...
 

Additional Inherited Members

- Protected Attributes inherited from Settings
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...
 

Detailed Description

Qt specific settings.

Definition at line 32 of file settingsforqt.h.

Constructor & Destructor Documentation

SettingsForQt::SettingsForQt ( )

Empty default constructor.

Definition at line 29 of file settingsforqt.cpp.

SettingsForQt::~SettingsForQt ( )

Empty defaul destructor.

Definition at line 34 of file settingsforqt.cpp.

Member Function Documentation

size_t SettingsForQt::countCurrentDoNotShowAgainMessageBoxes ( ) const
inline

Get the count of all do not show again message boxes whose states are stored.

Returns
Number of message boxes.

Definition at line 104 of file settingsforqt.h.

bool SettingsForQt::doNotShowAgainMessageBox ( int  id) const

Getter function to check if the given AutoClosingMessageBox shall not be shown again.

Parameters
id: Id of the message box
Returns
Show the message box again?

Definition at line 94 of file settingsforqt.cpp.

qlonglong SettingsForQt::getApplicationRuns ( ) const

Getter function for mApplicationRuns.

Returns
mApplicationRuns

Definition at line 72 of file settingsforqt.cpp.

const QString& SettingsForQt::getInputDeviceName ( ) const
inline

Getter function for mInputDeviceName.

Returns
mInputDeviceName

Definition at line 126 of file settingsforqt.h.

int SettingsForQt::getInputDeviceSamplingRate ( ) const
inline

Getter function for mInputDeviceSamplingRate.

Returns
mInputDeviceSamplingRate

Definition at line 141 of file settingsforqt.h.

int SettingsForQt::getLastVisitedOptionsPage ( ) const
inline

Getter function for mLastVisitedOptionsPage.

Returns
mLastVisitedOptionsPage

Definition at line 111 of file settingsforqt.h.

const QString& SettingsForQt::getOuputDeviceName ( ) const
inline

Getter function for mOutputDeviceName.

Returns
mOutputDeviceName

Definition at line 156 of file settingsforqt.h.

int SettingsForQt::getOutputDeviceSamplingRate ( ) const
inline

Getter function for mOutputDeviceSamplingRate.

Returns
mOutputDeviceSamplingRate

Definition at line 171 of file settingsforqt.h.

SettingsForQt & SettingsForQt::getSingleton ( )
static

Getter function for the singleton.

Returns
mSingleton converted to SettingsForQt

Definition at line 40 of file settingsforqt.cpp.

+ Here is the call graph for this function:

std::string SettingsForQt::getUserLanguageId ( ) const
finaloverridevirtual

Settings::getUserLanguageId.

Returns
String containing the language id

Reimplemented from Settings.

Definition at line 86 of file settingsforqt.cpp.

void SettingsForQt::increaseApplicationRuns ( )

Increments mApplicationRuns.

This will automatically store its new value to the QSettings.

Definition at line 76 of file settingsforqt.cpp.

void SettingsForQt::load ( )

Function to load the settings from the storage.

Definition at line 45 of file settingsforqt.cpp.

void SettingsForQt::setDisableAutomaticKeySelection ( bool  disable)
finaloverridevirtual

Set flag disabling automatic selection of the key during tuning.

Reimplemented from Settings.

Definition at line 154 of file settingsforqt.cpp.

+ Here is the call graph for this function:

void SettingsForQt::setDoNotShowAgainMessageBox ( int  id,
bool  doNotShowAgain 
)

Sets a AutoClosingMessageBox state whether to show again.

Parameters
id: The id of the AutoClosingMessageBox
doNotShowAgain: The state of the message box

This will automatically store its new value to the QSettings.

Definition at line 98 of file settingsforqt.cpp.

void SettingsForQt::setInputDeviceName ( const QString &  s)

Setter function for mInputDeviceName.

Parameters
s: The name of the input device

This will automatically store its new value to the QSettings.

Definition at line 114 of file settingsforqt.cpp.

void SettingsForQt::setInputDeviceSamplingRate ( int  rate)

Setter function for mInputDeviceSamplingRate.

Parameters
rate: The sampling rate

This will automatically store its new value to the QSettings.

Definition at line 119 of file settingsforqt.cpp.

void SettingsForQt::setLanguageId ( const std::string &  id)
finaloverridevirtual

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

Reimplemented from Settings.

Definition at line 81 of file settingsforqt.cpp.

+ Here is the call graph for this function:

void SettingsForQt::setLastUsedAlgorithm ( const std::string &  name)
finaloverridevirtual

Set the name of the last used algorithm.

Reimplemented from Settings.

Definition at line 134 of file settingsforqt.cpp.

+ Here is the call graph for this function:

void SettingsForQt::setLastVisitedOptionsPage ( int  id)

Setter function for mLastVisitedOptionsPage.

Parameters
id: Id of the last visited options page

This will automatically store its new value to the QSettings.

Definition at line 109 of file settingsforqt.cpp.

void SettingsForQt::setOutputDeviceName ( const QString &  s)

Setter function for mOutputDeviceName.

Parameters
s: The name of the input device

This will automatically store its new value to the QSettings.

Definition at line 124 of file settingsforqt.cpp.

void SettingsForQt::setOutputDeviceSamplingRate ( int  rate)

Setter function for mOutputDeviceSamplingRate.

Parameters
b: The sampling rate

This will automatically store its new value to the QSettings.

Definition at line 129 of file settingsforqt.cpp.

void SettingsForQt::setSoundGeneratorMode ( SoundGenerator::SoundGeneratorMode  mode)
finaloverridevirtual

Set the last operation mode of the sound generator.

Reimplemented from Settings.

Definition at line 139 of file settingsforqt.cpp.

+ Here is the call graph for this function:

void SettingsForQt::setSoundGeneratorVolumeDynamic ( bool  dynamic)
finaloverridevirtual

Set flag for dynamic volume adaption in the tuning mode.

Reimplemented from Settings.

Definition at line 144 of file settingsforqt.cpp.

+ Here is the call graph for this function:

void SettingsForQt::setStroboscopeMode ( bool  enable)
finaloverridevirtual

Set flag indicating the stroboscopic mode of the tuning indicator.

Reimplemented from Settings.

Definition at line 149 of file settingsforqt.cpp.

+ Here is the call graph for this function:

Member Data Documentation

const QString SettingsForQt::KEY_CURRENT_FILE_DIALOG_PATH = "app/currentFileDialogPath"
static

Definition at line 36 of file settingsforqt.h.

qlonglong SettingsForQt::mApplicationRuns
private

Counter for the application runs.

This is used to detect whether this is the first run.

Definition at line 193 of file settingsforqt.h.

std::vector<int> SettingsForQt::mDoNotShowAgainMessageBoxes
private

store the ids of the message boxes that wont show again

Definition at line 196 of file settingsforqt.h.

QString SettingsForQt::mInputDeviceName
private

input device name

Definition at line 205 of file settingsforqt.h.

int SettingsForQt::mInputDeviceSamplingRate
private

input device sampling rate

Definition at line 208 of file settingsforqt.h.

int SettingsForQt::mLastVisitedOptionsPage
private

last activated options page

Definition at line 200 of file settingsforqt.h.

QString SettingsForQt::mOutputDeviceName
private

output device name

Definition at line 211 of file settingsforqt.h.

int SettingsForQt::mOutputDeviceSamplingRate
private

output device sampling rate

Definition at line 214 of file settingsforqt.h.

QSettings SettingsForQt::mSettings
private

The QSettings that will store all values to the storage.

Definition at line 218 of file settingsforqt.h.


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