2010-11-12 19:02:01 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LameXP - Audio Encoder Front-End
|
2011-01-01 17:04:25 +01:00
|
|
|
// Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
|
2010-11-12 19:02:01 +01:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class QSettings;
|
2010-11-20 02:14:22 +01:00
|
|
|
class QString;
|
2010-11-12 19:02:01 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
#define MAKE_OPTION_DEC1(OPT) \
|
|
|
|
int OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(int value); \
|
|
|
|
int OPT##Default(void);
|
2010-11-21 21:51:22 +01:00
|
|
|
|
|
|
|
#define MAKE_OPTION_DEC2(OPT) \
|
|
|
|
QString OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(const QString &value); \
|
|
|
|
QString OPT##Default(void);
|
2010-11-21 21:51:22 +01:00
|
|
|
|
|
|
|
#define MAKE_OPTION_DEC3(OPT) \
|
|
|
|
bool OPT(void); \
|
2011-01-23 02:19:18 +01:00
|
|
|
void OPT(bool value); \
|
|
|
|
bool OPT##Default(void);
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2010-11-12 19:02:01 +01:00
|
|
|
class SettingsModel
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SettingsModel(void);
|
|
|
|
~SettingsModel(void);
|
|
|
|
|
2010-11-15 04:42:06 +01:00
|
|
|
//Enums
|
|
|
|
enum Encoder
|
|
|
|
{
|
|
|
|
MP3Encoder = 0,
|
|
|
|
VorbisEncoder = 1,
|
|
|
|
AACEncoder = 2,
|
|
|
|
FLACEncoder = 3,
|
|
|
|
PCMEncoder = 4
|
|
|
|
};
|
|
|
|
enum RCMode
|
|
|
|
{
|
|
|
|
VBRMode = 0,
|
|
|
|
ABRMode = 1,
|
|
|
|
CBRMode = 2
|
|
|
|
};
|
|
|
|
|
2010-11-15 21:07:58 +01:00
|
|
|
//Consts
|
|
|
|
static const int mp3Bitrates[15];
|
2011-01-23 02:19:18 +01:00
|
|
|
static const int samplingRates[8];
|
2010-11-15 21:07:58 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
//Getters & setters
|
|
|
|
MAKE_OPTION_DEC1(licenseAccepted);
|
|
|
|
MAKE_OPTION_DEC1(interfaceStyle);
|
|
|
|
MAKE_OPTION_DEC1(compressionEncoder);
|
|
|
|
MAKE_OPTION_DEC1(compressionRCMode);
|
|
|
|
MAKE_OPTION_DEC1(compressionBitrate);
|
|
|
|
MAKE_OPTION_DEC2(outputDir);
|
|
|
|
MAKE_OPTION_DEC3(outputToSourceDir);
|
2010-12-14 01:25:13 +01:00
|
|
|
MAKE_OPTION_DEC3(prependRelativeSourcePath);
|
2010-11-21 21:51:22 +01:00
|
|
|
MAKE_OPTION_DEC3(writeMetaTags);
|
|
|
|
MAKE_OPTION_DEC3(createPlaylist);
|
2010-11-29 20:36:27 +01:00
|
|
|
MAKE_OPTION_DEC2(autoUpdateLastCheck);
|
|
|
|
MAKE_OPTION_DEC3(autoUpdateEnabled);
|
|
|
|
MAKE_OPTION_DEC3(soundsEnabled);
|
2011-01-29 00:40:29 +01:00
|
|
|
MAKE_OPTION_DEC3(neroAacNotificationsEnabled);
|
|
|
|
MAKE_OPTION_DEC3(wmaDecoderNotificationsEnabled);
|
|
|
|
MAKE_OPTION_DEC3(dropBoxWidgetEnabled);
|
|
|
|
MAKE_OPTION_DEC3(shellIntegrationEnabled);
|
2010-12-28 21:26:16 +01:00
|
|
|
MAKE_OPTION_DEC2(currentLanguage);
|
2011-01-21 19:14:11 +01:00
|
|
|
MAKE_OPTION_DEC1(lameAlgoQuality);
|
2011-01-22 22:19:20 +01:00
|
|
|
MAKE_OPTION_DEC1(lameChannelMode);
|
2011-01-21 21:41:50 +01:00
|
|
|
MAKE_OPTION_DEC3(bitrateManagementEnabled);
|
|
|
|
MAKE_OPTION_DEC1(bitrateManagementMinRate);
|
|
|
|
MAKE_OPTION_DEC1(bitrateManagementMaxRate);
|
2011-01-29 00:40:29 +01:00
|
|
|
MAKE_OPTION_DEC1(samplingRate);
|
|
|
|
MAKE_OPTION_DEC3(neroAACEnable2Pass);
|
|
|
|
MAKE_OPTION_DEC1(neroAACProfile);
|
|
|
|
MAKE_OPTION_DEC3(normalizationFilterEnabled);
|
|
|
|
MAKE_OPTION_DEC1(normalizationFilterMaxVolume);
|
|
|
|
MAKE_OPTION_DEC1(toneAdjustBass);
|
|
|
|
MAKE_OPTION_DEC1(toneAdjustTreble);
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
//Misc
|
2010-11-15 04:42:06 +01:00
|
|
|
void validate(void);
|
2010-11-12 19:02:01 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QSettings *m_settings;
|
2011-01-02 01:09:05 +01:00
|
|
|
QString *m_defaultLanguage;
|
|
|
|
QString defaultLanguage(void);
|
2010-11-12 19:02:01 +01:00
|
|
|
};
|
2010-11-15 04:42:06 +01:00
|
|
|
|
2010-11-21 21:51:22 +01:00
|
|
|
#undef MAKE_OPTION_DEC1
|
|
|
|
#undef MAKE_OPTION_DEC2
|
|
|
|
#undef MAKE_OPTION_DEC3
|