22 #include "../core/audio/recorder/audiorecorderadapter.h"
30 : mApplicationRuns(0),
31 mLastVisitedOptionsPage(
options::OptionsDialog::PAGE_ENVIRONMENT) {
50 if (
mSettings.value(QString(
"doNotShowAgain/id%1").arg(i),
false).toBool()) {
90 return QLocale::system().name().left(2).toStdString();
102 mSettings.setValue(QString(
"doNotShowAgain/id%1").arg(
id),
true);
105 mSettings.remove(QString(
"doNotShowAgain/id%1").arg(
id));
136 mSettings.setValue(
"core/lastUsedAlgorithm", QString::fromStdString(name));
141 mSettings.setValue(
"core/soundGeneratorMode", static_cast<int>(mode));
146 mSettings.setValue(
"core/soundGeneratorVolumeDynamic", dynamic);
151 mSettings.setValue(
"core/stroboscopeMode", enable);
156 mSettings.setValue(
"core/disableAutomaticKeySelection", disable);
virtual void setStroboscopeMode(bool enable)
Set flag indicating the stroboscopic mode of the tuning indicator.
int mOutputDeviceSamplingRate
output device sampling rate
QString mInputDeviceName
input device name
static Settings & getSingleton()
Get a pointer to the singleton instance.
static const QString KEY_CURRENT_FILE_DIALOG_PATH
std::string mLanguageId
Language Id.
std::vector< int > mDoNotShowAgainMessageBoxes
store the ids of the message boxes that wont show again
void setDoNotShowAgainMessageBox(int id, bool doNotShowAgain)
Sets a AutoClosingMessageBox state whether to show again.
SoundGeneratorMode
Mode for sound generation.
std::string mLastUsedAlgorithm
The algorithm that has been used last time.
bool mDisableAutomaticKeySelection
Flag suppressing automatic key selection.
bool mSoundGeneratorVolumeDynamic
Flag for automatic volume adjustment.
QString mOutputDeviceName
output device name
virtual void setLanguageId(const std::string &s) overridefinal
Set the language id (en, de, fr,-...)
qlonglong mApplicationRuns
Counter for the application runs.
virtual void setSoundGeneratorVolumeDynamic(bool dynamic) overridefinal
Set flag for dynamic volume adaption in the tuning mode.
virtual void setLanguageId(const std::string &id)
Set the language id (en, de, fr,-...)
bool doNotShowAgainMessageBox(int id) const
Getter function to check if the given AutoClosingMessageBox shall not be shown again.
SettingsForQt()
Empty default constructor.
virtual void setStroboscopeMode(bool enable) overridefinal
Set flag indicating the stroboscopic mode of the tuning indicator.
void setOutputDeviceName(const QString &s)
Setter function for mOutputDeviceName.
void setLastVisitedOptionsPage(int id)
Setter function for mLastVisitedOptionsPage.
virtual void setSoundGeneratorMode(SoundGenerator::SoundGeneratorMode mode)
Set the last operation mode of the sound generator.
virtual void setSoundGeneratorVolumeDynamic(bool dynamic)
Set flag for dynamic volume adaption in the tuning mode.
virtual void setDisableAutomaticKeySelection(bool disable) overridefinal
Set flag disabling automatic selection of the key during tuning.
void increaseApplicationRuns()
Increments mApplicationRuns.
virtual void setLastUsedAlgorithm(const std::string &name)
Set the name of the last used algorithm.
virtual void setSoundGeneratorMode(SoundGenerator::SoundGeneratorMode mode) overridefinal
Set the last operation mode of the sound generator.
virtual void setDisableAutomaticKeySelection(bool disable)
Set flag disabling automatic selection of the key during tuning.
Produce a sound which imitates the string.
void setInputDeviceName(const QString &s)
Setter function for mInputDeviceName.
int mInputDeviceSamplingRate
input device sampling rate
SoundGenerator::SoundGeneratorMode mSoundGeneratorMode
The sound generator mode (sine or synthesizer)
QSettings mSettings
The QSettings that will store all values to the storage.
void setInputDeviceSamplingRate(int rate)
Setter function for mInputDeviceSamplingRate.
bool mStroboscopeActive
Flag indicating stroboscopic tuning indicator mode.
qlonglong getApplicationRuns() const
Getter function for mApplicationRuns.
void setOutputDeviceSamplingRate(int rate)
Setter function for mOutputDeviceSamplingRate.
static SettingsForQt & getSingleton()
Getter function for the singleton.
void load()
Function to load the settings from the storage.
virtual std::string getUserLanguageId() const overridefinal
Settings::getUserLanguageId.
~SettingsForQt()
Empty defaul destructor.
virtual void setLastUsedAlgorithm(const std::string &name) overridefinal
Set the name of the last used algorithm.
int mLastVisitedOptionsPage
last activated options page