1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 14:16:32 +02:00

* Added volume / setVolume methods to TomahawkSettings.

This commit is contained in:
Christian Muehlhaeuser
2012-05-27 18:23:48 +02:00
parent 8d57ec3283
commit 8830593f1d
2 changed files with 20 additions and 1 deletions

View File

@@ -158,7 +158,6 @@ TomahawkSettings::doInitialSetup()
// by default we add a local network resolver // by default we add a local network resolver
addAccount( "sipzeroconf_autocreated" ); addAccount( "sipzeroconf_autocreated" );
createLastFmAccount(); createLastFmAccount();
createSpotifyAccount(); createSpotifyAccount();
} }
@@ -712,6 +711,20 @@ TomahawkSettings::setCrashReporterEnabled( bool enable )
} }
unsigned int
TomahawkSettings::volume() const
{
return value( "audio/volume", 75 ).toUInt();
}
void
TomahawkSettings::setVolume( unsigned int volume )
{
setValue( "audio/volume", volume );
}
QString QString
TomahawkSettings::proxyHost() const TomahawkSettings::proxyHost() const
{ {

View File

@@ -47,11 +47,13 @@ public:
/// General settings /// General settings
virtual QString storageCacheLocation() const; virtual QString storageCacheLocation() const;
virtual QStringList scannerPaths() const; /// QDesktopServices::MusicLocation in TomahawkSettingsGui virtual QStringList scannerPaths() const; /// QDesktopServices::MusicLocation in TomahawkSettingsGui
void setScannerPaths( const QStringList& paths ); void setScannerPaths( const QStringList& paths );
bool hasScannerPaths() const; bool hasScannerPaths() const;
uint scannerTime() const; uint scannerTime() const;
void setScannerTime( uint time ); void setScannerTime( uint time );
uint infoSystemCacheVersion() const; uint infoSystemCacheVersion() const;
void setInfoSystemCacheVersion( uint version ); void setInfoSystemCacheVersion( uint version );
@@ -81,6 +83,10 @@ public:
bool enableEchonestCatalogs() const; bool enableEchonestCatalogs() const;
void setEnableEchonestCatalogs( bool enable ); void setEnableEchonestCatalogs( bool enable );
/// Audio stuff
unsigned int volume() const;
void setVolume( unsigned int volume );
/// Playlist stuff /// Playlist stuff
QByteArray playlistColumnSizes( const QString& playlistid ) const; QByteArray playlistColumnSizes( const QString& playlistid ) const;
void setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state ); void setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state );