summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h
index 9474882..05264cf 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.h
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h
@@ -1,143 +1,143 @@
1/* 1/*
2                This file is part of the Opie Project 2                This file is part of the Opie Project
3 3
4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org> 4              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com> 5 Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org> 6 Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
7 =. 7 =.
8 .=l. 8 .=l.
9           .>+-= 9           .>+-=
10 _;:,     .>    :=|. This program is free software; you can 10 _;:,     .>    :=|. This program is free software; you can
11.> <`_,   >  .   <= redistribute it and/or modify it under 11.> <`_,   >  .   <= redistribute it and/or modify it under
12:`=1 )Y*s>-.--   : the terms of the GNU General Public 12:`=1 )Y*s>-.--   : the terms of the GNU General Public
13.="- .-=="i,     .._ License as published by the Free Software 13.="- .-=="i,     .._ License as published by the Free Software
14 - .   .-<_>     .<> Foundation; either version 2 of the License, 14 - .   .-<_>     .<> Foundation; either version 2 of the License,
15     ._= =}       : or (at your option) any later version. 15     ._= =}       : or (at your option) any later version.
16    .%`+i>       _;_. 16    .%`+i>       _;_.
17    .i_,=:_.      -<s. This program is distributed in the hope that 17    .i_,=:_.      -<s. This program is distributed in the hope that
18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 18     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
19    : ..    .:,     . . . without even the implied warranty of 19    : ..    .:,     . . . without even the implied warranty of
20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 20    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 21  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
22..}^=.=       =       ; General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
28 If not, write to the Free Software Foundation, 28 If not, write to the Free Software Foundation,
29 Inc., 59 Temple Place - Suite 330, 29 Inc., 59 Temple Place - Suite 330,
30 Boston, MA 02111-1307, USA. 30 Boston, MA 02111-1307, USA.
31 31
32*/ 32*/
33 33
34// this file is based on work by trolltech 34// this file is based on work by trolltech
35 35
36#ifndef MEDIA_PLAYER_STATE_H 36#ifndef MEDIA_PLAYER_STATE_H
37#define MEDIA_PLAYER_STATE_H 37#define MEDIA_PLAYER_STATE_H
38 38
39 39
40#include <qobject.h> 40#include <qobject.h>
41 41
42 42
43class MediaPlayerDecoder; 43class MediaPlayerDecoder;
44class Config; 44class Config;
45 45
46 46
47class MediaPlayerState : public QObject { 47class MediaPlayerState : public QObject {
48Q_OBJECT 48Q_OBJECT
49public: 49public:
50 enum MediaType { Audio, Video }; 50 enum MediaType { Audio, Video };
51 51
52 MediaPlayerState( QObject *parent, const char *name ); 52 MediaPlayerState( QObject *parent, const char *name );
53 ~MediaPlayerState(); 53 ~MediaPlayerState();
54 54
55 bool isStreaming() const { return streaming; } 55 bool isStreaming() const { return streaming; }
56 bool isSeekable() const { return seekable; } 56 bool isSeekable() const { return seekable; }
57 bool isFullscreen() const { return fullscreen; } 57 bool isFullscreen() const { return fullscreen; }
58 bool isScaled() const { return scaled; } 58 bool isScaled() const { return scaled; }
59 bool isLooping() const { return looping; } 59 bool isLooping() const { return looping; }
60 bool isShuffled() const { return shuffled; } 60 bool isShuffled() const { return shuffled; }
61 bool isPaused() const { return paused; } 61 bool isPaused() const { return paused; }
62 bool isPlaying() const { return playing; } 62 bool isPlaying() const { return playing; }
63 bool isStopped() const { return stopped; } 63 bool isStopped() const { return stopped; }
64 long position() const { return curPosition; } 64 long position() const { return curPosition; }
65 long length() const { return curLength; } 65 long length() const { return curLength; }
66 char view() const { return curView; } 66 char view() const { return curView; }
67 MediaType mediaType() const; 67 MediaType mediaType() const;
68 68
69public slots: 69public slots:
70 void setIsStreaming( bool b ); 70 void setIsStreaming( bool b );
71 void setIsSeekable( bool b ); 71 void setIsSeekable( bool b );
72 void setFullscreen( bool b ); 72 void setFullscreen( bool b );
73 void setScaled( bool b ); 73 void setScaled( bool b );
74 void setLooping( bool b ); 74 void setLooping( bool b );
75 void setShuffled( bool b ); 75 void setShuffled( bool b );
76 void setPaused( bool b ); 76 void setPaused( bool b );
77 void setPlaying( bool b ); 77 void setPlaying( bool b );
78 void setStopped( bool b ); 78 void setStopped( bool b );
79 void setPosition( long p ); 79 void setPosition( long p );
80 void updatePosition( long p ); 80 void updatePosition( long p );
81 void setLength( long l ); 81 void setLength( long l );
82 void setView( char v ); 82 void setView( char v );
83 void setBlanked( bool b ); 83 void setBlanked( bool b );
84 void setVideoGamma( int v ); 84 void setVideoGamma( int v );
85 85
86 void setPrev(); 86 void setPrev();
87 void setNext(); 87 void setNext();
88 void setList(); 88 void setList();
89 void setVideo(); 89 void setVideo();
90 void setAudio(); 90 void setAudio();
91 91
92 void toggleFullscreen(); 92 void toggleFullscreen();
93 void toggleScaled(); 93 void toggleScaled();
94 void toggleLooping(); 94 void toggleLooping();
95 void toggleShuffled(); 95 void toggleShuffled();
96 void togglePaused(); 96 void togglePaused();
97 void togglePlaying(); 97 void togglePlaying();
98 void toggleBlank(); 98 void toggleBlank();
99 void writeConfig( Config& cfg ) const; 99 void writeConfig( Config& cfg ) const;
100 100
101 101
102signals: 102signals:
103 void fullscreenToggled( bool ); 103 void fullscreenToggled( bool );
104 void scaledToggled( bool ); 104 void scaledToggled( bool );
105 void loopingToggled( bool ); 105 void loopingToggled( bool );
106 void shuffledToggled( bool ); 106 void shuffledToggled( bool );
107 void pausedToggled( bool ); 107 void pausedToggled( bool );
108 void playingToggled( bool ); 108 void playingToggled( bool );
109 void stopToggled( bool ); 109 void stopToggled( bool );
110 void positionChanged( long ); // When the slider is moved 110 void positionChanged( long ); // When the slider is moved
111 void positionUpdated( long ); // When the media file progresses 111 void positionUpdated( long ); // When the media file progresses
112 void lengthChanged( long ); 112 void lengthChanged( long );
113 void viewChanged( char ); 113 void viewChanged( char );
114 void mediaTypeChanged( MediaType type ); 114 void mediaTypeChanged( MediaPlayerState::MediaType type );
115 void isSeekableToggled( bool ); 115 void isSeekableToggled( bool );
116 void blankToggled( bool ); 116 void blankToggled( bool );
117 void videoGammaChanged( int ); 117 void videoGammaChanged( int );
118 void prev(); 118 void prev();
119 void next(); 119 void next();
120 120
121private: 121private:
122 bool streaming : 1; 122 bool streaming : 1;
123 bool seekable : 1; 123 bool seekable : 1;
124 bool fullscreen: 1; 124 bool fullscreen: 1;
125 bool scaled : 1; 125 bool scaled : 1;
126 bool blanked : 1; 126 bool blanked : 1;
127 bool looping : 1; 127 bool looping : 1;
128 bool shuffled : 1; 128 bool shuffled : 1;
129 bool usePlaylist : 1; 129 bool usePlaylist : 1;
130 bool paused : 1; 130 bool paused : 1;
131 bool playing : 1; 131 bool playing : 1;
132 bool stopped : 1; 132 bool stopped : 1;
133 long curPosition; 133 long curPosition;
134 long curLength; 134 long curLength;
135 char curView; 135 char curView;
136 int videoGamma; 136 int videoGamma;
137 void readConfig( Config& cfg ); 137 void readConfig( Config& cfg );
138 138
139}; 139};
140 140
141 141
142#endif // MEDIA_PLAYER_STATE_H 142#endif // MEDIA_PLAYER_STATE_H
143 143