author | simon <simon> | 2002-12-03 16:56:35 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-03 16:56:35 (UTC) |
commit | 6759138a8d4d6fdd16838511c099c6d7ec03a54f (patch) (unidiff) | |
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 | |||
@@ -3,8 +3,18 @@ | |||
3 | 3 | ||
4 | PlayListFileView::PlayListFileView( QWidget *parent, const char *name ) | 4 | PlayListFileView::PlayListFileView( QWidget *parent, const char *name ) |
5 | : PlayListView( parent, name ) | 5 | : PlayListView( parent, name ) |
6 | { | 6 | { |
7 | addColumn( tr( "Title" ), 140); | ||
8 | addColumn( tr( "Size" ), -1 ); | ||
9 | addColumn(tr( "Media" ), 0 ); | ||
10 | addColumn(tr( "Path" ), -1 ); | ||
11 | setColumnAlignment( 1, Qt::AlignRight ); | ||
12 | setColumnAlignment( 2, Qt::AlignRight ); | ||
13 | setAllColumnsShowFocus( TRUE ); | ||
14 | setSorting( 3, TRUE ); | ||
15 | setMultiSelection( TRUE ); | ||
16 | setSelectionMode( QListView::Extended ); | ||
7 | } | 17 | } |
8 | 18 | ||
9 | PlayListFileView::~PlayListFileView() | 19 | PlayListFileView::~PlayListFileView() |
10 | { | 20 | { |
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 | |||
@@ -150,18 +150,8 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg | |||
150 | QGridLayout *Alayout = new QGridLayout( aTab ); | 150 | QGridLayout *Alayout = new QGridLayout( aTab ); |
151 | Alayout->setSpacing( 2 ); | 151 | Alayout->setSpacing( 2 ); |
152 | Alayout->setMargin( 2 ); | 152 | Alayout->setMargin( 2 ); |
153 | audioView = new PlayListFileView( aTab, "Audioview" ); | 153 | audioView = new PlayListFileView( aTab, "Audioview" ); |
154 | audioView->addColumn( tr( "Title" ), 140 ); | ||
155 | audioView->addColumn( tr( "Size" ), -1 ); | ||
156 | audioView->addColumn( tr( "Media" ), 0 ); | ||
157 | audioView->addColumn( tr( "Path" ), -1 ); | ||
158 | audioView->setColumnAlignment( 1, Qt::AlignRight ); | ||
159 | audioView->setColumnAlignment( 2, Qt::AlignRight ); | ||
160 | audioView->setAllColumnsShowFocus( TRUE ); | ||
161 | audioView->setSorting( 3, TRUE ); | ||
162 | audioView->setMultiSelection( TRUE ); | ||
163 | audioView->setSelectionMode( QListView::Extended ); | ||
164 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); | 154 | Alayout->addMultiCellWidget( audioView, 0, 0, 0, 1 ); |
165 | tabWidget->insertTab( aTab, tr( "Audio" ) ); | 155 | tabWidget->insertTab( aTab, tr( "Audio" ) ); |
166 | 156 | ||
167 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); | 157 | QPEApplication::setStylusOperation( audioView->viewport(), QPEApplication::RightOnHold ); |
@@ -172,18 +162,8 @@ PlayListWidgetGui::PlayListWidgetGui( MediaPlayerState &_mediaPlayerState, QWidg | |||
172 | QGridLayout *Vlayout = new QGridLayout( vTab ); | 162 | QGridLayout *Vlayout = new QGridLayout( vTab ); |
173 | Vlayout->setSpacing( 2 ); | 163 | Vlayout->setSpacing( 2 ); |
174 | Vlayout->setMargin( 2 ); | 164 | Vlayout->setMargin( 2 ); |
175 | videoView = new PlayListFileView( vTab, "Videoview" ); | 165 | videoView = new PlayListFileView( vTab, "Videoview" ); |
176 | videoView->addColumn( tr( "Title" ), 140); | ||
177 | videoView->addColumn( tr( "Size" ), -1 ); | ||
178 | videoView->addColumn(tr( "Media" ), 0 ); | ||
179 | videoView->addColumn(tr( "Path" ), -1 ); | ||
180 | videoView->setColumnAlignment( 1, Qt::AlignRight ); | ||
181 | videoView->setColumnAlignment( 2, Qt::AlignRight ); | ||
182 | videoView->setAllColumnsShowFocus( TRUE ); | ||
183 | videoView->setSorting( 3, TRUE ); | ||
184 | videoView->setMultiSelection( TRUE ); | ||
185 | videoView->setSelectionMode( QListView::Extended ); | ||
186 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); | 166 | Vlayout->addMultiCellWidget( videoView, 0, 0, 0, 1 ); |
187 | 167 | ||
188 | QPEApplication::setStylusOperation( videoView->viewport(), QPEApplication::RightOnHold ); | 168 | QPEApplication::setStylusOperation( videoView->viewport(), QPEApplication::RightOnHold ); |
189 | 169 | ||