summaryrefslogtreecommitdiff
Side-by-side diff
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[] = {
{ FALSE, FALSE, FALSE }, // stop
- { FALSE, FALSE, FALSE }, // pause
{ FALSE, FALSE, FALSE }, // next
@@ -113,4 +112,4 @@ MediaButton audioButtons[] = {
-const char *skin_mask_file_names[11] = {
- "play", "stop", "pause", "next", "prev", "up",
+const char *skin_mask_file_names[10] = {
+ "play", "stop", "next", "prev", "up",
"down", "loop", "playlist", "forward", "back"
@@ -147,3 +146,3 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
- for ( int i = 0; i < 11; i++ ) {
+ for ( int i = 0; i < 10; i++ ) {
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) :
- for ( int i = 0; i < 11; i++ ) {
+ for ( int i = 0; i < 10; i++ ) {
buttonPixUp[i] = NULL;
@@ -214,3 +213,3 @@ AudioWidget::~AudioWidget() {
- for ( int i = 0; i < 11; i++ ) {
+ for ( int i = 0; i < 10; i++ ) {
delete buttonPixUp[i];
@@ -222,3 +221,3 @@ AudioWidget::~AudioWidget() {
delete imgButtonMask;
- for ( int i = 0; i < 11; i++ ) {
+ for ( int i = 0; i < 10; i++ ) {
delete masks[i];
@@ -262,3 +261,3 @@ void AudioWidget::resizeEvent( QResizeEvent * ) {
- for ( int i = 0; i < 11; i++ ) {
+ for ( int i = 0; i < 10; i++ ) {
if ( !masks[i]->isNull() ) {
@@ -429,3 +428,2 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
case AudioVolumeUp:
- qDebug("more clicked");
emit moreClicked();
@@ -454,5 +452,16 @@ void AudioWidget::mouseMoveEvent( QMouseEvent *event ) {
switch (i) {
- case AudioPlay: mediaPlayerState->setPlaying(audioButtons[i].isDown); return;
+ case AudioPlay:
+ if( mediaPlayerState->isPaused ) {
+ setToggleButton( i, FALSE );
+ mediaPlayerState->setPaused( FALSE );
+ return;
+ } else if( !mediaPlayerState->isPaused ) {
+ setToggleButton( i, TRUE );
+ mediaPlayerState->setPaused( TRUE );
+ return;
+ } else {
+ // setToggleButton( i, TRUE );
+ // mediaPlayerState->setPlaying( videoButtons[i].isDown );
+ }
case AudioStop: mediaPlayerState->setPlaying(FALSE); return;
- case AudioPause: mediaPlayerState->setPaused( audioButtons[i].isDown); return;
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:
QImage *imgButtonMask;
- QBitmap *masks[11];
- QPixmap *buttonPixUp[11];
- QPixmap *buttonPixDown[11];
+ QBitmap *masks[10];
+ QPixmap *buttonPixUp[10];
+ QPixmap *buttonPixDown[10];