Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 5fc0c39..293bf45 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -28,57 +28,45 @@ | |||
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <qpe/qpemenubar.h> | 34 | |
35 | #include <qpe/qpetoolbar.h> | 35 | #include <qtoolbar.h> |
36 | #include <qpe/fileselector.h> | ||
37 | #include <qpe/qpeapplication.h> | 36 | #include <qpe/qpeapplication.h> |
38 | #include <qpe/storage.h> | 37 | |
39 | #include <qpe/mimetype.h> | ||
40 | #include <qpe/config.h> | ||
41 | #include <qpe/global.h> | ||
42 | #include <qpe/resource.h> | ||
43 | |||
44 | #include <qpopupmenu.h> | ||
45 | #include <qaction.h> | ||
46 | #include <qcursor.h> | ||
47 | #include <qdir.h> | ||
48 | #include <qlayout.h> | 38 | #include <qlayout.h> |
39 | #include <qmenubar.h> | ||
49 | 40 | ||
50 | #include "playlistselection.h" | 41 | #include "playlistselection.h" |
51 | #include "playlistwidget.h" | 42 | #include "playlistwidget.h" |
52 | #include "mediaplayerstate.h" | 43 | #include "mediaplayerstate.h" |
53 | #include "inputDialog.h" | 44 | #include "inputDialog.h" |
54 | #include "playlistfileview.h" | 45 | #include "playlistfileview.h" |
55 | 46 | ||
56 | //only needed for the random play | ||
57 | #include <stdlib.h> | ||
58 | |||
59 | #include "mediaplayerstate.h" | 47 | #include "mediaplayerstate.h" |
60 | 48 | ||
61 | PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) | 49 | PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) |
62 | : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) { | 50 | : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) { |
63 | 51 | ||
64 | d = new PlayListWidgetPrivate; | 52 | d = new PlayListWidgetPrivate; |
65 | d->setDocumentUsed = FALSE; | 53 | d->setDocumentUsed = FALSE; |
66 | 54 | ||
67 | setBackgroundMode( PaletteButton ); | 55 | setBackgroundMode( PaletteButton ); |
68 | setToolBarsMovable( FALSE ); | 56 | setToolBarsMovable( FALSE ); |
69 | 57 | ||
70 | // Create Toolbar | 58 | // Create Toolbar |
71 | QPEToolBar *toolbar = new QPEToolBar( this ); | 59 | QToolBar *toolbar = new QToolBar( this ); |
72 | toolbar->setHorizontalStretchable( TRUE ); | 60 | toolbar->setHorizontalStretchable( TRUE ); |
73 | 61 | ||
74 | // Create Menubar | 62 | // Create Menubar |
75 | QPEMenuBar *menu = new QPEMenuBar( toolbar ); | 63 | QMenuBar *menu = new QMenuBar( toolbar ); |
76 | menu->setMargin( 0 ); | 64 | menu->setMargin( 0 ); |
77 | 65 | ||
78 | bar = new QPEToolBar( this ); | 66 | bar = new QToolBar( this ); |
79 | bar->setLabel( tr( "Play Operations" ) ); | 67 | bar->setLabel( tr( "Play Operations" ) ); |
80 | 68 | ||
81 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" ); | 69 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" ); |
82 | tbDeletePlaylist->setFlat( TRUE ); | 70 | tbDeletePlaylist->setFlat( TRUE ); |
83 | tbDeletePlaylist->setFixedSize( 20, 20 ); | 71 | tbDeletePlaylist->setFixedSize( 20, 20 ); |
84 | 72 | ||
@@ -145,13 +133,13 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg | |||
145 | aTab = new QWidget( tabWidget, "aTab" ); | 133 | aTab = new QWidget( tabWidget, "aTab" ); |
146 | 134 | ||
147 | QGridLayout *Alayout = new QGridLayout( aTab ); | 135 | QGridLayout *Alayout = new QGridLayout( aTab ); |
148 | Alayout->setSpacing( 2 ); | 136 | Alayout->setSpacing( 2 ); |
149 | Alayout->setMargin( 2 ); | 137 | Alayout->setMargin( 2 ); |
150 | // no m3u's here please | 138 | // no m3u's here please |
151 | audioView = new PlayListFileView( "audio/mpeg;audio/x-wav;audio/x-ogg", "opieplayer2/musicfile", aTab, "Audioview" ); | 139 | audioView = new PlayListFileView( "audio/mpeg;audio/x-wav;application/ogg", "opieplayer2/musicfile", aTab, "Audioview" ); |
152 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); | 140 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); |
153 | tabWidget->insertTab( aTab, tr( "Audio" ) ); | 141 | tabWidget->insertTab( aTab, tr( "Audio" ) ); |
154 | 142 | ||
155 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); | 143 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); |
156 | 144 | ||
157 | QWidget *vTab; | 145 | QWidget *vTab; |