Diffstat (limited to 'noncore/multimedia/opieplayer2/playlistwidgetgui.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index f47ddcc..de7b6d5 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | |||
@@ -42,24 +42,25 @@ | |||
42 | #include <qpe/resource.h> | 42 | #include <qpe/resource.h> |
43 | 43 | ||
44 | #include <qpopupmenu.h> | 44 | #include <qpopupmenu.h> |
45 | #include <qaction.h> | 45 | #include <qaction.h> |
46 | #include <qcursor.h> | 46 | #include <qcursor.h> |
47 | #include <qdir.h> | 47 | #include <qdir.h> |
48 | #include <qlayout.h> | 48 | #include <qlayout.h> |
49 | 49 | ||
50 | #include "playlistselection.h" | 50 | #include "playlistselection.h" |
51 | #include "playlistwidget.h" | 51 | #include "playlistwidget.h" |
52 | #include "mediaplayerstate.h" | 52 | #include "mediaplayerstate.h" |
53 | #include "inputDialog.h" | 53 | #include "inputDialog.h" |
54 | #include "playlistfileview.h" | ||
54 | 55 | ||
55 | //only needed for the random play | 56 | //only needed for the random play |
56 | #include <stdlib.h> | 57 | #include <stdlib.h> |
57 | 58 | ||
58 | #include "audiowidget.h" | 59 | #include "audiowidget.h" |
59 | #include "videowidget.h" | 60 | #include "videowidget.h" |
60 | #include "mediaplayerstate.h" | 61 | #include "mediaplayerstate.h" |
61 | 62 | ||
62 | PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) | 63 | PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidget* parent, const char* name ) |
63 | : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) { | 64 | : QMainWindow( parent, name ), mediaPlayerState( _mediaPlayerState ) { |
64 | 65 | ||
65 | d = new PlayListWidgetPrivate; | 66 | d = new PlayListWidgetPrivate; |
@@ -140,47 +141,47 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg | |||
140 | vbox1 = new QVBox( hbox2 ); | 141 | vbox1 = new QVBox( hbox2 ); |
141 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); | 142 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); |
142 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch | 143 | QVBox *stretch1 = new QVBox( vbox1 ); // add stretch |
143 | 144 | ||
144 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); | 145 | Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 ); |
145 | 146 | ||
146 | QWidget *aTab; | 147 | QWidget *aTab; |
147 | aTab = new QWidget( tabWidget, "aTab" ); | 148 | aTab = new QWidget( tabWidget, "aTab" ); |
148 | 149 | ||
149 | QGridLayout *Alayout = new QGridLayout( aTab ); | 150 | QGridLayout *Alayout = new QGridLayout( aTab ); |
150 | Alayout->setSpacing( 2 ); | 151 | Alayout->setSpacing( 2 ); |
151 | Alayout->setMargin( 2 ); | 152 | Alayout->setMargin( 2 ); |
152 | audioView = new QListView( aTab, "Audioview" ); | 153 | audioView = new PlayListFileView( aTab, "Audioview" ); |
153 | audioView->addColumn( tr( "Title" ), 140 ); | 154 | audioView->addColumn( tr( "Title" ), 140 ); |
154 | audioView->addColumn( tr( "Size" ), -1 ); | 155 | audioView->addColumn( tr( "Size" ), -1 ); |
155 | audioView->addColumn( tr( "Media" ), 0 ); | 156 | audioView->addColumn( tr( "Media" ), 0 ); |
156 | audioView->addColumn( tr( "Path" ), -1 ); | 157 | audioView->addColumn( tr( "Path" ), -1 ); |
157 | audioView->setColumnAlignment( 1, Qt::AlignRight ); | 158 | audioView->setColumnAlignment( 1, Qt::AlignRight ); |
158 | audioView->setColumnAlignment( 2, Qt::AlignRight ); | 159 | audioView->setColumnAlignment( 2, Qt::AlignRight ); |
159 | audioView->setAllColumnsShowFocus( TRUE ); | 160 | audioView->setAllColumnsShowFocus( TRUE ); |
160 | audioView->setSorting( 3, TRUE ); | 161 | audioView->setSorting( 3, TRUE ); |
161 | audioView->setMultiSelection( TRUE ); | 162 | audioView->setMultiSelection( TRUE ); |
162 | audioView->setSelectionMode( QListView::Extended ); | 163 | audioView->setSelectionMode( QListView::Extended ); |
163 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); | 164 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); |
164 | tabWidget->insertTab( aTab, tr( "Audio" ) ); | 165 | tabWidget->insertTab( aTab, tr( "Audio" ) ); |
165 | 166 | ||
166 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); | 167 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); |
167 | 168 | ||
168 | QWidget *vTab; | 169 | QWidget *vTab; |
169 | vTab = new QWidget( tabWidget, "vTab" ); | 170 | vTab = new QWidget( tabWidget, "vTab" ); |
170 | 171 | ||
171 | QGridLayout *Vlayout = new QGridLayout( vTab ); | 172 | QGridLayout *Vlayout = new QGridLayout( vTab ); |
172 | Vlayout->setSpacing( 2 ); | 173 | Vlayout->setSpacing( 2 ); |
173 | Vlayout->setMargin( 2 ); | 174 | Vlayout->setMargin( 2 ); |
174 | videoView = new QListView( vTab, "Videoview" ); | 175 | videoView = new PlayListFileView( vTab, "Videoview" ); |
175 | videoView->addColumn( tr( "Title" ), 140); | 176 | videoView->addColumn( tr( "Title" ), 140); |
176 | videoView->addColumn( tr( "Size" ), -1 ); | 177 | videoView->addColumn( tr( "Size" ), -1 ); |
177 | videoView->addColumn(tr( "Media" ), 0 ); | 178 | videoView->addColumn(tr( "Media" ), 0 ); |
178 | videoView->addColumn(tr( "Path" ), -1 ); | 179 | videoView->addColumn(tr( "Path" ), -1 ); |
179 | videoView->setColumnAlignment( 1, Qt::AlignRight ); | 180 | videoView->setColumnAlignment( 1, Qt::AlignRight ); |
180 | videoView->setColumnAlignment( 2, Qt::AlignRight ); | 181 | videoView->setColumnAlignment( 2, Qt::AlignRight ); |
181 | videoView->setAllColumnsShowFocus( TRUE ); | 182 | videoView->setAllColumnsShowFocus( TRUE ); |
182 | videoView->setSorting( 3, TRUE ); | 183 | videoView->setSorting( 3, TRUE ); |
183 | videoView->setMultiSelection( TRUE ); | 184 | videoView->setMultiSelection( TRUE ); |
184 | videoView->setSelectionMode( QListView::Extended ); | 185 | videoView->setSelectionMode( QListView::Extended ); |
185 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); | 186 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); |
186 | 187 | ||