summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
Unidiff
Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp28
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
@@ -22,69 +22,57 @@
22..}^=.=       =       ; General Public License for more 22..}^=.=       =       ; General Public License for more
23++=   -.     .`     .: details. 23++=   -.     .`     .: details.
24 :     =  ...= . :.=- 24 :     =  ...= . :.=-
25 -.   .:....=;==+<; You should have received a copy of the GNU 25 -.   .:....=;==+<; You should have received a copy of the GNU
26  -_. . .   )=.  = General Public License along with 26  -_. . .   )=.  = General Public License along with
27    --        :-=` this library; see the file COPYING.LIB. 27    --        :-=` this library; see the file COPYING.LIB.
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
61PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) 49PlayListWidgetGui::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
85 tbDeletePlaylist->hide(); 73 tbDeletePlaylist->hide();
86 74
87 pmPlayList = new QPopupMenu( this ); 75 pmPlayList = new QPopupMenu( this );
88 menu->insertItem( tr( "File" ), pmPlayList ); 76 menu->insertItem( tr( "File" ), pmPlayList );
89 77
90 pmView = new QPopupMenu( this ); 78 pmView = new QPopupMenu( this );
@@ -139,25 +127,25 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg
139 QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); 127 QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold );
140 QVBox *stretch1 = new QVBox( vbox1 ); // add stretch 128 QVBox *stretch1 = new QVBox( vbox1 ); // add stretch
141 129
142 Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); 130 Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 );
143 131
144 QWidget *aTab; 132 QWidget *aTab;
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;
158 vTab = new QWidget( tabWidget, "vTab" ); 146 vTab = new QWidget( tabWidget, "vTab" );
159 147
160 QGridLayout *Vlayout = new QGridLayout( vTab ); 148 QGridLayout *Vlayout = new QGridLayout( vTab );
161 Vlayout->setSpacing( 2 ); 149 Vlayout->setSpacing( 2 );
162 Vlayout->setMargin( 2 ); 150 Vlayout->setMargin( 2 );
163 videoView = new PlayListFileView( "video/*", "opieplayer2/videofile", vTab, "Videoview" ); 151 videoView = new PlayListFileView( "video/*", "opieplayer2/videofile", vTab, "Videoview" );