summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-02 13:48:06 (UTC)
committer simon <simon>2002-12-02 13:48:06 (UTC)
commit4a942c5d074cef8a04870cee1ab053f72321fd20 (patch) (unidiff)
tree135459fe1bd5ada39b9028e70bfc09f6fa6555e5
parent58ae980e181b89143760b3893b0f8267cb4489d9 (diff)
downloadopie-4a942c5d074cef8a04870cee1ab053f72321fd20.zip
opie-4a942c5d074cef8a04870cee1ab053f72321fd20.tar.gz
opie-4a942c5d074cef8a04870cee1ab053f72321fd20.tar.bz2
- two unnecessary if statements removed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 4f43465..5e5dfb2 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -45,108 +45,100 @@
45 45
46//#define MediaPlayerDebug(x) qDebug x 46//#define MediaPlayerDebug(x) qDebug x
47#define MediaPlayerDebug(x) 47#define MediaPlayerDebug(x)
48 48
49 49
50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) 50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
51 : QObject( parent, name ) { 51 : QObject( parent, name ) {
52 Config cfg( "OpiePlayer" ); 52 Config cfg( "OpiePlayer" );
53 readConfig( cfg ); 53 readConfig( cfg );
54 streaming = false; 54 streaming = false;
55 seekable = true; 55 seekable = true;
56} 56}
57 57
58 58
59MediaPlayerState::~MediaPlayerState() { 59MediaPlayerState::~MediaPlayerState() {
60} 60}
61 61
62 62
63void MediaPlayerState::readConfig( Config& cfg ) { 63void MediaPlayerState::readConfig( Config& cfg ) {
64 cfg.setGroup("Options"); 64 cfg.setGroup("Options");
65 fullscreen = cfg.readBoolEntry( "FullScreen" ); 65 fullscreen = cfg.readBoolEntry( "FullScreen" );
66 scaled = cfg.readBoolEntry( "Scaling" ); 66 scaled = cfg.readBoolEntry( "Scaling" );
67 looping = cfg.readBoolEntry( "Looping" ); 67 looping = cfg.readBoolEntry( "Looping" );
68 shuffled = cfg.readBoolEntry( "Shuffle" ); 68 shuffled = cfg.readBoolEntry( "Shuffle" );
69 usePlaylist = cfg.readBoolEntry( "UsePlayList" ); 69 usePlaylist = cfg.readBoolEntry( "UsePlayList" );
70 videoGamma = cfg.readNumEntry( "VideoGamma" ); 70 videoGamma = cfg.readNumEntry( "VideoGamma" );
71 usePlaylist = TRUE; 71 usePlaylist = TRUE;
72 playing = FALSE; 72 playing = FALSE;
73 streaming = FALSE; 73 streaming = FALSE;
74 paused = FALSE; 74 paused = FALSE;
75 curPosition = 0; 75 curPosition = 0;
76 curLength = 0; 76 curLength = 0;
77 curView = 'l'; 77 curView = 'l';
78} 78}
79 79
80 80
81void MediaPlayerState::writeConfig( Config& cfg ) const { 81void MediaPlayerState::writeConfig( Config& cfg ) const {
82 cfg.setGroup( "Options" ); 82 cfg.setGroup( "Options" );
83 cfg.writeEntry( "FullScreen", fullscreen ); 83 cfg.writeEntry( "FullScreen", fullscreen );
84 cfg.writeEntry( "Scaling", scaled ); 84 cfg.writeEntry( "Scaling", scaled );
85 cfg.writeEntry( "Looping", looping ); 85 cfg.writeEntry( "Looping", looping );
86 cfg.writeEntry( "Shuffle", shuffled ); 86 cfg.writeEntry( "Shuffle", shuffled );
87 cfg.writeEntry( "UsePlayList", usePlaylist ); 87 cfg.writeEntry( "UsePlayList", usePlaylist );
88 cfg.writeEntry( "VideoGamma", videoGamma ); 88 cfg.writeEntry( "VideoGamma", videoGamma );
89} 89}
90 90
91// slots 91// slots
92void MediaPlayerState::setIsStreaming( bool b ) { 92void MediaPlayerState::setIsStreaming( bool b ) {
93
94 if ( streaming == b ) {
95 return;
96 }
97 streaming = b; 93 streaming = b;
98} 94}
99 95
100void MediaPlayerState::setIsSeekable( bool b ) { 96void MediaPlayerState::setIsSeekable( bool b ) {
101
102 //if ( isSeekable == b ) {
103 // return;
104 // }
105 seekable = b; 97 seekable = b;
106 emit isSeekableToggled(b); 98 emit isSeekableToggled(b);
107} 99}
108 100
109 101
110void MediaPlayerState::setFullscreen( bool b ) { 102void MediaPlayerState::setFullscreen( bool b ) {
111 if ( fullscreen == b ) { 103 if ( fullscreen == b ) {
112 return; 104 return;
113 } 105 }
114 fullscreen = b; 106 fullscreen = b;
115 emit fullscreenToggled(b); 107 emit fullscreenToggled(b);
116} 108}
117 109
118 110
119void MediaPlayerState::setBlanked( bool b ) { 111void MediaPlayerState::setBlanked( bool b ) {
120 if ( blanked == b ) { 112 if ( blanked == b ) {
121 return; 113 return;
122 } 114 }
123 blanked = b; 115 blanked = b;
124 emit blankToggled(b); 116 emit blankToggled(b);
125} 117}
126 118
127 119
128void MediaPlayerState::setScaled( bool b ) { 120void MediaPlayerState::setScaled( bool b ) {
129 if ( scaled == b ) { 121 if ( scaled == b ) {
130 return; 122 return;
131 } 123 }
132 scaled = b; 124 scaled = b;
133 emit scaledToggled(b); 125 emit scaledToggled(b);
134} 126}
135 127
136void MediaPlayerState::setLooping( bool b ) { 128void MediaPlayerState::setLooping( bool b ) {
137 if ( looping == b ) { 129 if ( looping == b ) {
138 return; 130 return;
139 } 131 }
140 looping = b; 132 looping = b;
141 emit loopingToggled(b); 133 emit loopingToggled(b);
142} 134}
143 135
144void MediaPlayerState::setShuffled( bool b ) { 136void MediaPlayerState::setShuffled( bool b ) {
145 if ( shuffled == b ) { 137 if ( shuffled == b ) {
146 return; 138 return;
147 } 139 }
148 shuffled = b; 140 shuffled = b;
149 emit shuffledToggled(b); 141 emit shuffledToggled(b);
150} 142}
151 143
152void MediaPlayerState::setPlaylist( bool b ) { 144void MediaPlayerState::setPlaylist( bool b ) {