00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QMMPSETTINGS_H
00022 #define QMMPSETTINGS_H
00023
00024 #include <QObject>
00025 #include <QUrl>
00026 #include <QStringList>
00027 #include "eqsettings.h"
00028
00032 class QmmpSettings : public QObject
00033 {
00034 Q_OBJECT
00035 public:
00041 QmmpSettings(QObject *parent = 0);
00045 ~QmmpSettings();
00049 enum ReplayGainMode
00050 {
00051 REPLAYGAIN_TRACK = 0,
00052 REPLAYGAIN_ALBUM,
00053 REPLAYGAIN_DISABLED
00054 };
00058 QmmpSettings::ReplayGainMode replayGainMode() const;
00062 double replayGainPreamp() const;
00066 double replayGainDefaultGain() const;
00070 bool replayGainPreventClipping() const;
00078 void setReplayGainSettings(ReplayGainMode mode, double preamp, double default_gain, bool clip);
00082 bool useSoftVolume() const;
00086 bool use16BitOutput() const;
00092 void setAudioSettings(bool soft_volume, bool use_16bit);
00097 QStringList coverNameFilters(bool include = true) const;
00101 int coverSearchDepth() const;
00105 bool useCoverFiles() const;
00115 void setCoverSettings(QStringList inc, QStringList exc, int depth, bool use_files);
00119 bool isProxyEnabled() const;
00123 bool useProxyAuth() const;
00127 QUrl proxy() const;
00134 void setNetworkSettings(bool use_proxy, bool auth, const QUrl &proxy);
00138 EqSettings eqSettings() const;
00142 void setEqSettings(const EqSettings &settings);
00147 void readEqSettings(int bands = EqSettings::EQ_BANDS_10);
00151 int bufferSize() const;
00156 void setBufferSize(int msec);
00162 void setDetermineFileTypeByContent(bool enabled);
00166 bool determineFileTypeByContent() const;
00170 static QmmpSettings* instance();
00171
00172 signals:
00176 void replayGainSettingsChanged();
00180 void audioSettingsChanged();
00184 void coverSettingsChanged();
00188 void networkSettingsChanged();
00192 void eqSettingsChanged();
00193
00194 private slots:
00195 void sync();
00196
00197 private:
00198
00199 QmmpSettings::ReplayGainMode m_rg_mode;
00200 double m_rg_preamp;
00201 double m_rg_defaut_gain;
00202 bool m_rg_prevent_clipping;
00203
00204 bool m_aud_software_volume;
00205 bool m_aud_16bit;
00206
00207 QStringList m_cover_inc;
00208 QStringList m_cover_exclude;
00209 int m_cover_depth;
00210 bool m_cover_use_files;
00211
00212 bool m_proxy_enabled;
00213 bool m_proxy_auth;
00214 QUrl m_proxy_url;
00215
00216 EqSettings m_eq_settings;
00217
00218 int m_buffer_size;
00219
00220 bool m_determine_by_content;
00221
00222 static QmmpSettings* m_instance;
00223
00224 };
00225
00226 #endif // QMMPSETTINGS_H