author | simon <simon> | 2002-12-03 16:56:35 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-03 16:56:35 (UTC) |
commit | 6759138a8d4d6fdd16838511c099c6d7ec03a54f (patch) (side-by-side diff) | |
tree | 90026f799c34ab93d7c0297c7ac287bb5750baf4 | |
parent | b92f6e69e5c243363c0f285dcf1f0d47bbc2cc17 (diff) | |
download | opie-6759138a8d4d6fdd16838511c099c6d7ec03a54f.zip opie-6759138a8d4d6fdd16838511c099c6d7ec03a54f.tar.gz opie-6759138a8d4d6fdd16838511c099c6d7ec03a54f.tar.bz2 |
- removing ten lines of duplicated code
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistfileview.cpp | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 20 |
2 files changed, 10 insertions, 20 deletions
diff --git a/noncore/multimedia/opieplayer2/playlistfileview.cpp b/noncore/multimedia/opieplayer2/playlistfileview.cpp index bdd38e0..c4f93e7 100644 --- a/noncore/multimedia/opieplayer2/playlistfileview.cpp +++ b/noncore/multimedia/opieplayer2/playlistfileview.cpp @@ -1,14 +1,24 @@ #include "playlistfileview.h" PlayListFileView::PlayListFileView( QWidget *parent, const char *name ) : PlayListView( parent, name ) { + addColumn( tr( "Title" ), 140); + addColumn( tr( "Size" ), -1 ); + addColumn(tr( "Media" ), 0 ); + addColumn(tr( "Path" ), -1 ); + setColumnAlignment( 1, Qt::AlignRight ); + setColumnAlignment( 2, Qt::AlignRight ); + setAllColumnsShowFocus( TRUE ); + setSorting( 3, TRUE ); + setMultiSelection( TRUE ); + setSelectionMode( QListView::Extended ); } PlayListFileView::~PlayListFileView() { } /* vim: et sw=4 ts=4 */ diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index de7b6d5..cfca5e3 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp @@ -130,80 +130,60 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg QGridLayout *Playout = new QGridLayout( pTab ); Playout->setSpacing( 2); Playout->setMargin( 2); // Add the playlist area QVBox *vbox3 = new QVBox( pTab ); d->playListFrame = vbox3; QHBox *hbox2 = new QHBox( vbox3 ); d->selectedFiles = new PlayListSelection( hbox2 ); vbox1 = new QVBox( hbox2 ); QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold ); QVBox *stretch1 = new QVBox( vbox1 ); // 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 PlayListFileView( aTab, "Audioview" ); - audioView->addColumn( tr( "Title" ), 140 ); - audioView->addColumn( tr( "Size" ), -1 ); - audioView->addColumn( tr( "Media" ), 0 ); - audioView->addColumn( tr( "Path" ), -1 ); - audioView->setColumnAlignment( 1, Qt::AlignRight ); - audioView->setColumnAlignment( 2, Qt::AlignRight ); - audioView->setAllColumnsShowFocus( TRUE ); - audioView->setSorting( 3, 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 PlayListFileView( vTab, "Videoview" ); - videoView->addColumn( tr( "Title" ), 140); - videoView->addColumn( tr( "Size" ), -1 ); - videoView->addColumn(tr( "Media" ), 0 ); - videoView->addColumn(tr( "Path" ), -1 ); - videoView->setColumnAlignment( 1, Qt::AlignRight ); - videoView->setColumnAlignment( 2, Qt::AlignRight ); - videoView->setAllColumnsShowFocus( TRUE ); - videoView->setSorting( 3, TRUE ); - videoView->setMultiSelection( TRUE ); - videoView->setSelectionMode( QListView::Extended ); 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;audio/x-mpegurl", LTab, "fileselector" , FALSE, FALSE ); Llayout->addMultiCellWidget( playLists, 0, 0, 0, 1 ); tabWidget->insertTab( LTab, tr( "Lists" ) ); setCentralWidget( vbox5 ); } PlayListWidgetGui::~PlayListWidgetGui() { |