author | llornkcor <llornkcor> | 2002-04-21 17:51:24 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-04-21 17:51:24 (UTC) |
commit | 53a4a3f6398640d182a067a8ffef9b402cd35d7a (patch) (unidiff) | |
tree | 3c989e5ebde8cab36d0a089aa6d63e5e017c86d8 /core/multimedia/opieplayer/playlistwidget.cpp | |
parent | 746afd0d27f33eed5451b54819773cf055858964 (diff) | |
download | opie-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 (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
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 | ||
69 | extern AudioWidget *audioUI; | ||
70 | extern VideoWidget *videoUI; | ||
67 | extern MediaPlayerState *mediaPlayerState; | 71 | extern MediaPlayerState *mediaPlayerState; |
68 | 72 | ||
69 | // class myFileSelector { | 73 | // class myFileSelector { |
70 | 74 | ||
71 | // }; | 75 | // }; |
72 | class PlayListWidgetPrivate { | 76 | class 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() { | |||
737 | void PlayListWidget::removeSelected() { | 742 | void PlayListWidget::removeSelected() { |
738 | d->selectedFiles->removeSelected( ); | 743 | d->selectedFiles->removeSelected( ); |
739 | } | 744 | } |
740 | 745 | ||
741 | void PlayListWidget::playIt( QListViewItem *it) { | 746 | void 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 | ||
746 | void PlayListWidget::addToSelection( QListViewItem *it) { | 753 | void 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 | ||
880 | void PlayListWidget::playSelected() | 887 | void PlayListWidget::playSelected() |
881 | { | 888 | { |
882 | btnPlay( TRUE); | 889 | btnPlay( TRUE); |
890 | d->selectedFiles->unSelect(); | ||
883 | } | 891 | } |
884 | 892 | ||
885 | void PlayListWidget::playlistViewPressed( int mouse, QListViewItem *item, const QPoint& point, int i) | 893 | void 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 | |||
1051 | void 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 | } | ||