Prepare UI for "volume normalization" filter.
[LameXP.git] / src / Model_Settings.h
blob8081f033f6adc0e8bcd27751db7596c815288d95
1 ///////////////////////////////////////////////////////////////////////////////
2 // LameXP - Audio Encoder Front-End
3 // Copyright (C) 2004-2011 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
22 #pragma once
24 class QSettings;
25 class QString;
27 #define MAKE_OPTION_DEC1(OPT) \
28 int OPT(void); \
29 void OPT(int value); \
30 int OPT##Default(void);
32 #define MAKE_OPTION_DEC2(OPT) \
33 QString OPT(void); \
34 void OPT(const QString &value); \
35 QString OPT##Default(void);
37 #define MAKE_OPTION_DEC3(OPT) \
38 bool OPT(void); \
39 void OPT(bool value); \
40 bool OPT##Default(void);
42 class SettingsModel
44 public:
45 SettingsModel(void);
46 ~SettingsModel(void);
48 //Enums
49 enum Encoder
51 MP3Encoder = 0,
52 VorbisEncoder = 1,
53 AACEncoder = 2,
54 FLACEncoder = 3,
55 PCMEncoder = 4
57 enum RCMode
59 VBRMode = 0,
60 ABRMode = 1,
61 CBRMode = 2
64 //Consts
65 static const int mp3Bitrates[15];
66 static const int samplingRates[8];
68 //Getters & setters
69 MAKE_OPTION_DEC1(licenseAccepted);
70 MAKE_OPTION_DEC1(interfaceStyle);
71 MAKE_OPTION_DEC1(compressionEncoder);
72 MAKE_OPTION_DEC1(compressionRCMode);
73 MAKE_OPTION_DEC1(compressionBitrate);
74 MAKE_OPTION_DEC2(outputDir);
75 MAKE_OPTION_DEC3(outputToSourceDir);
76 MAKE_OPTION_DEC3(prependRelativeSourcePath);
77 MAKE_OPTION_DEC3(writeMetaTags);
78 MAKE_OPTION_DEC3(createPlaylist);
79 MAKE_OPTION_DEC2(autoUpdateLastCheck);
80 MAKE_OPTION_DEC3(autoUpdateEnabled);
81 MAKE_OPTION_DEC3(soundsEnabled);
82 MAKE_OPTION_DEC3(neroAacNotificationsEnabled)
83 MAKE_OPTION_DEC3(wmaDecoderNotificationsEnabled)
84 MAKE_OPTION_DEC3(dropBoxWidgetEnabled)
85 MAKE_OPTION_DEC2(currentLanguage);
86 MAKE_OPTION_DEC1(lameAlgoQuality);
87 MAKE_OPTION_DEC1(lameChannelMode);
88 MAKE_OPTION_DEC3(bitrateManagementEnabled);
89 MAKE_OPTION_DEC1(bitrateManagementMinRate);
90 MAKE_OPTION_DEC1(bitrateManagementMaxRate);
91 MAKE_OPTION_DEC1(samplingRate)
92 MAKE_OPTION_DEC3(neroAACEnable2Pass)
93 MAKE_OPTION_DEC1(neroAACProfile)
94 MAKE_OPTION_DEC3(normalizationFilterEnabled)
95 MAKE_OPTION_DEC1(normalizationFilterMaxVolume)
97 //Misc
98 void validate(void);
100 private:
101 QSettings *m_settings;
102 QString *m_defaultLanguage;
103 QString defaultLanguage(void);
106 #undef MAKE_OPTION_DEC1
107 #undef MAKE_OPTION_DEC2
108 #undef MAKE_OPTION_DEC3