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
00031 class QmmpSettings : public QObject
00032 {
00033 Q_OBJECT
00034 public:
00040 QmmpSettings(QObject *parent = 0);
00044 ~QmmpSettings();
00048 enum ReplayGainMode
00049 {
00050 REPLAYGAIN_TRACK = 0,
00051 REPLAYGAIN_ALBUM,
00052 REPLAYGAIN_DISABLED
00053 };
00057 QmmpSettings::ReplayGainMode replayGainMode() const;
00061 double replayGainPreamp() const;
00065 double replayGainDefaultGain() const;
00069 bool replayGainPreventClipping() const;
00077 void setReplayGainSettings(ReplayGainMode mode, double preamp, double default_gain, bool clip);
00081 bool useSoftVolume() const;
00085 bool use16BitOutput() const;
00091 void setAudioSettings(bool soft_volume, bool use_16bit);
00096 QStringList coverNameFilters(bool include = true) const;
00100 int coverSearchDepth() const;
00104 bool useCoverFiles() const;
00114 void setCoverSettings(QStringList inc, QStringList exc, int depth, bool use_files);
00118 bool isProxyEnabled() const;
00122 bool useProxyAuth() const;
00126 QUrl proxy() const;
00133 void setNetworkSettings(bool use_proxy, bool auth, const QUrl &proxy);
00137 static QmmpSettings* instance();
00138
00139 signals:
00143 void replayGainSettingsChanged();
00147 void audioSettingsChanged();
00151 void coverSettingsChanged();
00155 void networkSettingsChanged();
00156
00157 private slots:
00158 void sync();
00159
00160 private:
00161
00162 QmmpSettings::ReplayGainMode m_rg_mode;
00163 double m_rg_preamp;
00164 double m_rg_defaut_gain;
00165 bool m_rg_prevent_clipping;
00166
00167 bool m_aud_software_volume;
00168 bool m_aud_16bit;
00169
00170 QStringList m_cover_inc;
00171 QStringList m_cover_exclude;
00172 int m_cover_depth;
00173 bool m_cover_use_files;
00174
00175 bool m_proxy_enabled;
00176 bool m_proxy_auth;
00177 QUrl m_proxy_url;
00178
00179 static QmmpSettings* m_instance;
00180
00181 };
00182
00183 #endif // QMMPSETTINGS_H