-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 57 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 26 |
2 files changed, 13 insertions, 70 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index 85d9bac..0d21027 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -59,121 +59,64 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) MediaPlayerState::~MediaPlayerState() { } void MediaPlayerState::readConfig( Config& cfg ) { cfg.setGroup("Options"); fullscreen = cfg.readBoolEntry( "FullScreen" ); scaled = cfg.readBoolEntry( "Scaling" ); looping = cfg.readBoolEntry( "Looping" ); shuffled = cfg.readBoolEntry( "Shuffle" ); usePlaylist = cfg.readBoolEntry( "UsePlayList" ); videoGamma = cfg.readNumEntry( "VideoGamma" ); usePlaylist = TRUE; playing = FALSE; streaming = FALSE; paused = FALSE; curPosition = 0; curLength = 0; curView = 'l'; } void MediaPlayerState::writeConfig( Config& cfg ) const { cfg.setGroup( "Options" ); cfg.writeEntry( "FullScreen", fullscreen ); cfg.writeEntry( "Scaling", scaled ); cfg.writeEntry( "Looping", looping ); cfg.writeEntry( "Shuffle", shuffled ); cfg.writeEntry( "UsePlayList", usePlaylist ); cfg.writeEntry( "VideoGamma", videoGamma ); } - -// public stuff - - -bool MediaPlayerState::isStreaming() const { - return streaming; -} - -bool MediaPlayerState::isSeekable() const { - return seekable; -} - -bool MediaPlayerState::isFullscreen() const { - return fullscreen; -} - -bool MediaPlayerState::isScaled() const { - return scaled; -} - -bool MediaPlayerState::isLooping() const { - return looping; -} - -bool MediaPlayerState::isShuffled() const { - return shuffled; -} - - -bool MediaPlayerState::isUsingPlaylist() const { - return usePlaylist; -} - -bool MediaPlayerState::isPaused() const { - return paused; -} - -bool MediaPlayerState::isPlaying() const { - return playing; -} - -bool MediaPlayerState::isStop() const { - return stoped; -} - -long MediaPlayerState::position() const { - return curPosition; -} - -long MediaPlayerState::length() const { - return curLength; -} - -char MediaPlayerState::view() const { - return curView; -} - // slots void MediaPlayerState::setIsStreaming( bool b ) { if ( streaming == b ) { return; } streaming = b; } void MediaPlayerState::setIsSeekable( bool b ) { //if ( isSeekable == b ) { // return; // } seekable = b; emit isSeekableToggled(b); } void MediaPlayerState::setFullscreen( bool b ) { if ( fullscreen == b ) { return; } fullscreen = b; emit fullscreenToggled(b); } void MediaPlayerState::setBlanked( bool b ) { if ( blanked == b ) { return; } diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 4e837e3..57189dd 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -21,77 +21,77 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // this file is based on work by trolltech #ifndef MEDIA_PLAYER_STATE_H #define MEDIA_PLAYER_STATE_H #include <qobject.h> class MediaPlayerDecoder; class Config; class MediaPlayerState : public QObject { Q_OBJECT public: MediaPlayerState( QObject *parent, const char *name ); ~MediaPlayerState(); - bool isStreaming() const; - bool isSeekable() const; - bool isFullscreen() const; - bool isScaled() const; - bool isLooping() const; - bool isShuffled() const; - bool isUsingPlaylist() const; - bool isPaused() const; - bool isPlaying() const; - bool isStop() const; - long position() const; - long length() const; - char view() const; + bool isStreaming() const { return streaming; } + bool isSeekable() const { return seekable; } + bool isFullscreen() const { return fullscreen; } + bool isScaled() const { return scaled; } + bool isLooping() const { return looping; } + bool isShuffled() const { return shuffled; } + bool isUsingPlaylist() const { return usePlaylist; } + bool isPaused() const { return paused; } + bool isPlaying() const { return playing; } + bool isStop() const { return stoped; } + long position() const { return curPosition; } + long length() const { return curLength; } + char view() const { return curView; } public slots: void setIsStreaming( bool b ); void setIsSeekable( bool b ); void setFullscreen( bool b ); void setScaled( bool b ); void setLooping( bool b ); void setShuffled( bool b ); void setPlaylist( bool b ); void setPaused( bool b ); void setPlaying( bool b ); void setStop( bool b ); void setPosition( long p ); void updatePosition( long p ); void setLength( long l ); void setView( char v ); void setBlanked( bool b ); void setVideoGamma( int v ); void setPrev(); void setNext(); void setList(); void setVideo(); void setAudio(); void toggleFullscreen(); void toggleScaled(); void toggleLooping(); void toggleShuffled(); void togglePlaylist(); void togglePaused(); void togglePlaying(); |