summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-04-21 17:51:24 (UTC)
committer llornkcor <llornkcor>2002-04-21 17:51:24 (UTC)
commit53a4a3f6398640d182a067a8ffef9b402cd35d7a (patch) (unidiff)
tree3c989e5ebde8cab36d0a089aa6d63e5e017c86d8
parent746afd0d27f33eed5451b54819773cf055858964 (diff)
downloadopie-53a4a3f6398640d182a067a8ffef9b402cd35d7a.zip
opie-53a4a3f6398640d182a067a8ffef9b402cd35d7a.tar.gz
opie-53a4a3f6398640d182a067a8ffef9b402cd35d7a.tar.bz2
added f9= hide/show audio widget, f10= hide/show video widget, fixed laylist stuff, and fixed slier for the last time
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/audiowidget.cpp32
-rw-r--r--core/multimedia/opieplayer/audiowidget.h2
-rw-r--r--core/multimedia/opieplayer/loopcontrol.cpp3
-rw-r--r--core/multimedia/opieplayer/mediaplayer.cpp3
-rw-r--r--core/multimedia/opieplayer/mediaplayer.h1
-rw-r--r--core/multimedia/opieplayer/mediaplayerstate.cpp12
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp28
-rw-r--r--core/multimedia/opieplayer/playlistwidget.h2
-rw-r--r--core/multimedia/opieplayer/videowidget.cpp1
9 files changed, 65 insertions, 19 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp
index e2e3603..94b979f 100644
--- a/core/multimedia/opieplayer/audiowidget.cpp
+++ b/core/multimedia/opieplayer/audiowidget.cpp
@@ -22,12 +22,13 @@
22 22
23#include <qwidget.h> 23#include <qwidget.h>
24#include <qpixmap.h> 24#include <qpixmap.h>
25#include <qbutton.h> 25#include <qbutton.h>
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qframe.h> 27#include <qframe.h>
28#include <qlayout.h>
28 29
29#include "audiowidget.h" 30#include "audiowidget.h"
30#include "mediaplayerstate.h" 31#include "mediaplayerstate.h"
31 32
32extern MediaPlayerState *mediaPlayerState; 33extern MediaPlayerState *mediaPlayerState;
33 34
@@ -60,32 +61,38 @@ MediaButton audioButtons[] = {
60static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); 61static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton));
61 62
62 63
63AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : 64AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
64 QWidget( parent, name, f ) 65 QWidget( parent, name, f )
65{ 66{
66// QPEApplication::grabKeyboard();
67 setCaption( tr("OpiePlayer") ); 67 setCaption( tr("OpiePlayer") );
68
69// QGridLayout *layout = new QGridLayout( this );
70// layout->setSpacing( 2);
71// layout->setMargin( 2);
72
68 setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); 73 setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) );
69 pixmaps[0] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsAll" ) ); 74 pixmaps[0] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsAll" ) );
70 pixmaps[1] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsBig" ) ); 75 pixmaps[1] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButtonsBig" ) );
71 pixmaps[2] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaControls" ) ); 76 pixmaps[2] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaControls" ) );
72 pixmaps[3] = new QPixmap( Resource::loadPixmap( "opieplayer/animatedButton" ) ); 77 pixmaps[3] = new QPixmap( Resource::loadPixmap( "opieplayer/animatedButton" ) );
73 78
74 songInfo = new Ticker( this ); 79 songInfo = new Ticker( this );
75 songInfo->setFocusPolicy( QWidget::NoFocus ); 80 songInfo->setFocusPolicy( QWidget::NoFocus );
76 songInfo->setGeometry( QRect( 7, 3, 220, 20 ) ); 81 songInfo->setGeometry( QRect( 7, 3, 220, 20 ) );
77 82// layout->addMultiCellWidget( songInfo, 0, 0, 0, 2 );
83
78 slider = new QSlider( Qt::Horizontal, this ); 84 slider = new QSlider( Qt::Horizontal, this );
79 slider->setFixedWidth( 220 ); 85 slider->setFixedWidth( 220 );
80 slider->setFixedHeight( 20 ); 86 slider->setFixedHeight( 20 );
81 slider->setMinValue( 0 ); 87 slider->setMinValue( 0 );
82 slider->setMaxValue( 1 ); 88 slider->setMaxValue( 1 );
83 slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); 89 slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) );
84 slider->setFocusPolicy( QWidget::NoFocus ); 90 slider->setFocusPolicy( QWidget::NoFocus );
85 slider->setGeometry( QRect( 7, 262, 220, 20 ) ); 91 slider->setGeometry( QRect( 7, 262, 220, 20 ) );
92 // layout->addMultiCellWidget( slider, 4, 4, 0, 2 );
86 93
87 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) ); 94 connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
88 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) ); 95 connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
89 96
90 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) ); 97 connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
91 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) ); 98 connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
@@ -101,12 +108,13 @@ AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) :
101 setPlaying( mediaPlayerState->playing() ); 108 setPlaying( mediaPlayerState->playing() );
102 109
103} 110}
104 111
105 112
106AudioWidget::~AudioWidget() { 113AudioWidget::~AudioWidget() {
114 mediaPlayerState->isStreaming = FALSE;
107 for ( int i = 0; i < 4; i++ ) 115 for ( int i = 0; i < 4; i++ )
108 delete pixmaps[i]; 116 delete pixmaps[i];
109} 117}
110 118
111 119
112static bool audioSliderBeingMoved = FALSE; 120static bool audioSliderBeingMoved = FALSE;
@@ -134,30 +142,32 @@ void AudioWidget::setPosition( long i ) {
134void AudioWidget::setLength( long max ) { 142void AudioWidget::setLength( long max ) {
135 updateSlider( mediaPlayerState->position(), max ); 143 updateSlider( mediaPlayerState->position(), max );
136} 144}
137 145
138 146
139void AudioWidget::setView( char view ) { 147void AudioWidget::setView( char view ) {
148
140 if (mediaPlayerState->isStreaming) { 149 if (mediaPlayerState->isStreaming) {
141 if( !slider->isHidden()) slider->hide(); 150 if( !slider->isHidden()) slider->hide();
142 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 151 disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
143 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 152 disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
144 } else { 153 } else {
145// this stops the slider from being moved, thus 154// this stops the slider from being moved, thus
146 // does not stop stream when it reaches the end 155 // does not stop stream when it reaches the end
147 if( slider->isHidden()) slider->show(); 156 slider->show();
148 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) ); 157 connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
149 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) ); 158 connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
150 } 159 }
151 160
152 if ( view == 'a' ) { 161 if ( view == 'a' ) {
153 startTimer( 150 ); 162 startTimer( 150 );
154 showMaximized(); 163// show();
164 showMaximized();
155 } else { 165 } else {
156 killTimers(); 166 killTimers();
157 hide(); 167 hide();
158 } 168 }
159} 169}
160 170
161 171
162void AudioWidget::updateSlider( long i, long max ) { 172void AudioWidget::updateSlider( long i, long max ) {
163 if ( max == 0 ) 173 if ( max == 0 )
@@ -287,20 +297,24 @@ void AudioWidget::closeEvent( QCloseEvent* ) {
287void AudioWidget::paintEvent( QPaintEvent * ) { 297void AudioWidget::paintEvent( QPaintEvent * ) {
288 QPainter p( this ); 298 QPainter p( this );
289 for ( int i = 0; i < numButtons; i++ ) 299 for ( int i = 0; i < numButtons; i++ )
290 paintButton( &p, i ); 300 paintButton( &p, i );
291} 301}
292 302
293 303void AudioWidget::showMe() {
304 show();
305}
294void AudioWidget::keyReleaseEvent( QKeyEvent *e) 306void AudioWidget::keyReleaseEvent( QKeyEvent *e)
295{ 307{
296 switch ( e->key() ) { 308 switch ( e->key() ) {
297////////////////////////////// Zaurus keys 309////////////////////////////// Zaurus keys
298 case Key_Home: 310 case Key_Home:
299 break; 311 break;
300 case Key_F9: //activity 312 case Key_F9: //activity
313 hide();
314// qDebug("Audio F9");
301 break; 315 break;
302 case Key_F10: //contacts 316 case Key_F10: //contacts
303 break; 317 break;
304 case Key_F11: //menu 318 case Key_F11: //menu
305 break; 319 break;
306 case Key_F12: //home 320 case Key_F12: //home
diff --git a/core/multimedia/opieplayer/audiowidget.h b/core/multimedia/opieplayer/audiowidget.h
index 4ffd167..41ae4b6 100644
--- a/core/multimedia/opieplayer/audiowidget.h
+++ b/core/multimedia/opieplayer/audiowidget.h
@@ -127,13 +127,13 @@ protected:
127 void mouseMoveEvent( QMouseEvent *event ); 127 void mouseMoveEvent( QMouseEvent *event );
128 void mousePressEvent( QMouseEvent *event ); 128 void mousePressEvent( QMouseEvent *event );
129 void mouseReleaseEvent( QMouseEvent *event ); 129 void mouseReleaseEvent( QMouseEvent *event );
130 void timerEvent( QTimerEvent *event ); 130 void timerEvent( QTimerEvent *event );
131 void closeEvent( QCloseEvent *event ); 131 void closeEvent( QCloseEvent *event );
132 void keyReleaseEvent( QKeyEvent *e); 132 void keyReleaseEvent( QKeyEvent *e);
133 133 void showMe();
134private: 134private:
135 void toggleButton( int ); 135 void toggleButton( int );
136 void setToggleButton( int, bool ); 136 void setToggleButton( int, bool );
137 void paintButton( QPainter *p, int i ); 137 void paintButton( QPainter *p, int i );
138 QPixmap *pixmaps[4]; 138 QPixmap *pixmaps[4];
139 Ticker *songInfo; 139 Ticker *songInfo;
diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp
index 7005886..faa8e56 100644
--- a/core/multimedia/opieplayer/loopcontrol.cpp
+++ b/core/multimedia/opieplayer/loopcontrol.cpp
@@ -432,15 +432,12 @@ bool LoopControl::init( const QString& filename ) {
432 432
433 } 433 }
434 434
435 current_frame = 0; 435 current_frame = 0;
436 prev_frame = -1; 436 prev_frame = -1;
437 437
438 if( fileName.left(7) == "http://")
439 mediaPlayerState->isStreaming = TRUE;
440
441 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) ); 438 connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) );
442 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) ); 439 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) );
443 440
444 audioMutex->unlock(); 441 audioMutex->unlock();
445 442
446 return TRUE; 443 return TRUE;
diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp
index e0c4dba..ab46a7d 100644
--- a/core/multimedia/opieplayer/mediaplayer.cpp
+++ b/core/multimedia/opieplayer/mediaplayer.cpp
@@ -42,12 +42,13 @@ extern PlayListWidget *playList;
42extern LoopControl *loopControl; 42extern LoopControl *loopControl;
43extern MediaPlayerState *mediaPlayerState; 43extern MediaPlayerState *mediaPlayerState;
44 44
45 45
46MediaPlayer::MediaPlayer( QObject *parent, const char *name ) 46MediaPlayer::MediaPlayer( QObject *parent, const char *name )
47 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { 47 : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
48 QPEApplication::grabKeyboard();
48 49
49 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); 50 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
50 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); 51 connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
51 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); 52 connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
52 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); 53 connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
53 54
@@ -56,12 +57,14 @@ MediaPlayer::MediaPlayer( QObject *parent, const char *name )
56 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); 57 connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
57 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); 58 connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
58} 59}
59 60
60 61
61MediaPlayer::~MediaPlayer() { 62MediaPlayer::~MediaPlayer() {
63 QPEApplication::grabKeyboard();
64 QPEApplication::ungrabKeyboard();
62} 65}
63 66
64 67
65void MediaPlayer::pauseCheck( bool b ) { 68void MediaPlayer::pauseCheck( bool b ) {
66 // Only pause if playing 69 // Only pause if playing
67 if ( b && !mediaPlayerState->playing() ) 70 if ( b && !mediaPlayerState->playing() )
diff --git a/core/multimedia/opieplayer/mediaplayer.h b/core/multimedia/opieplayer/mediaplayer.h
index d6e90cb..0354d21 100644
--- a/core/multimedia/opieplayer/mediaplayer.h
+++ b/core/multimedia/opieplayer/mediaplayer.h
@@ -44,12 +44,13 @@ private slots:
44 void startIncreasingVolume(); 44 void startIncreasingVolume();
45 void startDecreasingVolume(); 45 void startDecreasingVolume();
46 void stopChangingVolume(); 46 void stopChangingVolume();
47 47
48protected: 48protected:
49 void timerEvent( QTimerEvent *e ); 49 void timerEvent( QTimerEvent *e );
50// void keyReleaseEvent( QKeyEvent *e);
50 51
51private: 52private:
52 int volumeDirection; 53 int volumeDirection;
53 const DocLnk *currentFile; 54 const DocLnk *currentFile;
54}; 55};
55 56
diff --git a/core/multimedia/opieplayer/mediaplayerstate.cpp b/core/multimedia/opieplayer/mediaplayerstate.cpp
index 4e14436..3ac9ac4 100644
--- a/core/multimedia/opieplayer/mediaplayerstate.cpp
+++ b/core/multimedia/opieplayer/mediaplayerstate.cpp
@@ -95,17 +95,21 @@ static QValueList<MediaPlayerPlugin> pluginList;
95 95
96// Find the first decoder which supports this type of file 96// Find the first decoder which supports this type of file
97MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) { 97MediaPlayerDecoder *MediaPlayerState::newDecoder( const QString& file ) {
98 MediaPlayerDecoder *tmpDecoder = NULL; 98 MediaPlayerDecoder *tmpDecoder = NULL;
99 QValueList<MediaPlayerPlugin>::Iterator it; 99 QValueList<MediaPlayerPlugin>::Iterator it;
100 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) { 100 for ( it = pluginList.begin(); it != pluginList.end(); ++it ) {
101 if ( (*it).decoder->isFileSupported( file ) ) { 101 if ( (*it).decoder->isFileSupported( file ) ) {
102 tmpDecoder = (*it).decoder; 102 tmpDecoder = (*it).decoder;
103 break; 103 break;
104 } 104 }
105 } 105 }
106 if(file.left(4)=="http")
107 isStreaming = TRUE;
108 else
109 isStreaming = FALSE;
106 return decoder = tmpDecoder; 110 return decoder = tmpDecoder;
107} 111}
108 112
109 113
110MediaPlayerDecoder *MediaPlayerState::curDecoder() { 114MediaPlayerDecoder *MediaPlayerState::curDecoder() {
111 return decoder; 115 return decoder;
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 7c76400..faa6e3f 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -56,17 +56,21 @@
56#include "playlistwidget.h" 56#include "playlistwidget.h"
57#include "mediaplayerstate.h" 57#include "mediaplayerstate.h"
58 58
59#include "inputDialog.h" 59#include "inputDialog.h"
60 60
61#include <stdlib.h> 61#include <stdlib.h>
62#include "audiowidget.h"
63#include "videowidget.h"
62 64
63#define BUTTONS_ON_TOOLBAR 65#define BUTTONS_ON_TOOLBAR
64#define SIDE_BUTTONS 66#define SIDE_BUTTONS
65#define CAN_SAVE_LOAD_PLAYLISTS 67#define CAN_SAVE_LOAD_PLAYLISTS
66 68
69extern AudioWidget *audioUI;
70extern VideoWidget *videoUI;
67extern MediaPlayerState *mediaPlayerState; 71extern MediaPlayerState *mediaPlayerState;
68 72
69// class myFileSelector { 73// class myFileSelector {
70 74
71// }; 75// };
72class PlayListWidgetPrivate { 76class PlayListWidgetPrivate {
@@ -198,13 +202,14 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
198 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); 202 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton );
199 203
200 d->selectedFiles = new PlayListSelection( hbox2); 204 d->selectedFiles = new PlayListSelection( hbox2);
201 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); 205 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton );
202 206
203 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); 207 QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold);
204 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 208
209 connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
205 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); 210 this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) );
206 211
207 212
208 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch 213 QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch
209 new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) ); 214 new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) );
210 new ToolButton( vbox1, tr( "Remove" ), "opieplayer/cut", d->selectedFiles, SLOT(removeSelected()) ); 215 new ToolButton( vbox1, tr( "Remove" ), "opieplayer/cut", d->selectedFiles, SLOT(removeSelected()) );
@@ -737,13 +742,15 @@ void PlayListWidget::addSelected() {
737void PlayListWidget::removeSelected() { 742void PlayListWidget::removeSelected() {
738 d->selectedFiles->removeSelected( ); 743 d->selectedFiles->removeSelected( );
739} 744}
740 745
741void PlayListWidget::playIt( QListViewItem *it) { 746void PlayListWidget::playIt( QListViewItem *it) {
742// d->setDocumentUsed = FALSE; 747// d->setDocumentUsed = FALSE;
748 mediaPlayerState->setPlaying(FALSE);
743 mediaPlayerState->setPlaying(TRUE); 749 mediaPlayerState->setPlaying(TRUE);
750 d->selectedFiles->unSelect();
744} 751}
745 752
746void PlayListWidget::addToSelection( QListViewItem *it) { 753void PlayListWidget::addToSelection( QListViewItem *it) {
747 d->setDocumentUsed = FALSE; 754 d->setDocumentUsed = FALSE;
748 755
749 if(it) { 756 if(it) {
@@ -877,18 +884,20 @@ void PlayListWidget::viewPressed( int mouse, QListViewItem *item, const QPoint&
877 }; 884 };
878} 885}
879 886
880void PlayListWidget::playSelected() 887void PlayListWidget::playSelected()
881{ 888{
882 btnPlay( TRUE); 889 btnPlay( TRUE);
890 d->selectedFiles->unSelect();
883} 891}
884 892
885void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) 893void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *item, const QPoint& point, int i)
886{ 894{
887 switch (mouse) { 895 switch (mouse) {
888 case 1: 896 case 1:
897
889 break; 898 break;
890 case 2:{ 899 case 2:{
891 QPopupMenu m; 900 QPopupMenu m;
892 m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() )); 901 m.insertItem( tr( "Play Selected" ), this, SLOT( playSelected() ));
893 m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() )); 902 m.insertItem( tr( "Remove" ), this, SLOT( removeSelected() ));
894// m.insertSeparator(); 903// m.insertSeparator();
@@ -1035,6 +1044,23 @@ void PlayListWidget::openFile() {
1035// delete fileDlg2; 1044// delete fileDlg2;
1036 } 1045 }
1037 1046
1038 if(fileDlg) 1047 if(fileDlg)
1039 delete fileDlg; 1048 delete fileDlg;
1040} 1049}
1050
1051void PlayListWidget::keyReleaseEvent( QKeyEvent *e)
1052{
1053 switch ( e->key() ) {
1054////////////////////////////// Zaurus keys
1055 case Key_F9: //activity
1056 if(audioUI->isHidden())
1057 audioUI->showMaximized();
1058 break;
1059 case Key_F10: //contacts
1060 if( videoUI->isHidden())
1061 videoUI->showMaximized();
1062
1063 break;
1064
1065 }
1066}
diff --git a/core/multimedia/opieplayer/playlistwidget.h b/core/multimedia/opieplayer/playlistwidget.h
index 02cdba6..16b9905 100644
--- a/core/multimedia/opieplayer/playlistwidget.h
+++ b/core/multimedia/opieplayer/playlistwidget.h
@@ -64,13 +64,13 @@ public slots:
64 bool prev(); 64 bool prev();
65/* void setFullScreen(); */ 65/* void setFullScreen(); */
66/* void setScaled(); */ 66/* void setScaled(); */
67protected: 67protected:
68/* void contentsMousePressEvent( QMouseEvent * e ); */ 68/* void contentsMousePressEvent( QMouseEvent * e ); */
69/* void contentsMouseReleaseEvent( QMouseEvent * e ); */ 69/* void contentsMouseReleaseEvent( QMouseEvent * e ); */
70 70void keyReleaseEvent( QKeyEvent *e);
71private: 71private:
72 void initializeStates(); 72 void initializeStates();
73 void readConfig( Config& cfg ); 73 void readConfig( Config& cfg );
74 void writeConfig( Config& cfg ) const; 74 void writeConfig( Config& cfg ) const;
75 PlayListWidgetPrivate *d; // Private implementation data 75 PlayListWidgetPrivate *d; // Private implementation data
76 void populateAudioView(); 76 void populateAudioView();
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp
index 70b4a95..d0cb764 100644
--- a/core/multimedia/opieplayer/videowidget.cpp
+++ b/core/multimedia/opieplayer/videowidget.cpp
@@ -429,12 +429,13 @@ void VideoWidget::keyReleaseEvent( QKeyEvent *e)
429////////////////////////////// Zaurus keys 429////////////////////////////// Zaurus keys
430 case Key_Home: 430 case Key_Home:
431 break; 431 break;
432 case Key_F9: //activity 432 case Key_F9: //activity
433 break; 433 break;
434 case Key_F10: //contacts 434 case Key_F10: //contacts
435 hide();
435 break; 436 break;
436 case Key_F11: //menu 437 case Key_F11: //menu
437 break; 438 break;
438 case Key_F12: //home 439 case Key_F12: //home
439 break; 440 break;
440 case Key_F13: //mail 441 case Key_F13: //mail