Diffstat (limited to 'core/multimedia/opieplayer/mediaplayerstate.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/mediaplayerstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/multimedia/opieplayer/mediaplayerstate.h b/core/multimedia/opieplayer/mediaplayerstate.h index ad273f1..06c5556 100644 --- a/core/multimedia/opieplayer/mediaplayerstate.h +++ b/core/multimedia/opieplayer/mediaplayerstate.h | |||
@@ -1,85 +1,85 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #ifndef MEDIA_PLAYER_STATE_H | 20 | #ifndef MEDIA_PLAYER_STATE_H |
21 | #define MEDIA_PLAYER_STATE_H | 21 | #define MEDIA_PLAYER_STATE_H |
22 | 22 | ||
23 | 23 | ||
24 | #include <qobject.h> | 24 | #include <qobject.h> |
25 | 25 | ||
26 | 26 | ||
27 | class MediaPlayerDecoder; | 27 | class MediaPlayerDecoder; |
28 | class Config; | 28 | class Config; |
29 | 29 | ||
30 | 30 | ||
31 | class MediaPlayerState : public QObject { | 31 | class MediaPlayerState : public QObject { |
32 | Q_OBJECT | 32 | Q_OBJECT |
33 | public: | 33 | public: |
34 | MediaPlayerState( QObject *parent, const char *name ); | 34 | MediaPlayerState( QObject *parent, const char *name ); |
35 | ~MediaPlayerState(); | 35 | ~MediaPlayerState(); |
36 | 36 | ||
37 | 37 | bool isStreaming; | |
38 | bool fullscreen() { return isFullscreen; } | 38 | bool fullscreen() { return isFullscreen; } |
39 | bool scaled() { return isScaled; } | 39 | bool scaled() { return isScaled; } |
40 | bool looping() { return isLooping; } | 40 | bool looping() { return isLooping; } |
41 | bool shuffled() { return isShuffled; } | 41 | bool shuffled() { return isShuffled; } |
42 | bool playlist() { return usePlaylist; } | 42 | bool playlist() { return usePlaylist; } |
43 | bool paused() { return isPaused; } | 43 | bool paused() { return isPaused; } |
44 | bool playing() { return isPlaying; } | 44 | bool playing() { return isPlaying; } |
45 | long position() { return curPosition; } | 45 | long position() { return curPosition; } |
46 | long length() { return curLength; } | 46 | long length() { return curLength; } |
47 | char view() { return curView; } | 47 | char view() { return curView; } |
48 | 48 | ||
49 | MediaPlayerDecoder *newDecoder( const QString& file ); | 49 | MediaPlayerDecoder *newDecoder( const QString& file ); |
50 | MediaPlayerDecoder *curDecoder(); | 50 | MediaPlayerDecoder *curDecoder(); |
51 | MediaPlayerDecoder *libMpeg3Decoder(); // ### Yucky hack needed to use libmpeg3plugin to get the | 51 | MediaPlayerDecoder *libMpeg3Decoder(); // ### Yucky hack needed to use libmpeg3plugin to get the |
52 | // number of audio samples if we are using the libmad plugin | 52 | // number of audio samples if we are using the libmad plugin |
53 | public slots: | 53 | public slots: |
54 | void setFullscreen( bool b ) { if ( isFullscreen == b ) return; isFullscreen = b; emit fullscreenToggled(b); } | 54 | void setFullscreen( bool b ) { if ( isFullscreen == b ) return; isFullscreen = b; emit fullscreenToggled(b); } |
55 | void setScaled( bool b ) { if ( isScaled == b ) return; isScaled = b; emit scaledToggled(b); } | 55 | void setScaled( bool b ) { if ( isScaled == b ) return; isScaled = b; emit scaledToggled(b); } |
56 | void setLooping( bool b ) { if ( isLooping == b ) return; isLooping = b; emit loopingToggled(b); } | 56 | void setLooping( bool b ) { if ( isLooping == b ) return; isLooping = b; emit loopingToggled(b); } |
57 | void setShuffled( bool b ) { if ( isShuffled == b ) return; isShuffled = b; emit shuffledToggled(b); } | 57 | void setShuffled( bool b ) { if ( isShuffled == b ) return; isShuffled = b; emit shuffledToggled(b); } |
58 | void setPlaylist( bool b ) { if ( usePlaylist == b ) return; usePlaylist = b; emit playlistToggled(b); } | 58 | void setPlaylist( bool b ) { if ( usePlaylist == b ) return; usePlaylist = b; emit playlistToggled(b); } |
59 | void setPaused( bool b ) { if ( isPaused == b ) return; isPaused = b; emit pausedToggled(b); } | 59 | void setPaused( bool b ) { if ( isPaused == b ) return; isPaused = b; emit pausedToggled(b); } |
60 | void setPlaying( bool b ) { if ( isPlaying == b ) return; isPlaying = b; emit playingToggled(b); } | 60 | void setPlaying( bool b ) { if ( isPlaying == b ) return; isPlaying = b; emit playingToggled(b); } |
61 | void setPosition( long p ) { if ( curPosition == p ) return; curPosition = p; emit positionChanged(p); } | 61 | void setPosition( long p ) { if ( curPosition == p ) return; curPosition = p; emit positionChanged(p); } |
62 | void updatePosition( long p ){ if ( curPosition == p ) return; curPosition = p; emit positionUpdated(p); } | 62 | void updatePosition( long p ){ if ( curPosition == p ) return; curPosition = p; emit positionUpdated(p); } |
63 | void setLength( long l ) { if ( curLength == l ) return; curLength = l; emit lengthChanged(l); } | 63 | void setLength( long l ) { if ( curLength == l ) return; curLength = l; emit lengthChanged(l); } |
64 | void setView( char v ) { if ( curView == v ) return; curView = v; emit viewChanged(v); } | 64 | void setView( char v ) { if ( curView == v ) return; curView = v; emit viewChanged(v); } |
65 | 65 | ||
66 | void setPrev() { emit prev(); } | 66 | void setPrev() { emit prev(); } |
67 | void setNext() { emit next(); } | 67 | void setNext() { emit next(); } |
68 | void setList() { setPlaying( FALSE ); setView('l'); } | 68 | void setList() { setPlaying( FALSE ); setView('l'); } |
69 | void setVideo() { setView('v'); } | 69 | void setVideo() { setView('v'); } |
70 | void setAudio() { setView('a'); } | 70 | void setAudio() { setView('a'); } |
71 | 71 | ||
72 | void toggleFullscreen() { setFullscreen( !isFullscreen ); } | 72 | void toggleFullscreen() { setFullscreen( !isFullscreen ); } |
73 | void toggleScaled() { setScaled( !isScaled); } | 73 | void toggleScaled() { setScaled( !isScaled); } |
74 | void toggleLooping() { setLooping( !isLooping); } | 74 | void toggleLooping() { setLooping( !isLooping); } |
75 | void toggleShuffled() { setShuffled( !isShuffled); } | 75 | void toggleShuffled() { setShuffled( !isShuffled); } |
76 | void togglePlaylist() { setPlaylist( !usePlaylist); } | 76 | void togglePlaylist() { setPlaylist( !usePlaylist); } |
77 | void togglePaused() { setPaused( !isPaused); } | 77 | void togglePaused() { setPaused( !isPaused); } |
78 | void togglePlaying() { setPlaying( !isPlaying); } | 78 | void togglePlaying() { setPlaying( !isPlaying); } |
79 | 79 | ||
80 | signals: | 80 | signals: |
81 | void fullscreenToggled( bool ); | 81 | void fullscreenToggled( bool ); |
82 | void scaledToggled( bool ); | 82 | void scaledToggled( bool ); |
83 | void loopingToggled( bool ); | 83 | void loopingToggled( bool ); |
84 | void shuffledToggled( bool ); | 84 | void shuffledToggled( bool ); |
85 | void playlistToggled( bool ); | 85 | void playlistToggled( bool ); |