summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
authorsimon <simon>2002-12-11 00:03:47 (UTC)
committer simon <simon>2002-12-11 00:03:47 (UTC)
commite9d1213578b83f8380c4681186246a2b32ae6375 (patch) (side-by-side diff)
tree8d18cd8172ff45c85c8438cf5f16d630a7bb5aeb /noncore/multimedia/opieplayer2/mediaplayerstate.cpp
parent7f4bd526d59aacbf750e9ee58337b6cf640ba28b (diff)
downloadopie-e9d1213578b83f8380c4681186246a2b32ae6375.zip
opie-e9d1213578b83f8380c4681186246a2b32ae6375.tar.gz
opie-e9d1213578b83f8380c4681186246a2b32ae6375.tar.bz2
- added initialize states to MediaPlayerState
- the play button is now of type PlayButton, inheritting from ToolButton and checking the media player initialization state in setEnabled
Diffstat (limited to 'noncore/multimedia/opieplayer2/mediaplayerstate.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayerstate.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
index 40fa1a4..d54d870 100644
--- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
@@ -44,24 +44,25 @@
#include <assert.h>
//#define MediaPlayerDebug(x) qDebug x
#define MediaPlayerDebug(x)
MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
: QObject( parent, name ) {
Config cfg( "OpiePlayer" );
readConfig( cfg );
streaming = false;
seekable = true;
+ backendInitialized = false;
}
MediaPlayerState::~MediaPlayerState() {
}
void MediaPlayerState::readConfig( Config& cfg ) {
cfg.setGroup("Options");
fullscreen = cfg.readBoolEntry( "FullScreen" );
scaled = cfg.readBoolEntry( "Scaling" );
looping = cfg.readBoolEntry( "Looping" );
@@ -76,24 +77,36 @@ void MediaPlayerState::readConfig( Config& cfg ) {
}
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( "VideoGamma", videoGamma );
}
+bool MediaPlayerState::isInitialized() const
+{
+ return backendInitialized; // for now, more to come (skin stuff)
+}
+
+void MediaPlayerState::setBackendInitialized()
+{
+ assert( backendInitialized == false );
+ backendInitialized = true;
+ emit initialized();
+}
+
MediaPlayerState::DisplayType MediaPlayerState::displayType() const
{
return m_displayType;
}
// slots
void MediaPlayerState::setIsStreaming( bool b ) {
streaming = b;
}
void MediaPlayerState::setIsSeekable( bool b ) {
seekable = b;