Qmmp
Public Types | Signals | Public Member Functions | Static Public Member Functions
QmmpSettings Class Reference

#include <qmmpsettings.h>

List of all members.

Public Types

enum  ReplayGainMode { REPLAYGAIN_TRACK = 0, REPLAYGAIN_ALBUM, REPLAYGAIN_DISABLED }

Signals

void replayGainSettingsChanged ()
void audioSettingsChanged ()
void coverSettingsChanged ()
void networkSettingsChanged ()
void eqSettingsChanged ()

Public Member Functions

 QmmpSettings (QObject *parent=0)
virtual ~QmmpSettings ()
QmmpSettings::ReplayGainMode replayGainMode () const
double replayGainPreamp () const
double replayGainDefaultGain () const
bool replayGainPreventClipping () const
void setReplayGainSettings (ReplayGainMode mode, double preamp, double default_gain, bool clip)
bool useSoftVolume () const
bool use16BitOutput () const
void setAudioSettings (bool soft_volume, bool use_16bit)
QStringList coverNameFilters (bool include=true) const
int coverSearchDepth () const
bool useCoverFiles () const
void setCoverSettings (QStringList inc, QStringList exc, int depth, bool use_files)
bool isProxyEnabled () const
bool useProxyAuth () const
QUrl proxy () const
void setNetworkSettings (bool use_proxy, bool auth, const QUrl &proxy)
EqSettings eqSettings () const
void setEqSettings (const EqSettings &settings)
void readEqSettings (int bands=EqSettings::EQ_BANDS_10)
int bufferSize () const
void setBufferSize (int msec)
void setDetermineFileTypeByContent (bool enabled)
bool determineFileTypeByContent () const

Static Public Member Functions

static QmmpSettingsinstance ()

Detailed Description

The QmmpSettings class provides access to global settings.

Author:
Ilya Kotov <forkotov02@hotmail.ru>

Member Enumeration Documentation

This enum describes possible replaygain modes.

Enumerator:
REPLAYGAIN_TRACK 

Use track gain/peak

REPLAYGAIN_ALBUM 

Use album gain/peak

REPLAYGAIN_DISABLED 

Disable ReplayGain


Constructor & Destructor Documentation

QmmpSettings ( QObject *  parent = 0)

Constructor.

Parameters:
parentParent object. This functions is for internal usage only, use QmmpSettings::instance() instead.
virtual ~QmmpSettings ( ) [virtual]

Destructor.


Member Function Documentation

void audioSettingsChanged ( ) [signal]

Emitted when audio settings are changed.

int bufferSize ( ) const

Returns buffer size in milliseconds

QStringList coverNameFilters ( bool  include = true) const

If include is true, this function returns include cover file name filters, otherwise returns exclude filters.

int coverSearchDepth ( ) const

Returns a depth of recursive cover file search.

void coverSettingsChanged ( ) [signal]

Emitted when cover settings are changed.

Return true if content based file type determination is enabled. Otherwise returns false.

Returns equalizer settings.

void eqSettingsChanged ( ) [signal]

Emitted when equalizer settings are changed.

static QmmpSettings* instance ( ) [static]

Returns a pointer to the QmmpSettings instance.

bool isProxyEnabled ( ) const

Returns true if global proxy is enabled, otherwise returns false

void networkSettingsChanged ( ) [signal]

Emitted when network settings are changed.

QUrl proxy ( ) const

Returns global proxy url.

void readEqSettings ( int  bands = EqSettings::EQ_BANDS_10)

Reads equalizer settings. Call this function before equalizer usage.

Parameters:
bandsNumber of bands.
double replayGainDefaultGain ( ) const

Returns default gain in dB.

Returns current ReplayGain mode.

double replayGainPreamp ( ) const

Returns preamp in dB.

bool replayGainPreventClipping ( ) const

Returns true if clipping prevention is enabled; otherwise returns false.

void replayGainSettingsChanged ( ) [signal]

Emitted when ReplayGain settings are changed.

void setAudioSettings ( bool  soft_volume,
bool  use_16bit 
)

Sets audio settings.

Parameters:
soft_volumeState of software volume.
use_16bitState of the 16-bit audio converter.
void setBufferSize ( int  msec)

Sets buffer size

Parameters:
msecBuffer size in milliseconds
void setCoverSettings ( QStringList  inc,
QStringList  exc,
int  depth,
bool  use_files 
)

Sets cover search options.

Parameters:
incInclude cover name filters
excExclude cover name filters
depthDepth of recursive cover file search. Recursive cover file search can be disabled by setting depth to 0.
use_filesUse or not use files with covers. This parameter doesn't take effect in embedded covers.
void setDetermineFileTypeByContent ( bool  enabled)

Enables/Desables file type determination by content

Parameters:
enabledState of the content based type determination (true - enabled, false - disabled)
void setEqSettings ( const EqSettings settings)

Changes equalizer settings to settings

void setNetworkSettings ( bool  use_proxy,
bool  auth,
const QUrl &  proxy 
)

Sets network settings.

Parameters:
use_proxyEnables or disables global proxy.
authEnables or disables proxy authentication.
proxyProxy url.
void setReplayGainSettings ( ReplayGainMode  mode,
double  preamp,
double  default_gain,
bool  clip 
)

Sets ReplayGains settings.

Parameters:
modeReplayGain mode.
preampPreamp in dB.
default_gainDefault gain in dB.
clipClipping prevention state.
bool use16BitOutput ( ) const

Returns true if 16-bit converter is enabled; otherwise returns false.

bool useCoverFiles ( ) const

Returns true if cover file search is enabled; otherwise returns false.

bool useProxyAuth ( ) const

Returns true if global proxy authentication is enabled, otherwise returns false

bool useSoftVolume ( ) const

Returns true if software volume is enabled; otherwise returns false.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator