summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp60
1 files changed, 51 insertions, 9 deletions
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 +1,36 @@
+/*
+                This file is part of the Opie Project
+
+              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
+ Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
+ Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
+ =.
+ .=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_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+    : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: 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 <qpe/qpeapplication.h>
@@ -23,5 +58,2 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
MediaPlayerState::~MediaPlayerState() {
-// Config cfg( "OpiePlayer" );
-// writeConfig( cfg );
-
}
@@ -36,2 +68,3 @@ void MediaPlayerState::readConfig( Config& cfg ) {
usePlaylist = cfg.readBoolEntry( "UsePlayList" );
+ videoGamma = cfg.readNumEntry( "VideoGamma" );
usePlaylist = TRUE;
@@ -47,8 +80,9 @@ 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 );
}
@@ -211,2 +245,10 @@ void MediaPlayerState::updatePosition( long p ){
+void MediaPlayerState::setVideoGamma( int v ){
+ if ( videoGamma == v ) {
+ return;
+ }
+ videoGamma = v;
+ emit videoGammaChanged( v );
+}
+
void MediaPlayerState::setLength( long l ) {