summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
authorharlekin <harlekin>2002-07-09 01:02:37 (UTC)
committer harlekin <harlekin>2002-07-09 01:02:37 (UTC)
commit577841e20b5657411194d74a143b0319fc05cda3 (patch) (unidiff)
tree0e41da19fff8e2f47d43612a96d503b49b6a6a0b /noncore/multimedia/opieplayer2/mediaplayerstate.cpp
parent56554891922367c5d4e7d0f6965daa1026c0cc54 (diff)
downloadopie-577841e20b5657411194d74a143b0319fc05cda3.zip
opie-577841e20b5657411194d74a143b0319fc05cda3.tar.gz
opie-577841e20b5657411194d74a143b0319fc05cda3.tar.bz2
more gui updates
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 3090b08..778cd1e 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -53,12 +53,18 @@ void MediaPlayerState::writeConfig( Config& cfg ) const {
53} 53}
54 54
55 55
56 56
57 57
58// public stuff 58// public stuff
59
60
61bool MediaPlayerState::streaming() {
62 return isStreaming;
63}
64
59bool MediaPlayerState::fullscreen() { 65bool MediaPlayerState::fullscreen() {
60 return isFullscreen; 66 return isFullscreen;
61} 67}
62 68
63bool MediaPlayerState::scaled() { 69bool MediaPlayerState::scaled() {
64 return isScaled; 70 return isScaled;
@@ -82,12 +88,16 @@ bool MediaPlayerState::paused() {
82} 88}
83 89
84bool MediaPlayerState::playing() { 90bool MediaPlayerState::playing() {
85 return isPlaying; 91 return isPlaying;
86} 92}
87 93
94bool MediaPlayerState::stop() {
95 return isStoped;
96}
97
88long MediaPlayerState::position() { 98long MediaPlayerState::position() {
89 return curPosition; 99 return curPosition;
90} 100}
91 101
92long MediaPlayerState::length() { 102long MediaPlayerState::length() {
93 return curLength; 103 return curLength;
@@ -95,12 +105,20 @@ long MediaPlayerState::length() {
95 105
96char MediaPlayerState::view() { 106char MediaPlayerState::view() {
97 return curView; 107 return curView;
98} 108}
99 109
100// slots 110// slots
111void MediaPlayerState::setIsStreaming( bool b ) {
112 if ( isStreaming == b ) {
113 return;
114 }
115 isStreaming = b;
116}
117
118
101void MediaPlayerState::setFullscreen( bool b ) { 119void MediaPlayerState::setFullscreen( bool b ) {
102 if ( isFullscreen == b ) { 120 if ( isFullscreen == b ) {
103 return; 121 return;
104 } 122 }
105 isFullscreen = b; 123 isFullscreen = b;
106 emit fullscreenToggled(b); 124 emit fullscreenToggled(b);
@@ -149,15 +167,24 @@ void MediaPlayerState::setPaused( bool b ) {
149 167
150void MediaPlayerState::setPlaying( bool b ) { 168void MediaPlayerState::setPlaying( bool b ) {
151 if ( isPlaying == b ) { 169 if ( isPlaying == b ) {
152 return; 170 return;
153 } 171 }
154 isPlaying = b; 172 isPlaying = b;
173 isStoped = !b;
155 emit playingToggled(b); 174 emit playingToggled(b);
156} 175}
157 176
177void MediaPlayerState::setStop( bool b ) {
178 if ( isStoped == b ) {
179 return;
180 }
181 isStoped = b;
182 emit stopToggled(b);
183}
184
158void MediaPlayerState::setPosition( long p ) { 185void MediaPlayerState::setPosition( long p ) {
159 if ( curPosition == p ) { 186 if ( curPosition == p ) {
160 return; 187 return;
161 } 188 }
162 curPosition = p; 189 curPosition = p;
163 emit positionChanged(p); 190 emit positionChanged(p);
@@ -205,14 +232,12 @@ void MediaPlayerState::setVideo() {
205} 232}
206 233
207void MediaPlayerState::setAudio() { 234void MediaPlayerState::setAudio() {
208 setView('a'); 235 setView('a');
209} 236}
210 237
211
212
213void MediaPlayerState::toggleFullscreen() { 238void MediaPlayerState::toggleFullscreen() {
214 setFullscreen( !isFullscreen ); 239 setFullscreen( !isFullscreen );
215} 240}
216 241
217void MediaPlayerState::toggleScaled() { 242void MediaPlayerState::toggleScaled() {
218 setScaled( !isScaled); 243 setScaled( !isScaled);