summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/playlistwidget.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/playlistwidget.cpp35
1 files changed, 26 insertions, 9 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp
index 8b295b0..bffda38 100644
--- a/core/multimedia/opieplayer/playlistwidget.cpp
+++ b/core/multimedia/opieplayer/playlistwidget.cpp
@@ -164,12 +164,13 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
164 QPEToolBar *bar = new QPEToolBar( this ); 164 QPEToolBar *bar = new QPEToolBar( this );
165 bar->setLabel( tr( "Play Operations" ) ); 165 bar->setLabel( tr( "Play Operations" ) );
166// d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", 166// d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list",
167// this , SLOT( addSelected()) ); 167// this , SLOT( addSelected()) );
168 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); 168 tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close");
169 tbDeletePlaylist->setFlat(TRUE); 169 tbDeletePlaylist->setFlat(TRUE);
170
170 tbDeletePlaylist->setFixedSize(20,20); 171 tbDeletePlaylist->setFixedSize(20,20);
171 172
172 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", 173 d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist",
173 this , SLOT(addSelected()) ); 174 this , SLOT(addSelected()) );
174 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", 175 d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist",
175 this , SLOT(removeSelected()) ); 176 this , SLOT(removeSelected()) );
@@ -224,16 +225,21 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
224// playlistView = new QListView( pTab, "playlistview" ); 225// playlistView = new QListView( pTab, "playlistview" );
225// playlistView->setMinimumSize(236,260); 226// playlistView->setMinimumSize(236,260);
226 tabWidget->insertTab( pTab,"Playlist"); 227 tabWidget->insertTab( pTab,"Playlist");
227 228
228 229
229 // Add the playlist area 230 // Add the playlist area
230 231
231 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); 232 QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton );
232 d->playListFrame = vbox3; 233 d->playListFrame = vbox3;
233 d->playListFrame ->setMinimumSize(235,260); 234
235 QGridLayout *layoutF = new QGridLayout( pTab );
236 layoutF->setSpacing( 2);
237 layoutF->setMargin( 2);
238 layoutF->addMultiCellWidget( d->playListFrame , 0, 0, 0, 1 );
239// d->playListFrame ->setMinimumSize(235,260);
234 240
235 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); 241 QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton );
236 242
237 d->selectedFiles = new PlayListSelection( hbox2); 243 d->selectedFiles = new PlayListSelection( hbox2);
238 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); 244 QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton );
239 245
@@ -247,13 +253,18 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
247 new ToolButton( vbox1, tr( "Move Down" ), "opieplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) ); 253 new ToolButton( vbox1, tr( "Move Down" ), "opieplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) );
248 QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch 254 QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch
249 255
250 QWidget *aTab; 256 QWidget *aTab;
251 aTab = new QWidget( tabWidget, "aTab" ); 257 aTab = new QWidget( tabWidget, "aTab" );
252 audioView = new QListView( aTab, "Audioview" ); 258 audioView = new QListView( aTab, "Audioview" );
253 audioView->setMinimumSize(233,260); 259
260 QGridLayout *layoutA = new QGridLayout( aTab );
261 layoutA->setSpacing( 2);
262 layoutA->setMargin( 2);
263 layoutA->addMultiCellWidget( audioView, 0, 0, 0, 1 );
264
254 audioView->addColumn( tr("Title"),140); 265 audioView->addColumn( tr("Title"),140);
255 audioView->addColumn(tr("Size"), -1); 266 audioView->addColumn(tr("Size"), -1);
256 audioView->addColumn(tr("Media"),-1); 267 audioView->addColumn(tr("Media"),-1);
257 audioView->addColumn( tr( "Path" ), 0 ); 268 audioView->addColumn( tr( "Path" ), 0 );
258 269
259 audioView->setColumnAlignment(1, Qt::AlignRight); 270 audioView->setColumnAlignment(1, Qt::AlignRight);
@@ -272,13 +283,17 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
272// populateAudioView(); 283// populateAudioView();
273// videowidget 284// videowidget
274 285
275 QWidget *vTab; 286 QWidget *vTab;
276 vTab = new QWidget( tabWidget, "vTab" ); 287 vTab = new QWidget( tabWidget, "vTab" );
277 videoView = new QListView( vTab, "Videoview" ); 288 videoView = new QListView( vTab, "Videoview" );
278 videoView->setMinimumSize(233,260); 289
290 QGridLayout *layoutV = new QGridLayout( vTab );
291 layoutV->setSpacing( 2);
292 layoutV->setMargin( 2);
293 layoutV->addMultiCellWidget( videoView, 0, 0, 0, 1 );
279 294
280 videoView->addColumn(tr("Title"),140); 295 videoView->addColumn(tr("Title"),140);
281 videoView->addColumn(tr("Size"),-1); 296 videoView->addColumn(tr("Size"),-1);
282 videoView->addColumn(tr("Media"),-1); 297 videoView->addColumn(tr("Media"),-1);
283 videoView->addColumn(tr( "Path" ), 0 ); 298 videoView->addColumn(tr( "Path" ), 0 );
284 videoView->setColumnAlignment(1, Qt::AlignRight); 299 videoView->setColumnAlignment(1, Qt::AlignRight);
@@ -291,13 +306,19 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
291 306
292 tabWidget->insertTab( vTab,tr("Video")); 307 tabWidget->insertTab( vTab,tr("Video"));
293 308
294 QWidget *LTab; 309 QWidget *LTab;
295 LTab = new QWidget( tabWidget, "LTab" ); 310 LTab = new QWidget( tabWidget, "LTab" );
296 playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy 311 playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy
297 playLists->setMinimumSize(233,260); 312
313 QGridLayout *layoutL = new QGridLayout( LTab );
314 layoutL->setSpacing( 2);
315 layoutL->setMargin( 2);
316 layoutL->addMultiCellWidget( playLists, 0, 0, 0, 1 );
317// playLists->setMinimumSize(233,260);
318
298 tabWidget->insertTab(LTab,tr("Lists")); 319 tabWidget->insertTab(LTab,tr("Lists"));
299 320
300 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); 321 connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist()));
301 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); 322 connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) );
302 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); 323 connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) );
303 324
@@ -318,23 +339,19 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
318 connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), 339 connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
319 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); 340 this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) );
320 connect( videoView, SIGNAL( returnPressed( QListViewItem *)), 341 connect( videoView, SIGNAL( returnPressed( QListViewItem *)),
321 this,SLOT( playIt( QListViewItem *)) ); 342 this,SLOT( playIt( QListViewItem *)) );
322 connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); 343 connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) );
323 344
324
325//playlists 345//playlists
326 connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); 346 connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) );
327 347
328
329 connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); 348 connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*)));
330 349
331 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); 350 connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) );
332 351
333
334
335 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); 352 connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) );
336 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); 353 connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) );
337 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); 354 connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) );
338 355
339 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); 356 connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) );
340 357