Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 2f24b00..3090b08 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -1,52 +1,50 @@ | |||
1 | |||
2 | |||
3 | |||
4 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
5 | #include <qpe/qlibrary.h> | 2 | #include <qpe/qlibrary.h> |
6 | #include <qpe/config.h> | 3 | #include <qpe/config.h> |
7 | #include <qvaluelist.h> | 4 | #include <qvaluelist.h> |
8 | #include <qobject.h> | 5 | #include <qobject.h> |
9 | #include <qdir.h> | 6 | #include <qdir.h> |
10 | #include <qpe/mediaplayerplugininterface.h> | ||
11 | #include "mediaplayerstate.h" | 7 | #include "mediaplayerstate.h" |
12 | 8 | ||
13 | 9 | ||
14 | 10 | ||
15 | //#define MediaPlayerDebug(x) qDebug x | 11 | //#define MediaPlayerDebug(x) qDebug x |
16 | #define MediaPlayerDebug(x) | 12 | #define MediaPlayerDebug(x) |
17 | 13 | ||
18 | 14 | ||
19 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) | 15 | MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) |
20 | : QObject( parent, name ) { | 16 | : QObject( parent, name ) { |
21 | Config cfg( "OpiePlayer" ); | 17 | Config cfg( "OpiePlayer" ); |
22 | readConfig( cfg ); | 18 | readConfig( cfg ); |
19 | |||
23 | } | 20 | } |
24 | 21 | ||
25 | 22 | ||
26 | MediaPlayerState::~MediaPlayerState() { | 23 | MediaPlayerState::~MediaPlayerState() { |
27 | Config cfg( "OpiePlayer" ); | 24 | Config cfg( "OpiePlayer" ); |
28 | writeConfig( cfg ); | 25 | writeConfig( cfg ); |
26 | |||
29 | } | 27 | } |
30 | 28 | ||
31 | 29 | ||
32 | void MediaPlayerState::readConfig( Config& cfg ) { | 30 | void MediaPlayerState::readConfig( Config& cfg ) { |
33 | cfg.setGroup("Options"); | 31 | cfg.setGroup("Options"); |
34 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); | 32 | isFullscreen = cfg.readBoolEntry( "FullScreen" ); |
35 | isScaled = cfg.readBoolEntry( "Scaling" ); | 33 | isScaled = cfg.readBoolEntry( "Scaling" ); |
36 | isLooping = cfg.readBoolEntry( "Looping" ); | 34 | isLooping = cfg.readBoolEntry( "Looping" ); |
37 | isShuffled = cfg.readBoolEntry( "Shuffle" ); | 35 | isShuffled = cfg.readBoolEntry( "Shuffle" ); |
38 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); | 36 | usePlaylist = cfg.readBoolEntry( "UsePlayList" ); |
39 | usePlaylist = TRUE; | 37 | usePlaylist = TRUE; |
40 | isPlaying = FALSE; | 38 | isPlaying = FALSE; |
41 | isPaused = FALSE; | 39 | isPaused = FALSE; |
42 | curPosition = 0; | 40 | curPosition = 0; |
43 | curLength = 0; | 41 | curLength = 0; |
44 | curView = 'l'; | 42 | curView = 'l'; |
45 | } | 43 | } |
46 | 44 | ||
47 | 45 | ||
48 | void MediaPlayerState::writeConfig( Config& cfg ) const { | 46 | void MediaPlayerState::writeConfig( Config& cfg ) const { |
49 | cfg.setGroup("Options"); | 47 | cfg.setGroup("Options"); |
50 | cfg.writeEntry("FullScreen", isFullscreen ); | 48 | cfg.writeEntry("FullScreen", isFullscreen ); |
51 | cfg.writeEntry("Scaling", isScaled ); | 49 | cfg.writeEntry("Scaling", isScaled ); |
52 | cfg.writeEntry("Looping", isLooping ); | 50 | cfg.writeEntry("Looping", isLooping ); |