summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/mediaplayerstate.cpp
Unidiff
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 @@
44#include <assert.h> 44#include <assert.h>
45 45
46//#define MediaPlayerDebug(x) qDebug x 46//#define MediaPlayerDebug(x) qDebug x
47#define MediaPlayerDebug(x) 47#define MediaPlayerDebug(x)
48 48
49 49
50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) 50MediaPlayerState::MediaPlayerState( QObject *parent, const char *name )
51 : QObject( parent, name ) { 51 : QObject( parent, name ) {
52 Config cfg( "OpiePlayer" ); 52 Config cfg( "OpiePlayer" );
53 readConfig( cfg ); 53 readConfig( cfg );
54 streaming = false; 54 streaming = false;
55 seekable = true; 55 seekable = true;
56 backendInitialized = false;
56} 57}
57 58
58 59
59MediaPlayerState::~MediaPlayerState() { 60MediaPlayerState::~MediaPlayerState() {
60} 61}
61 62
62 63
63void MediaPlayerState::readConfig( Config& cfg ) { 64void MediaPlayerState::readConfig( Config& cfg ) {
64 cfg.setGroup("Options"); 65 cfg.setGroup("Options");
65 fullscreen = cfg.readBoolEntry( "FullScreen" ); 66 fullscreen = cfg.readBoolEntry( "FullScreen" );
66 scaled = cfg.readBoolEntry( "Scaling" ); 67 scaled = cfg.readBoolEntry( "Scaling" );
67 looping = cfg.readBoolEntry( "Looping" ); 68 looping = cfg.readBoolEntry( "Looping" );
@@ -76,24 +77,36 @@ void MediaPlayerState::readConfig( Config& cfg ) {
76} 77}
77 78
78 79
79void MediaPlayerState::writeConfig( Config& cfg ) const { 80void MediaPlayerState::writeConfig( Config& cfg ) const {
80 cfg.setGroup( "Options" ); 81 cfg.setGroup( "Options" );
81 cfg.writeEntry( "FullScreen", fullscreen ); 82 cfg.writeEntry( "FullScreen", fullscreen );
82 cfg.writeEntry( "Scaling", scaled ); 83 cfg.writeEntry( "Scaling", scaled );
83 cfg.writeEntry( "Looping", looping ); 84 cfg.writeEntry( "Looping", looping );
84 cfg.writeEntry( "Shuffle", shuffled ); 85 cfg.writeEntry( "Shuffle", shuffled );
85 cfg.writeEntry( "VideoGamma", videoGamma ); 86 cfg.writeEntry( "VideoGamma", videoGamma );
86} 87}
87 88
89bool MediaPlayerState::isInitialized() const
90{
91 return backendInitialized; // for now, more to come (skin stuff)
92}
93
94void MediaPlayerState::setBackendInitialized()
95{
96 assert( backendInitialized == false );
97 backendInitialized = true;
98 emit initialized();
99}
100
88MediaPlayerState::DisplayType MediaPlayerState::displayType() const 101MediaPlayerState::DisplayType MediaPlayerState::displayType() const
89{ 102{
90 return m_displayType; 103 return m_displayType;
91} 104}
92 105
93// slots 106// slots
94void MediaPlayerState::setIsStreaming( bool b ) { 107void MediaPlayerState::setIsStreaming( bool b ) {
95 streaming = b; 108 streaming = b;
96} 109}
97 110
98void MediaPlayerState::setIsSeekable( bool b ) { 111void MediaPlayerState::setIsSeekable( bool b ) {
99 seekable = b; 112 seekable = b;