From 99b610f06af444e2636d1afe93d3de89a524ee8a Mon Sep 17 00:00:00 2001 From: harlekin Date: Mon, 02 Sep 2002 17:18:30 +0000 Subject: first parts of gamma correction, fullscreen on arm need some more work --- (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index d984022..4ec5989 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -1,3 +1,38 @@ +/* +                This file is part of the Opie Project + +              Copyright (c) 2002 Max Reiss + Copyright (c) 2002 L. Potter + Copyright (c) 2002 Holger Freyther + =. + .=l. +           .>+-= + _;:,     .>    :=|. This program is free software; you can +.> <`_,   >  .   <= redistribute it and/or modify it under +:`=1 )Y*s>-.--   : the terms of the GNU General Public +.="- .-=="i,     .._ License as published by the Free Software + - .   .-<_>     .<> Foundation; either version 2 of the License, +     ._= =}       : or (at your option) any later version. +    .%`+i>       _;_. +    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU +..}^=.=       =       ; General Public License for more +++=   -.     .`     .: details. + :     =  ...= . :.=- + -.   .:....=;==+<; You should have received a copy of the GNU +  -_. . .   )=.  = General Public License along with +    --        :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ + +// this file is based on work by trolltech + #include #include #include @@ -21,9 +56,6 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) MediaPlayerState::~MediaPlayerState() { -// Config cfg( "OpiePlayer" ); -// writeConfig( cfg ); - } @@ -34,6 +66,7 @@ void MediaPlayerState::readConfig( Config& cfg ) { isLooping = cfg.readBoolEntry( "Looping" ); isShuffled = cfg.readBoolEntry( "Shuffle" ); usePlaylist = cfg.readBoolEntry( "UsePlayList" ); + videoGamma = cfg.readNumEntry( "VideoGamma" ); usePlaylist = TRUE; isPlaying = FALSE; isStreaming = FALSE; @@ -45,12 +78,13 @@ void MediaPlayerState::readConfig( Config& cfg ) { void MediaPlayerState::writeConfig( Config& cfg ) const { - cfg.setGroup("Options"); - cfg.writeEntry("FullScreen", isFullscreen ); - cfg.writeEntry("Scaling", isScaled ); - cfg.writeEntry("Looping", isLooping ); - cfg.writeEntry("Shuffle", isShuffled ); - cfg.writeEntry("UsePlayList", usePlaylist ); + cfg.setGroup( "Options" ); + cfg.writeEntry( "FullScreen", isFullscreen ); + cfg.writeEntry( "Scaling", isScaled ); + cfg.writeEntry( "Looping", isLooping ); + cfg.writeEntry( "Shuffle", isShuffled ); + cfg.writeEntry( "UsePlayList", usePlaylist ); + cfg.writeEntry( "VideoGamma", videoGamma ); } @@ -209,6 +243,14 @@ void MediaPlayerState::updatePosition( long p ){ emit positionUpdated(p); } +void MediaPlayerState::setVideoGamma( int v ){ + if ( videoGamma == v ) { + return; + } + videoGamma = v; + emit videoGammaChanged( v ); +} + void MediaPlayerState::setLength( long l ) { if ( curLength == l ) { return; -- cgit v0.9.0.2