author | llornkcor <llornkcor> | 2002-06-17 12:54:54 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-06-17 12:54:54 (UTC) |
commit | 282007e58a8a038a0db042341528510e73ac80fc (patch) (unidiff) | |
tree | f1a16c9a6a380bdc4217e9f92ac6ef6128d10717 /core/multimedia/opieplayer/playlistwidget.cpp | |
parent | 2917d7481dc8c1b053e3212a699e64948a90ec4c (diff) | |
download | opie-282007e58a8a038a0db042341528510e73ac80fc.zip opie-282007e58a8a038a0db042341528510e73ac80fc.tar.gz opie-282007e58a8a038a0db042341528510e73ac80fc.tar.bz2 |
fixes for goofy crap going on
Diffstat (limited to 'core/multimedia/opieplayer/playlistwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/playlistwidget.cpp | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index 200ec16..35208e4 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp | |||
@@ -148,25 +148,24 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
148 | 148 | ||
149 | // Create Menubar | 149 | // Create Menubar |
150 | QPEMenuBar *menu = new QPEMenuBar( toolbar ); | 150 | QPEMenuBar *menu = new QPEMenuBar( toolbar ); |
151 | menu->setMargin( 0 ); | 151 | menu->setMargin( 0 ); |
152 | 152 | ||
153 | QPEToolBar *bar = new QPEToolBar( this ); | 153 | QPEToolBar *bar = new QPEToolBar( this ); |
154 | bar->setLabel( tr( "Play Operations" ) ); | 154 | bar->setLabel( tr( "Play Operations" ) ); |
155 | // d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", | 155 | // d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", |
156 | // this , SLOT( addSelected()) ); | 156 | // this , SLOT( addSelected()) ); |
157 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); | 157 | tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); |
158 | tbDeletePlaylist->setFlat(TRUE); | 158 | tbDeletePlaylist->setFlat(TRUE); |
159 | tbDeletePlaylist->setFixedSize(20,20); | 159 | tbDeletePlaylist->setFixedSize(20,20); |
160 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); | ||
161 | 160 | ||
162 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", | 161 | d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", |
163 | this , SLOT(addSelected()) ); | 162 | this , SLOT(addSelected()) ); |
164 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", | 163 | d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", |
165 | this , SLOT(removeSelected()) ); | 164 | this , SLOT(removeSelected()) ); |
166 | // d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE ); | 165 | // d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE ); |
167 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", | 166 | d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", |
168 | this , SLOT( btnPlay(bool) ), TRUE ); | 167 | this , SLOT( btnPlay(bool) ), TRUE ); |
169 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle", | 168 | d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle", |
170 | mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); | 169 | mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); |
171 | d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop", | 170 | d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop", |
172 | mediaPlayerState, SLOT(setLooping(bool)), TRUE ); | 171 | mediaPlayerState, SLOT(setLooping(bool)), TRUE ); |
@@ -181,28 +180,26 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
181 | // pmPlayList->insertSeparator(-1); | 180 | // pmPlayList->insertSeparator(-1); |
182 | new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); | 181 | new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); |
183 | pmPlayList->insertSeparator(-1); | 182 | pmPlayList->insertSeparator(-1); |
184 | new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); | 183 | new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); |
185 | pmPlayList->insertSeparator(-1); | 184 | pmPlayList->insertSeparator(-1); |
186 | new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); | 185 | new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); |
187 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); | 186 | new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); |
188 | 187 | ||
189 | QPopupMenu *pmView = new QPopupMenu( this ); | 188 | QPopupMenu *pmView = new QPopupMenu( this ); |
190 | menu->insertItem( tr( "View" ), pmView ); | 189 | menu->insertItem( tr( "View" ), pmView ); |
191 | 190 | ||
192 | fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); | 191 | fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); |
193 | connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); | ||
194 | fullScreenButton->addTo(pmView); | 192 | fullScreenButton->addTo(pmView); |
195 | scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); | 193 | scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); |
196 | connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); | ||
197 | scaleButton->addTo(pmView); | 194 | scaleButton->addTo(pmView); |
198 | 195 | ||
199 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); | 196 | QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); |
200 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); | 197 | QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); |
201 | 198 | ||
202 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); | 199 | QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); |
203 | 200 | ||
204 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); | 201 | tabWidget = new QTabWidget( hbox6, "tabWidget" ); |
205 | tabWidget->setTabShape(QTabWidget::Triangular); | 202 | tabWidget->setTabShape(QTabWidget::Triangular); |
206 | 203 | ||
207 | QWidget *pTab; | 204 | QWidget *pTab; |
208 | pTab = new QWidget( tabWidget, "pTab" ); | 205 | pTab = new QWidget( tabWidget, "pTab" ); |
@@ -215,26 +212,24 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
215 | 212 | ||
216 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); | 213 | QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); |
217 | d->playListFrame = vbox3; | 214 | d->playListFrame = vbox3; |
218 | d->playListFrame ->setMinimumSize(235,260); | 215 | d->playListFrame ->setMinimumSize(235,260); |
219 | 216 | ||
220 | QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); | 217 | QHBox *hbox2 = new QHBox( vbox3 ); hbox2->setBackgroundMode( PaletteButton ); |
221 | 218 | ||
222 | d->selectedFiles = new PlayListSelection( hbox2); | 219 | d->selectedFiles = new PlayListSelection( hbox2); |
223 | QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); | 220 | QVBox *vbox1 = new QVBox( hbox2 ); vbox1->setBackgroundMode( PaletteButton ); |
224 | 221 | ||
225 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); | 222 | QPEApplication::setStylusOperation( d->selectedFiles->viewport(),QPEApplication::RightOnHold); |
226 | 223 | ||
227 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
228 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
229 | 224 | ||
230 | 225 | ||
231 | QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch | 226 | QVBox *stretch1 = new QVBox( vbox1 ); stretch1->setBackgroundMode( PaletteButton ); // add stretch |
232 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) ); | 227 | new ToolButton( vbox1, tr( "Move Up" ), "opieplayer/up", d->selectedFiles, SLOT(moveSelectedUp()) ); |
233 | new ToolButton( vbox1, tr( "Remove" ), "opieplayer/cut", d->selectedFiles, SLOT(removeSelected()) ); | 228 | new ToolButton( vbox1, tr( "Remove" ), "opieplayer/cut", d->selectedFiles, SLOT(removeSelected()) ); |
234 | new ToolButton( vbox1, tr( "Move Down" ), "opieplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) ); | 229 | new ToolButton( vbox1, tr( "Move Down" ), "opieplayer/down", d->selectedFiles, SLOT(moveSelectedDown()) ); |
235 | QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch | 230 | QVBox *stretch2 = new QVBox( vbox1 ); stretch2->setBackgroundMode( PaletteButton ); // add stretch |
236 | 231 | ||
237 | QWidget *aTab; | 232 | QWidget *aTab; |
238 | aTab = new QWidget( tabWidget, "aTab" ); | 233 | aTab = new QWidget( tabWidget, "aTab" ); |
239 | audioView = new QListView( aTab, "Audioview" ); | 234 | audioView = new QListView( aTab, "Audioview" ); |
240 | audioView->setMinimumSize(233,260); | 235 | audioView->setMinimumSize(233,260); |
@@ -242,82 +237,91 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) | |||
242 | audioView->addColumn(tr("Size"), -1); | 237 | audioView->addColumn(tr("Size"), -1); |
243 | audioView->addColumn(tr("Media"),-1); | 238 | audioView->addColumn(tr("Media"),-1); |
244 | audioView->setColumnAlignment(1, Qt::AlignRight); | 239 | audioView->setColumnAlignment(1, Qt::AlignRight); |
245 | audioView->setColumnAlignment(2, Qt::AlignRight); | 240 | audioView->setColumnAlignment(2, Qt::AlignRight); |
246 | audioView->setAllColumnsShowFocus(TRUE); | 241 | audioView->setAllColumnsShowFocus(TRUE); |
247 | 242 | ||
248 | audioView->setMultiSelection( TRUE ); | 243 | audioView->setMultiSelection( TRUE ); |
249 | audioView->setSelectionMode( QListView::Extended); | 244 | audioView->setSelectionMode( QListView::Extended); |
250 | 245 | ||
251 | tabWidget->insertTab(aTab,tr("Audio")); | 246 | tabWidget->insertTab(aTab,tr("Audio")); |
252 | 247 | ||
253 | QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold); | 248 | QPEApplication::setStylusOperation( audioView->viewport(),QPEApplication::RightOnHold); |
254 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
255 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
256 | |||
257 | connect( audioView, SIGNAL( returnPressed( QListViewItem *)), | ||
258 | this,SLOT( playIt( QListViewItem *)) ); | ||
259 | 249 | ||
260 | // audioView | 250 | // audioView |
261 | // populateAudioView(); | 251 | // populateAudioView(); |
262 | // videowidget | 252 | // videowidget |
263 | 253 | ||
264 | QWidget *vTab; | 254 | QWidget *vTab; |
265 | vTab = new QWidget( tabWidget, "vTab" ); | 255 | vTab = new QWidget( tabWidget, "vTab" ); |
266 | videoView = new QListView( vTab, "Videoview" ); | 256 | videoView = new QListView( vTab, "Videoview" ); |
267 | videoView->setMinimumSize(233,260); | 257 | videoView->setMinimumSize(233,260); |
268 | 258 | ||
269 | videoView->addColumn(tr("Title"),140); | 259 | videoView->addColumn(tr("Title"),140); |
270 | videoView->addColumn(tr("Size"),-1); | 260 | videoView->addColumn(tr("Size"),-1); |
271 | videoView->addColumn(tr("Media"),-1); | 261 | videoView->addColumn(tr("Media"),-1); |
272 | videoView->setColumnAlignment(1, Qt::AlignRight); | 262 | videoView->setColumnAlignment(1, Qt::AlignRight); |
273 | videoView->setColumnAlignment(2, Qt::AlignRight); | 263 | videoView->setColumnAlignment(2, Qt::AlignRight); |
274 | videoView->setAllColumnsShowFocus(TRUE); | 264 | videoView->setAllColumnsShowFocus(TRUE); |
275 | videoView->setMultiSelection( TRUE ); | 265 | videoView->setMultiSelection( TRUE ); |
276 | videoView->setSelectionMode( QListView::Extended); | 266 | videoView->setSelectionMode( QListView::Extended); |
277 | 267 | ||
278 | QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); | 268 | QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); |
279 | 269 | ||
280 | connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
281 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
282 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), | ||
283 | this,SLOT( playIt( QListViewItem *)) ); | ||
284 | |||
285 | tabWidget->insertTab( vTab,tr("Video")); | 270 | tabWidget->insertTab( vTab,tr("Video")); |
286 | // populateVideoView(); | 271 | // populateVideoView(); |
287 | 272 | ||
288 | //playlists list | 273 | //playlists list |
289 | QWidget *LTab; | 274 | QWidget *LTab; |
290 | LTab = new QWidget( tabWidget, "LTab" ); | 275 | LTab = new QWidget( tabWidget, "LTab" ); |
291 | playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy | 276 | playLists = new FileSelector( "playlist/plain", LTab, "fileselector" , FALSE, FALSE); //buggy |
292 | playLists->setMinimumSize(233,260); | 277 | playLists->setMinimumSize(233,260); |
293 | tabWidget->insertTab(LTab,tr("Lists")); | 278 | tabWidget->insertTab(LTab,tr("Lists")); |
294 | 279 | ||
295 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); | ||
296 | // connect( playLists, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); | 280 | // connect( playLists, SIGNAL( newSelected( const DocLnk &) ), this, SLOT( newFile( const DocLnk & ) ) ); |
297 | 281 | ||
298 | // add the library area | 282 | // add the library area |
299 | 283 | ||
300 | // connect( audioView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)), | 284 | // connect( audioView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)), |
301 | // this, SLOT( fauxPlay( QListViewItem *) ) ); | 285 | // this, SLOT( fauxPlay( QListViewItem *) ) ); |
302 | // connect( videoView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)), | 286 | // connect( videoView, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int)), |
303 | // this, SLOT( fauxPlay( QListViewItem *)) ); | 287 | // this, SLOT( fauxPlay( QListViewItem *)) ); |
304 | 288 | ||
305 | // connect( audioView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); | 289 | // connect( audioView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); |
306 | // connect( videoView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); | 290 | // connect( videoView, SIGNAL( clicked( QListViewItem *) ), this, SLOT( fauxPlay( QListViewItem *) ) ); |
307 | 291 | ||
308 | connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | 292 | connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); |
293 | connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); | ||
294 | connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); | ||
295 | connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
296 | this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
297 | |||
298 | connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
299 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
300 | |||
301 | connect( audioView, SIGNAL( returnPressed( QListViewItem *)), | ||
302 | this,SLOT( playIt( QListViewItem *)) ); | ||
303 | connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | ||
304 | |||
305 | connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | ||
306 | this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); | ||
307 | connect( videoView, SIGNAL( returnPressed( QListViewItem *)), | ||
308 | this,SLOT( playIt( QListViewItem *)) ); | ||
309 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); | 309 | connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); |
310 | 310 | ||
311 | connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); | ||
312 | |||
313 | |||
311 | connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); | 314 | connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); |
315 | |||
312 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); | 316 | connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); |
313 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); | 317 | connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); |
314 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); | 318 | connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); |
315 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); | 319 | connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); |
316 | 320 | ||
317 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); | 321 | connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); |
318 | // connect( d->selectedFiles, SIGNAL( fileSelected( const DocLnk & ) ), this, SLOT( addToSelection( const DocLnk & ) ) ); | 322 | // connect( d->selectedFiles, SIGNAL( fileSelected( const DocLnk & ) ), this, SLOT( addToSelection( const DocLnk & ) ) ); |
319 | 323 | ||
320 | setCentralWidget( vbox5 ); | 324 | setCentralWidget( vbox5 ); |
321 | 325 | ||
322 | Config cfg( "OpiePlayer" ); | 326 | Config cfg( "OpiePlayer" ); |
323 | readConfig( cfg ); | 327 | readConfig( cfg ); |
@@ -743,25 +747,27 @@ void PlayListWidget::addSelected() { | |||
743 | tabWidget->setCurrentPage(0); | 747 | tabWidget->setCurrentPage(0); |
744 | } | 748 | } |
745 | break; | 749 | break; |
746 | }; | 750 | }; |
747 | } | 751 | } |
748 | 752 | ||
749 | void PlayListWidget::removeSelected() { | 753 | void PlayListWidget::removeSelected() { |
750 | d->selectedFiles->removeSelected( ); | 754 | d->selectedFiles->removeSelected( ); |
751 | } | 755 | } |
752 | 756 | ||
753 | void PlayListWidget::playIt( QListViewItem *it) { | 757 | void PlayListWidget::playIt( QListViewItem *it) { |
754 | // d->setDocumentUsed = FALSE; | 758 | // d->setDocumentUsed = FALSE; |
755 | mediaPlayerState->setPlaying(FALSE); | 759 | // mediaPlayerState->curPosition =0; |
760 | qDebug("playIt"); | ||
761 | mediaPlayerState->setPlaying(FALSE); | ||
756 | mediaPlayerState->setPlaying(TRUE); | 762 | mediaPlayerState->setPlaying(TRUE); |
757 | d->selectedFiles->unSelect(); | 763 | d->selectedFiles->unSelect(); |
758 | } | 764 | } |
759 | 765 | ||
760 | void PlayListWidget::addToSelection( QListViewItem *it) { | 766 | void PlayListWidget::addToSelection( QListViewItem *it) { |
761 | d->setDocumentUsed = FALSE; | 767 | d->setDocumentUsed = FALSE; |
762 | 768 | ||
763 | if(it) { | 769 | if(it) { |
764 | switch (tabWidget->currentPageIndex()) { | 770 | switch (tabWidget->currentPageIndex()) { |
765 | case 1: { | 771 | case 1: { |
766 | QListIterator<DocLnk> dit( files.children() ); | 772 | QListIterator<DocLnk> dit( files.children() ); |
767 | for ( ; dit.current(); ++dit ) { | 773 | for ( ; dit.current(); ++dit ) { |
@@ -826,24 +832,25 @@ void PlayListWidget::tabChanged(QWidget *widg) { | |||
826 | playLists->reread(); | 832 | playLists->reread(); |
827 | } | 833 | } |
828 | break; | 834 | break; |
829 | }; | 835 | }; |
830 | } | 836 | } |
831 | 837 | ||
832 | void PlayListWidget::btnPlay(bool b) { | 838 | void PlayListWidget::btnPlay(bool b) { |
833 | 839 | ||
834 | // mediaPlayerState->setPlaying(b); | 840 | // mediaPlayerState->setPlaying(b); |
835 | switch ( tabWidget->currentPageIndex()) { | 841 | switch ( tabWidget->currentPageIndex()) { |
836 | case 0: | 842 | case 0: |
837 | { | 843 | { |
844 | |||
838 | mediaPlayerState->setPlaying(b); | 845 | mediaPlayerState->setPlaying(b); |
839 | } | 846 | } |
840 | break; | 847 | break; |
841 | case 1: | 848 | case 1: |
842 | { | 849 | { |
843 | addToSelection( audioView->currentItem() ); | 850 | addToSelection( audioView->currentItem() ); |
844 | mediaPlayerState->setPlaying(b); | 851 | mediaPlayerState->setPlaying(b); |
845 | d->selectedFiles->removeSelected( ); | 852 | d->selectedFiles->removeSelected( ); |
846 | tabWidget->setCurrentPage(1); | 853 | tabWidget->setCurrentPage(1); |
847 | d->selectedFiles->unSelect(); | 854 | d->selectedFiles->unSelect(); |
848 | insanityBool=FALSE; | 855 | insanityBool=FALSE; |
849 | // audioView->clearSelection(); | 856 | // audioView->clearSelection(); |