author | simon <simon> | 2002-12-02 13:46:23 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-02 13:46:23 (UTC) |
commit | b992707037f3bbf4573c52b34b3d25cbbf07bad0 (patch) (unidiff) | |
tree | b5a5866cda4b3e059001e3159cdae374777d4a72 | |
parent | 6e883bf60ea91cc6b0624c7307edc27ea3db291b (diff) | |
download | opie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.zip opie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.tar.gz opie-b992707037f3bbf4573c52b34b3d25cbbf07bad0.tar.bz2 |
- made the accessor functions constant
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 26 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 26 |
2 files changed, 26 insertions, 26 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 0b33dfd..a80d8fd 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp | |||
@@ -79,82 +79,82 @@ void MediaPlayerState::readConfig( Config& cfg ) { | |||
79 | 79 | ||
80 | 80 | ||
81 | void MediaPlayerState::writeConfig( Config& cfg ) const { | 81 | void MediaPlayerState::writeConfig( Config& cfg ) const { |
82 | cfg.setGroup( "Options" ); | 82 | cfg.setGroup( "Options" ); |
83 | cfg.writeEntry( "FullScreen", isFullscreen ); | 83 | cfg.writeEntry( "FullScreen", isFullscreen ); |
84 | cfg.writeEntry( "Scaling", isScaled ); | 84 | cfg.writeEntry( "Scaling", isScaled ); |
85 | cfg.writeEntry( "Looping", isLooping ); | 85 | cfg.writeEntry( "Looping", isLooping ); |
86 | cfg.writeEntry( "Shuffle", isShuffled ); | 86 | cfg.writeEntry( "Shuffle", isShuffled ); |
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 | 91 | ||
92 | // public stuff | 92 | // public stuff |
93 | 93 | ||
94 | 94 | ||
95 | bool MediaPlayerState::streaming() { | 95 | bool MediaPlayerState::streaming() const { |
96 | return isStreaming; | 96 | return isStreaming; |
97 | } | 97 | } |
98 | 98 | ||
99 | bool MediaPlayerState::seekable() { | 99 | bool MediaPlayerState::seekable() const { |
100 | return isSeekable; | 100 | return isSeekable; |
101 | } | 101 | } |
102 | 102 | ||
103 | bool MediaPlayerState::fullscreen() { | 103 | bool MediaPlayerState::fullscreen() const { |
104 | return isFullscreen; | 104 | return isFullscreen; |
105 | } | 105 | } |
106 | 106 | ||
107 | bool MediaPlayerState::scaled() { | 107 | bool MediaPlayerState::scaled() const { |
108 | return isScaled; | 108 | return isScaled; |
109 | } | 109 | } |
110 | 110 | ||
111 | bool MediaPlayerState::looping() { | 111 | bool MediaPlayerState::looping() const { |
112 | return isLooping; | 112 | return isLooping; |
113 | } | 113 | } |
114 | 114 | ||
115 | bool MediaPlayerState::shuffled() { | 115 | bool MediaPlayerState::shuffled() const { |
116 | return isShuffled; | 116 | return isShuffled; |
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | bool MediaPlayerState::playlist() { | 120 | bool MediaPlayerState::playlist() const { |
121 | return usePlaylist; | 121 | return usePlaylist; |
122 | } | 122 | } |
123 | 123 | ||
124 | bool MediaPlayerState::paused() { | 124 | bool MediaPlayerState::paused() const { |
125 | return isPaused; | 125 | return isPaused; |
126 | } | 126 | } |
127 | 127 | ||
128 | bool MediaPlayerState::playing() { | 128 | bool MediaPlayerState::playing() const { |
129 | return isPlaying; | 129 | return isPlaying; |
130 | } | 130 | } |
131 | 131 | ||
132 | bool MediaPlayerState::stop() { | 132 | bool MediaPlayerState::stop() const { |
133 | return isStoped; | 133 | return isStoped; |
134 | } | 134 | } |
135 | 135 | ||
136 | long MediaPlayerState::position() { | 136 | long MediaPlayerState::position() const { |
137 | return curPosition; | 137 | return curPosition; |
138 | } | 138 | } |
139 | 139 | ||
140 | long MediaPlayerState::length() { | 140 | long MediaPlayerState::length() const { |
141 | return curLength; | 141 | return curLength; |
142 | } | 142 | } |
143 | 143 | ||
144 | char MediaPlayerState::view() { | 144 | char MediaPlayerState::view() const { |
145 | return curView; | 145 | return curView; |
146 | } | 146 | } |
147 | 147 | ||
148 | // slots | 148 | // slots |
149 | void MediaPlayerState::setIsStreaming( bool b ) { | 149 | void MediaPlayerState::setIsStreaming( bool b ) { |
150 | 150 | ||
151 | if ( isStreaming == b ) { | 151 | if ( isStreaming == b ) { |
152 | return; | 152 | return; |
153 | } | 153 | } |
154 | isStreaming = b; | 154 | isStreaming = b; |
155 | } | 155 | } |
156 | 156 | ||
157 | void MediaPlayerState::setIsSeekable( bool b ) { | 157 | void MediaPlayerState::setIsSeekable( bool b ) { |
158 | 158 | ||
159 | //if ( isSeekable == b ) { | 159 | //if ( isSeekable == b ) { |
160 | // return; | 160 | // return; |
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 154e3b0..f9c1eeb 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h | |||
@@ -37,45 +37,45 @@ | |||
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 | ||
43 | class MediaPlayerDecoder; | 43 | class MediaPlayerDecoder; |
44 | class Config; | 44 | class Config; |
45 | 45 | ||
46 | 46 | ||
47 | class MediaPlayerState : public QObject { | 47 | class MediaPlayerState : public QObject { |
48 | Q_OBJECT | 48 | Q_OBJECT |
49 | public: | 49 | public: |
50 | MediaPlayerState( QObject *parent, const char *name ); | 50 | MediaPlayerState( QObject *parent, const char *name ); |
51 | ~MediaPlayerState(); | 51 | ~MediaPlayerState(); |
52 | 52 | ||
53 | bool streaming(); | 53 | bool streaming() const; |
54 | bool seekable(); | 54 | bool seekable() const; |
55 | bool fullscreen(); | 55 | bool fullscreen() const; |
56 | bool scaled(); | 56 | bool scaled() const; |
57 | bool looping(); | 57 | bool looping() const; |
58 | bool shuffled(); | 58 | bool shuffled() const; |
59 | bool playlist(); | 59 | bool playlist() const; |
60 | bool paused(); | 60 | bool paused() const; |
61 | bool playing(); | 61 | bool playing() const; |
62 | bool stop(); | 62 | bool stop() const; |
63 | long position(); | 63 | long position() const; |
64 | long length(); | 64 | long length() const; |
65 | char view(); | 65 | char view() const; |
66 | 66 | ||
67 | public slots: | 67 | public slots: |
68 | void setIsStreaming( bool b ); | 68 | void setIsStreaming( bool b ); |
69 | void setIsSeekable( bool b ); | 69 | void setIsSeekable( bool b ); |
70 | void setFullscreen( bool b ); | 70 | void setFullscreen( bool b ); |
71 | void setScaled( bool b ); | 71 | void setScaled( bool b ); |
72 | void setLooping( bool b ); | 72 | void setLooping( bool b ); |
73 | void setShuffled( bool b ); | 73 | void setShuffled( bool b ); |
74 | void setPlaylist( bool b ); | 74 | void setPlaylist( bool b ); |
75 | void setPaused( bool b ); | 75 | void setPaused( bool b ); |
76 | void setPlaying( bool b ); | 76 | void setPlaying( bool b ); |
77 | void setStop( bool b ); | 77 | void setStop( bool b ); |
78 | void setPosition( long p ); | 78 | void setPosition( long p ); |
79 | void updatePosition( long p ); | 79 | void updatePosition( long p ); |
80 | void setLength( long l ); | 80 | void setLength( long l ); |
81 | void setView( char v ); | 81 | void setView( char v ); |