summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-08-15 20:23:51 (UTC)
committer llornkcor <llornkcor>2002-08-15 20:23:51 (UTC)
commit645183c07c68dd420b8565d809bfc0340fee0ff3 (patch) (unidiff)
tree9182788bf3149f8c6c60019018ebf29fb9d6ea17
parent8ec3adb6685ea2342024254052e2ba110c6bb88d (diff)
downloadopie-645183c07c68dd420b8565d809bfc0340fee0ff3.zip
opie-645183c07c68dd420b8565d809bfc0340fee0ff3.tar.gz
opie-645183c07c68dd420b8565d809bfc0340fee0ff3.tar.bz2
new play/pause
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp31
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h6
2 files changed, 23 insertions, 14 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 2cb1385..cc6187c 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -102,3 +102,2 @@ MediaButton audioButtons[] = {
102 { FALSE, FALSE, FALSE }, // stop 102 { FALSE, FALSE, FALSE }, // stop
103 { FALSE, FALSE, FALSE }, // pause
104 { FALSE, FALSE, FALSE }, // next 103 { FALSE, FALSE, FALSE }, // next
@@ -113,4 +112,4 @@ MediaButton audioButtons[] = {
113 112
114const char *skin_mask_file_names[11] = { 113const char *skin_mask_file_names[10] = {
115 "play", "stop", "pause", "next", "prev", "up", 114 "play", "stop", "next", "prev", "up",
116 "down", "loop", "playlist", "forward", "back" 115 "down", "loop", "playlist", "forward", "back"
@@ -147,3 +146,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
147 146
148 for ( int i = 0; i < 11; i++ ) { 147 for ( int i = 0; i < 10; i++ ) {
149 QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; 148 QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png";
@@ -164,3 +163,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
164 163
165 for ( int i = 0; i < 11; i++ ) { 164 for ( int i = 0; i < 10; i++ ) {
166 buttonPixUp[i] = NULL; 165 buttonPixUp[i] = NULL;
@@ -214,3 +213,3 @@ AudioWidget::~AudioWidget() {
214 213
215 for ( int i = 0; i < 11; i++ ) { 214 for ( int i = 0; i < 10; i++ ) {
216 delete buttonPixUp[i]; 215 delete buttonPixUp[i];
@@ -222,3 +221,3 @@ AudioWidget::~AudioWidget() {
222 delete imgButtonMask; 221 delete imgButtonMask;
223 for ( int i = 0; i < 11; i++ ) { 222 for ( int i = 0; i < 10; i++ ) {
224 delete masks[i]; 223 delete masks[i];
@@ -262,3 +261,3 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
262 261
263 for ( int i = 0; i < 11; i++ ) { 262 for ( int i = 0; i < 10; i++ ) {
264 if ( !masks[i]->isNull() ) { 263 if ( !masks[i]->isNull() ) {
@@ -429,3 +428,2 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
429 case AudioVolumeUp: 428 case AudioVolumeUp:
430 qDebug("more clicked");
431 emit moreClicked(); 429 emit moreClicked();
@@ -454,5 +452,16 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
454 switch (i) { 452 switch (i) {
455 case AudioPlay: mediaPlayerState->setPlaying(audioButtons[i].isDown); return; 453 case AudioPlay:
454 if( mediaPlayerState->isPaused ) {
455 setToggleButton( i, FALSE );
456 mediaPlayerState->setPaused( FALSE );
457 return;
458 } else if( !mediaPlayerState->isPaused ) {
459 setToggleButton( i, TRUE );
460 mediaPlayerState->setPaused( TRUE );
461 return;
462 } else {
463 // setToggleButton( i, TRUE );
464 // mediaPlayerState->setPlaying( videoButtons[i].isDown );
465 }
456 case AudioStop: mediaPlayerState->setPlaying(FALSE); return; 466 case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
457 case AudioPause: mediaPlayerState->setPaused( audioButtons[i].isDown); return;
458 case AudioNext: mediaPlayerState->setNext(); return; 467 case AudioNext: mediaPlayerState->setNext(); return;
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index e05188e..772d1d1 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -135,5 +135,5 @@ private:
135 QImage *imgButtonMask; 135 QImage *imgButtonMask;
136 QBitmap *masks[11]; 136 QBitmap *masks[10];
137 QPixmap *buttonPixUp[11]; 137 QPixmap *buttonPixUp[10];
138 QPixmap *buttonPixDown[11]; 138 QPixmap *buttonPixDown[10];
139 139