author | drw <drw> | 2005-05-24 21:43:34 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-24 21:43:34 (UTC) |
commit | c3acfb9caacd7c83f9798940aed5b7d2624ecc01 (patch) (unidiff) | |
tree | 1cf1afe6d0d23adc2b66161a32e5b78684b3cbfb | |
parent | dd673552565f6faa1898ff7e54bb2d374c17ac22 (diff) | |
download | opie-c3acfb9caacd7c83f9798940aed5b7d2624ecc01.zip opie-c3acfb9caacd7c83f9798940aed5b7d2624ecc01.tar.gz opie-c3acfb9caacd7c83f9798940aed5b7d2624ecc01.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/multimedia/opieplayer3/mwindow.cpp | 38 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer3/playlist.cpp | 2 |
2 files changed, 25 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer3/mwindow.cpp b/noncore/multimedia/opieplayer3/mwindow.cpp index 0898c7b..982d732 100644 --- a/noncore/multimedia/opieplayer3/mwindow.cpp +++ b/noncore/multimedia/opieplayer3/mwindow.cpp | |||
@@ -12,66 +12,66 @@ | |||
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include "mwindow.h" | 34 | #include "mwindow.h" |
35 | #include "playlist.h" | 35 | #include "playlist.h" |
36 | #include "audiowidget.h" | 36 | #include "audiowidget.h" |
37 | #include "videowidget.h" | 37 | #include "videowidget.h" |
38 | #include "../opieplayer2/lib.h" | 38 | #include "../opieplayer2/lib.h" |
39 | 39 | ||
40 | #include <opie2/oapplicationfactory.h> | 40 | #include <opie2/oapplicationfactory.h> |
41 | #include <opie2/owidgetstack.h> | 41 | #include <opie2/owidgetstack.h> |
42 | #include <opie2/ofileselector.h> | 42 | #include <opie2/ofileselector.h> |
43 | #include <opie2/odebug.h> | 43 | #include <opie2/odebug.h> |
44 | #include <opie2/oresource.h> | ||
44 | 45 | ||
45 | #include <qpe/resource.h> | ||
46 | #include <qpe/qpeapplication.h> | 46 | #include <qpe/qpeapplication.h> |
47 | 47 | ||
48 | #include <qfileinfo.h> | 48 | #include <qfileinfo.h> |
49 | #include <qfile.h> | 49 | #include <qfile.h> |
50 | #include <qtoolbar.h> | 50 | #include <qtoolbar.h> |
51 | #include <qpopupmenu.h> | 51 | #include <qpopupmenu.h> |
52 | #include <qmenubar.h> | 52 | #include <qmenubar.h> |
53 | #include <qtimer.h> | 53 | #include <qtimer.h> |
54 | #include <qslider.h> | 54 | #include <qslider.h> |
55 | #include <qlayout.h> | 55 | #include <qlayout.h> |
56 | 56 | ||
57 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) | 57 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) |
58 | 58 | ||
59 | using namespace Opie::Ui; | 59 | using namespace Opie::Ui; |
60 | 60 | ||
61 | PMainWindow::PMainWindow(QWidget*w, const char*name, WFlags f) | 61 | PMainWindow::PMainWindow(QWidget*w, const char*name, WFlags f) |
62 | : QMainWindow(w,name,f) | 62 | : QMainWindow(w,name,f) |
63 | { | 63 | { |
64 | checkLib(); | 64 | checkLib(); |
65 | setCaption(appTitle()); | 65 | setCaption(appTitle()); |
66 | 66 | ||
67 | m_MainBox = new QWidget(this); | 67 | m_MainBox = new QWidget(this); |
68 | 68 | ||
69 | QVBoxLayout*m_l = new QVBoxLayout(m_MainBox); | 69 | QVBoxLayout*m_l = new QVBoxLayout(m_MainBox); |
70 | 70 | ||
71 | m_stack = new OWidgetStack(m_MainBox); | 71 | m_stack = new OWidgetStack(m_MainBox); |
72 | m_stack->forceMode(Opie::Ui::OWidgetStack::SmallScreen); | 72 | m_stack->forceMode(Opie::Ui::OWidgetStack::SmallScreen); |
73 | m_l->addWidget(m_stack); | 73 | m_l->addWidget(m_stack); |
74 | m_PosSlider = new QSlider(QSlider::Horizontal,m_MainBox); | 74 | m_PosSlider = new QSlider(QSlider::Horizontal,m_MainBox); |
75 | m_l->addWidget(m_PosSlider); | 75 | m_l->addWidget(m_PosSlider); |
76 | m_PosSlider->setEnabled(false); | 76 | m_PosSlider->setEnabled(false); |
77 | 77 | ||
@@ -300,114 +300,126 @@ void PMainWindow::slotPlayPrevious() | |||
300 | } | 300 | } |
301 | 301 | ||
302 | void PMainWindow::slotStopped() | 302 | void PMainWindow::slotStopped() |
303 | { | 303 | { |
304 | if (!m_playing) return; | 304 | if (!m_playing) return; |
305 | odebug << "Slot stopped" << oendl; | 305 | odebug << "Slot stopped" << oendl; |
306 | m_playing = false; | 306 | m_playing = false; |
307 | slotGoNext(); | 307 | slotGoNext(); |
308 | } | 308 | } |
309 | 309 | ||
310 | void PMainWindow::slotCheckPos() | 310 | void PMainWindow::slotCheckPos() |
311 | { | 311 | { |
312 | if (!m_playing) return; | 312 | if (!m_playing) return; |
313 | if (!m_pressed) { | 313 | if (!m_pressed) { |
314 | m_uppos = m_PlayLib->currentTime(); | 314 | m_uppos = m_PlayLib->currentTime(); |
315 | emit sigPos(m_uppos); | 315 | emit sigPos(m_uppos); |
316 | m_PosSlider->setValue(m_PlayLib->currentTime()); | 316 | m_PosSlider->setValue(m_PlayLib->currentTime()); |
317 | } | 317 | } |
318 | qApp->processEvents(100); | 318 | qApp->processEvents(100); |
319 | QTimer::singleShot( 900, this, SLOT( slotCheckPos() ) ); | 319 | QTimer::singleShot( 900, this, SLOT( slotCheckPos() ) ); |
320 | } | 320 | } |
321 | 321 | ||
322 | void PMainWindow::slotRemoveFiles() | 322 | void PMainWindow::slotRemoveFiles() |
323 | { | 323 | { |
324 | if (m_playing||!m_playList->isVisible()) return; | 324 | if (m_playing||!m_playList->isVisible()) return; |
325 | PlaylistItem* Item = m_playList->currentItem(); | 325 | PlaylistItem* Item = m_playList->currentItem(); |
326 | slotShowList(); | 326 | slotShowList(); |
327 | m_playList->removeFromList(Item); | 327 | m_playList->removeFromList(Item); |
328 | } | 328 | } |
329 | 329 | ||
330 | void PMainWindow::setupActions() | 330 | void PMainWindow::setupActions() |
331 | { | 331 | { |
332 | a_appendFiles = new QAction(tr("Append file(s)"),Resource::loadIconSet( "opieplayer2/add_to_playlist" ), 0, 0, this, 0, false ); | 332 | a_appendFiles = new QAction(tr("Append file(s)"),Opie::Core::OResource::loadPixmap( "opieplayer2/add_to_playlist", |
333 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false ); | ||
333 | connect(a_appendFiles,SIGNAL(activated()),this,SLOT(slotAppendFiles())); | 334 | connect(a_appendFiles,SIGNAL(activated()),this,SLOT(slotAppendFiles())); |
334 | a_addDir = new QAction(tr("Add directory"),Resource::loadIconSet("folder_open"),0,0,this,0,false); | 335 | a_addDir = new QAction(tr("Add directory"),Opie::Core::OResource::loadPixmap("folder_open", |
336 | Opie::Core::OResource::SmallIcon),0,0,this,0,false); | ||
335 | connect(a_addDir,SIGNAL(activated()),m_playList,SLOT(slotAppendDir())); | 337 | connect(a_addDir,SIGNAL(activated()),m_playList,SLOT(slotAppendDir())); |
336 | a_loadPlaylist = new QAction(tr("Append playlist"),Resource::loadIconSet("opieplayer2/add_to_playlist"),0,0,this,0,false); | 338 | a_loadPlaylist = new QAction(tr("Append playlist"),Opie::Core::OResource::loadPixmap("opieplayer2/add_to_playlist", |
339 | Opie::Core::OResource::SmallIcon),0,0,this,0,false); | ||
337 | connect(a_loadPlaylist,SIGNAL(activated()),m_playList,SLOT(slotOpenM3u())); | 340 | connect(a_loadPlaylist,SIGNAL(activated()),m_playList,SLOT(slotOpenM3u())); |
338 | a_savePlaylist = new QAction(tr("Save playlist"),Resource::loadIconSet("save"),0,0,this,0,false); | 341 | a_savePlaylist = new QAction(tr("Save playlist"),Opie::Core::OResource::loadPixmap("save", |
342 | Opie::Core::OResource::SmallIcon),0,0,this,0,false); | ||
339 | connect(a_savePlaylist,SIGNAL(activated()),m_playList,SLOT(slotSaveAsM3u())); | 343 | connect(a_savePlaylist,SIGNAL(activated()),m_playList,SLOT(slotSaveAsM3u())); |
340 | 344 | ||
341 | playlistOnly = new QActionGroup(this,"playlistgroup",false); | 345 | playlistOnly = new QActionGroup(this,"playlistgroup",false); |
342 | playlistOnly->insert(a_appendFiles); | 346 | playlistOnly->insert(a_appendFiles); |
343 | playlistOnly->insert(a_addDir); | 347 | playlistOnly->insert(a_addDir); |
344 | playlistOnly->insert(a_loadPlaylist); | 348 | playlistOnly->insert(a_loadPlaylist); |
345 | playlistOnly->insert(a_savePlaylist); | 349 | playlistOnly->insert(a_savePlaylist); |
346 | 350 | ||
347 | a_showPlaylist = new QAction(tr("Show playlist"),Resource::loadIconSet( "txt" ), 0, 0, this, 0, false ); | 351 | a_showPlaylist = new QAction(tr("Show playlist"),Opie::Core::OResource::loadPixmap( "txt", |
352 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false ); | ||
348 | connect(a_showPlaylist,SIGNAL(activated()),this,SLOT(slotShowList())); | 353 | connect(a_showPlaylist,SIGNAL(activated()),this,SLOT(slotShowList())); |
349 | a_ShowMedia = new QAction(tr("Show media window"),Resource::loadIconSet("opieplayer2/musicfile"), 0, 0, this, 0, false ); | 354 | a_ShowMedia = new QAction(tr("Show media window"),Opie::Core::OResource::loadPixmap("opieplayer2/musicfile", |
355 | Opie::Core::OResource::SmallIcon), 0, 0, this, 0, false ); | ||
350 | connect(a_ShowMedia,SIGNAL(activated()),this,SLOT(slotShowMediaWindow())); | 356 | connect(a_ShowMedia,SIGNAL(activated()),this,SLOT(slotShowMediaWindow())); |
351 | 357 | ||
352 | a_removeFiles = new QAction(tr("Remove file"),Resource::loadIconSet( "opieplayer2/remove_from_playlist" ), 0, 0, this, 0, false ); | 358 | a_removeFiles = new QAction(tr("Remove file"),Opie::Core::OResource::loadPixmap( "opieplayer2/remove_from_playlist", |
359 | Opie::Core::OResource::SmallIcon), 0, 0, this, 0, false ); | ||
353 | connect(a_removeFiles,SIGNAL(activated()),this,SLOT(slotRemoveFiles())); | 360 | connect(a_removeFiles,SIGNAL(activated()),this,SLOT(slotRemoveFiles())); |
354 | 361 | ||
355 | playersGroup = new QActionGroup(this,"playgroup",false); | 362 | playersGroup = new QActionGroup(this,"playgroup",false); |
356 | 363 | ||
357 | a_playAction = new QAction(tr("Play list"),Resource::loadIconSet( "opieplayer2/play" ), 0, 0, this, 0, true); | 364 | a_playAction = new QAction(tr("Play list"),Opie::Core::OResource::loadPixmap( "opieplayer2/play", |
365 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true); | ||
358 | a_playAction->setOn(false); | 366 | a_playAction->setOn(false); |
359 | connect(a_playAction,SIGNAL(toggled(bool)),this,SLOT(slotTogglePlay(bool))); | 367 | connect(a_playAction,SIGNAL(toggled(bool)),this,SLOT(slotTogglePlay(bool))); |
360 | 368 | ||
361 | a_playNext = new QAction(tr("Play next in list"),Resource::loadIconSet( "fastforward" ), 0, 0, this, 0, false ); | 369 | a_playNext = new QAction(tr("Play next in list"),Opie::Core::OResource::loadPixmap( "fastforward", |
370 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false ); | ||
362 | connect(a_playNext,SIGNAL(activated()),this,SLOT(slotPlayNext())); | 371 | connect(a_playNext,SIGNAL(activated()),this,SLOT(slotPlayNext())); |
363 | a_playPrevious = new QAction(tr("Play previous in list"),Resource::loadIconSet( "fastback" ), 0, 0, this, 0, false ); | 372 | a_playPrevious = new QAction(tr("Play previous in list"),Opie::Core::OResource::loadPixmap( "fastback", |
373 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false ); | ||
364 | connect(a_playPrevious,SIGNAL(activated()),this,SLOT(slotPlayPrevious())); | 374 | connect(a_playPrevious,SIGNAL(activated()),this,SLOT(slotPlayPrevious())); |
365 | a_ShowFull = new QAction(tr("Show videos fullscreen"),Resource::loadIconSet( "fullscreen" ), 0, 0, this, 0, true ); | 375 | a_ShowFull = new QAction(tr("Show videos fullscreen"),Opie::Core::OResource::loadPixmap( "fullscreen", |
376 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true ); | ||
366 | connect(a_ShowFull,SIGNAL(toggled(bool)),this,SLOT(slotToggleFull(bool))); | 377 | connect(a_ShowFull,SIGNAL(toggled(bool)),this,SLOT(slotToggleFull(bool))); |
367 | 378 | ||
368 | playersGroup->insert(a_playPrevious); | 379 | playersGroup->insert(a_playPrevious); |
369 | playersGroup->insert(a_playAction); | 380 | playersGroup->insert(a_playAction); |
370 | playersGroup->insert(a_playNext); | 381 | playersGroup->insert(a_playNext); |
371 | 382 | ||
372 | 383 | ||
373 | /* initial states of actions */ | 384 | /* initial states of actions */ |
374 | a_showPlaylist->setEnabled(false); | 385 | a_showPlaylist->setEnabled(false); |
375 | a_removeFiles->setEnabled(false); | 386 | a_removeFiles->setEnabled(false); |
376 | a_ShowMedia->setEnabled(false); | 387 | a_ShowMedia->setEnabled(false); |
377 | playersGroup->setEnabled(false); | 388 | playersGroup->setEnabled(false); |
378 | 389 | ||
379 | settingsGroup = new QActionGroup(this,"configgroup",false); | 390 | settingsGroup = new QActionGroup(this,"configgroup",false); |
380 | 391 | ||
381 | a_Scaleup = new QAction(tr("Scale videos larger"),Resource::loadIconSet( "fullscreen" ), 0, 0, this, 0, true ); | 392 | a_Scaleup = new QAction(tr("Scale videos larger"),Opie::Core::OResource::loadPixmap( "fullscreen", |
393 | Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true ); | ||
382 | connect(a_Scaleup,SIGNAL(toggled(bool)),this,SLOT(slot_scaleupToggled(bool))); | 394 | connect(a_Scaleup,SIGNAL(toggled(bool)),this,SLOT(slot_scaleupToggled(bool))); |
383 | settingsGroup->insert(a_Scaleup); | 395 | settingsGroup->insert(a_Scaleup); |
384 | } | 396 | } |
385 | 397 | ||
386 | void PMainWindow::setupToolBar() | 398 | void PMainWindow::setupToolBar() |
387 | { | 399 | { |
388 | setToolBarsMovable( false ); | 400 | setToolBarsMovable( false ); |
389 | m_toolBar = new QToolBar( this ); | 401 | m_toolBar = new QToolBar( this ); |
390 | //m_menuBar = new QMenuBar(m_toolBar); | 402 | //m_menuBar = new QMenuBar(m_toolBar); |
391 | m_menuBar=menuBar(); | 403 | m_menuBar=menuBar(); |
392 | addToolBar(m_toolBar); | 404 | addToolBar(m_toolBar); |
393 | m_toolBar->setHorizontalStretchable( true ); | 405 | m_toolBar->setHorizontalStretchable( true ); |
394 | a_appendFiles->addTo(m_toolBar); | 406 | a_appendFiles->addTo(m_toolBar); |
395 | a_removeFiles->addTo(m_toolBar); | 407 | a_removeFiles->addTo(m_toolBar); |
396 | a_showPlaylist->addTo(m_toolBar); | 408 | a_showPlaylist->addTo(m_toolBar); |
397 | a_ShowMedia->addTo(m_toolBar); | 409 | a_ShowMedia->addTo(m_toolBar); |
398 | a_ShowFull->addTo(m_toolBar); | 410 | a_ShowFull->addTo(m_toolBar); |
399 | playersGroup->addTo(m_toolBar); | 411 | playersGroup->addTo(m_toolBar); |
400 | } | 412 | } |
401 | 413 | ||
402 | void PMainWindow::setupVideo(bool full) | 414 | void PMainWindow::setupVideo(bool full) |
403 | { | 415 | { |
404 | if (full) { | 416 | if (full) { |
405 | m_VideoPlayer->setBackgroundColor(black); | 417 | m_VideoPlayer->setBackgroundColor(black); |
406 | m_VideoPlayer->reparent(0, WStyle_Customize | WStyle_NoBorderEx, QPoint(0,0)); | 418 | m_VideoPlayer->reparent(0, WStyle_Customize | WStyle_NoBorderEx, QPoint(0,0)); |
407 | m_VideoPlayer->setGeometry(0,0,qApp->desktop()->size().width(),qApp->desktop()->size().height()); | 419 | m_VideoPlayer->setGeometry(0,0,qApp->desktop()->size().width(),qApp->desktop()->size().height()); |
408 | m_VideoPlayer->showFullScreen(); | 420 | m_VideoPlayer->showFullScreen(); |
409 | connect(m_VideoPlayer,SIGNAL(videoclicked()),this,SLOT(slotVideoclicked())); | 421 | connect(m_VideoPlayer,SIGNAL(videoclicked()),this,SLOT(slotVideoclicked())); |
410 | } else { | 422 | } else { |
411 | m_VideoPlayer->hide(); | 423 | m_VideoPlayer->hide(); |
412 | m_VideoPlayer->disconnect(this); | 424 | m_VideoPlayer->disconnect(this); |
413 | m_stack->addWidget(m_VideoPlayer,stack_video); | 425 | m_stack->addWidget(m_VideoPlayer,stack_video); |
diff --git a/noncore/multimedia/opieplayer3/playlist.cpp b/noncore/multimedia/opieplayer3/playlist.cpp index fe2dde3..eebb068 100644 --- a/noncore/multimedia/opieplayer3/playlist.cpp +++ b/noncore/multimedia/opieplayer3/playlist.cpp | |||
@@ -9,66 +9,64 @@ | |||
9 | .>+-= | 9 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 10 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 11 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 12 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 13 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 14 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 15 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 16 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 17 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 19 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 22 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 23 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 24 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 25 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 26 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 27 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 28 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 29 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
31 | 31 | ||
32 | */ | 32 | */ |
33 | #include "playlist.h" | 33 | #include "playlist.h" |
34 | #include "../opieplayer2/lib.h" | 34 | #include "../opieplayer2/lib.h" |
35 | #include "../opieplayer2/om3u.h" | 35 | #include "../opieplayer2/om3u.h" |
36 | 36 | ||
37 | #include <opie2/odebug.h> | 37 | #include <opie2/odebug.h> |
38 | #include <opie2/oresource.h> | 38 | #include <opie2/oresource.h> |
39 | #include <opie2/ofiledialog.h> | 39 | #include <opie2/ofiledialog.h> |
40 | 40 | ||
41 | #include <qpe/resource.h> | ||
42 | |||
43 | #include <qfileinfo.h> | 41 | #include <qfileinfo.h> |
44 | #include <qmessagebox.h> | 42 | #include <qmessagebox.h> |
45 | #include <qdir.h> | 43 | #include <qdir.h> |
46 | 44 | ||
47 | //#define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.pls;*.m3u;*.mp4;*.m4a" | 45 | //#define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.pls;*.m3u;*.mp4;*.m4a" |
48 | #define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.mp4;*.m4a" | 46 | #define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.mp4;*.m4a" |
49 | 47 | ||
50 | PlaylistItem::PlaylistItem(const DocLnk& aLink,PlaylistView*parent) | 48 | PlaylistItem::PlaylistItem(const DocLnk& aLink,PlaylistView*parent) |
51 | :QListViewItem(parent),m_Content(aLink),m_video(false) | 49 | :QListViewItem(parent),m_Content(aLink),m_video(false) |
52 | { | 50 | { |
53 | } | 51 | } |
54 | 52 | ||
55 | PlaylistItem::PlaylistItem(const DocLnk&aLink,PlaylistView*parent,PlaylistItem*after) | 53 | PlaylistItem::PlaylistItem(const DocLnk&aLink,PlaylistView*parent,PlaylistItem*after) |
56 | :QListViewItem(parent,after),m_Content(aLink),m_video(false) | 54 | :QListViewItem(parent,after),m_Content(aLink),m_video(false) |
57 | { | 55 | { |
58 | } | 56 | } |
59 | 57 | ||
60 | void PlaylistItem::Video(bool y) | 58 | void PlaylistItem::Video(bool y) |
61 | { | 59 | { |
62 | m_video=y; | 60 | m_video=y; |
63 | if (m_video) { | 61 | if (m_video) { |
64 | setPixmap(0,Opie::Core::OResource::loadPixmap("opieplayer2/videofile")); | 62 | setPixmap(0,Opie::Core::OResource::loadPixmap("opieplayer2/videofile")); |
65 | } else { | 63 | } else { |
66 | setPixmap(0,Opie::Core::OResource::loadPixmap("opieplayer2/musicfile")); | 64 | setPixmap(0,Opie::Core::OResource::loadPixmap("opieplayer2/musicfile")); |
67 | } | 65 | } |
68 | } | 66 | } |
69 | 67 | ||
70 | PlaylistItem::~PlaylistItem() | 68 | PlaylistItem::~PlaylistItem() |
71 | { | 69 | { |
72 | } | 70 | } |
73 | 71 | ||
74 | /* PlaylistView Methods */ | 72 | /* PlaylistView Methods */ |