summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidget.cpp39
1 files changed, 33 insertions, 6 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp
index 0cfd720..0c3ea74 100644
--- a/noncore/multimedia/opieplayer2/playlistwidget.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp
@@ -171,84 +171,112 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl )
QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton );
QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton );
tabWidget = new QTabWidget( hbox6, "tabWidget" );
// tabWidget->setTabShape(QTabWidget::Triangular);
QWidget *pTab;
pTab = new QWidget( tabWidget, "pTab" );
tabWidget->insertTab( pTab,"Playlist");
+ QGridLayout *Playout = new QGridLayout( pTab );
+ Playout->setSpacing( 2);
+ Playout->setMargin( 2);
+
// Add the playlist area
QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton );
d->playListFrame = vbox3;
- d->playListFrame ->setMinimumSize(235,250);
QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton );
d->selectedFiles = new PlayListSelection( hbox2);
QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton );
QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold);
QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch
new ToolButton( vbox1, tr( "Move Up" ), "opieplayer2/up", d->selectedFiles, SLOT(moveSelectedUp()) );
new ToolButton( vbox1, tr( "Remove" ), "opieplayer2/cut", d->selectedFiles, SLOT(removeSelected()) );
new ToolButton( vbox1, tr( "Move Down" ), "opieplayer2/down", d->selectedFiles, SLOT(moveSelectedDown()) );
QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch
+
+ Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 );
+
QWidget *aTab;
aTab = new QWidget( tabWidget, "aTab" );
+
+ QGridLayout *Alayout = new QGridLayout( aTab );
+ Alayout->setSpacing( 2);
+ Alayout->setMargin( 2);
+
audioView = new QListView( aTab, "Audioview" );
- audioView->setMinimumSize(233,250);
audioView->addColumn( tr("Title"),140);
audioView->addColumn(tr("Size"), -1);
audioView->addColumn(tr("Media"),-1);
audioView->setColumnAlignment(1, Qt::AlignRight);
audioView->setColumnAlignment(2, Qt::AlignRight);
audioView->setAllColumnsShowFocus(TRUE);
audioView->setMultiSelection( TRUE );
audioView->setSelectionMode( QListView::Extended);
+ Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 );
+
tabWidget->insertTab(aTab,tr("Audio"));
QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold);
QWidget *vTab;
vTab = new QWidget( tabWidget, "vTab" );
+
+ QGridLayout *Vlayout = new QGridLayout( vTab );
+ Vlayout->setSpacing( 2);
+ Vlayout->setMargin( 2);
+
videoView = new QListView( vTab, "Videoview" );
- videoView->setMinimumSize(233,250);
videoView->addColumn(tr("Title"),140);
videoView->addColumn(tr("Size"),-1);
videoView->addColumn(tr("Media"),-1);
videoView->setColumnAlignment(1, Qt::AlignRight);
videoView->setColumnAlignment(2, Qt::AlignRight);
videoView->setAllColumnsShowFocus(TRUE);
videoView->setMultiSelection( TRUE );
videoView->setSelectionMode( QListView::Extended);
+// d->playListFrame->setMaximumSize(235,240);
+// audioView->setMaximumSize(233,240);
+// videoView->setMaximumSize(233,240);
+
+ Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 );
+
QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold);
tabWidget->insertTab( vTab,tr("Video"));
//playlists list
QWidget *LTab;
LTab = new QWidget( tabWidget, "LTab" );
+ QGridLayout *Llayout = new QGridLayout( LTab );
+ Llayout->setSpacing( 2);
+ Llayout->setMargin( 2);
+
playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy
- playLists->setMinimumSize(233,260);
+ // playLists->setMinimumSize(233,260);
+ Llayout->addMultiCellWidget( playLists, 0, 0, 0, 1 );
+
tabWidget->insertTab(LTab,tr("Lists"));
connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist()));
connect( pmView, SIGNAL( activated(int)), this, SLOT( pmViewActivated(int) ) );
connect( skinsMenu, SIGNAL( activated(int)), this, SLOT(skinsMenuActivated(int) ) );
// connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled() ) );
connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)),
this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) );
@@ -667,26 +695,25 @@ void PlayListWidget::addSelected() {
}
tabWidget->setCurrentPage(0);
}
break;
};
}
void PlayListWidget::removeSelected() {
d->selectedFiles->removeSelected( );
}
void PlayListWidget::playIt( QListViewItem *it) {
- // if(it==NULL) return;
- qDebug("playIt");
+ if(!it) return;
mediaPlayerState->setPlaying(FALSE);
mediaPlayerState->setPlaying(TRUE);
d->selectedFiles->unSelect();
}
void PlayListWidget::addToSelection( QListViewItem *it) {
d->setDocumentUsed = FALSE;
if(it) {
switch (tabWidget->currentPageIndex()) {
case 1: {
QListIterator<DocLnk> dit( files.children() );