summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer3/mwindow.cpp38
-rw-r--r--noncore/multimedia/opieplayer3/playlist.cpp2
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
@@ -32,26 +32,26 @@
*/
#include "mwindow.h"
#include "playlist.h"
#include "audiowidget.h"
#include "videowidget.h"
#include "../opieplayer2/lib.h"
#include <opie2/oapplicationfactory.h>
#include <opie2/owidgetstack.h>
#include <opie2/ofileselector.h>
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
-#include <qpe/resource.h>
#include <qpe/qpeapplication.h>
#include <qfileinfo.h>
#include <qfile.h>
#include <qtoolbar.h>
#include <qpopupmenu.h>
#include <qmenubar.h>
#include <qtimer.h>
#include <qslider.h>
#include <qlayout.h>
OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>)
@@ -320,74 +320,86 @@ void PMainWindow::slotCheckPos()
}
void PMainWindow::slotRemoveFiles()
{
if (m_playing||!m_playList->isVisible()) return;
PlaylistItem* Item = m_playList->currentItem();
slotShowList();
m_playList->removeFromList(Item);
}
void PMainWindow::setupActions()
{
- a_appendFiles = new QAction(tr("Append file(s)"),Resource::loadIconSet( "opieplayer2/add_to_playlist" ), 0, 0, this, 0, false );
+ a_appendFiles = new QAction(tr("Append file(s)"),Opie::Core::OResource::loadPixmap( "opieplayer2/add_to_playlist",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false );
connect(a_appendFiles,SIGNAL(activated()),this,SLOT(slotAppendFiles()));
- a_addDir = new QAction(tr("Add directory"),Resource::loadIconSet("folder_open"),0,0,this,0,false);
+ a_addDir = new QAction(tr("Add directory"),Opie::Core::OResource::loadPixmap("folder_open",
+ Opie::Core::OResource::SmallIcon),0,0,this,0,false);
connect(a_addDir,SIGNAL(activated()),m_playList,SLOT(slotAppendDir()));
- a_loadPlaylist = new QAction(tr("Append playlist"),Resource::loadIconSet("opieplayer2/add_to_playlist"),0,0,this,0,false);
+ a_loadPlaylist = new QAction(tr("Append playlist"),Opie::Core::OResource::loadPixmap("opieplayer2/add_to_playlist",
+ Opie::Core::OResource::SmallIcon),0,0,this,0,false);
connect(a_loadPlaylist,SIGNAL(activated()),m_playList,SLOT(slotOpenM3u()));
- a_savePlaylist = new QAction(tr("Save playlist"),Resource::loadIconSet("save"),0,0,this,0,false);
+ a_savePlaylist = new QAction(tr("Save playlist"),Opie::Core::OResource::loadPixmap("save",
+ Opie::Core::OResource::SmallIcon),0,0,this,0,false);
connect(a_savePlaylist,SIGNAL(activated()),m_playList,SLOT(slotSaveAsM3u()));
playlistOnly = new QActionGroup(this,"playlistgroup",false);
playlistOnly->insert(a_appendFiles);
playlistOnly->insert(a_addDir);
playlistOnly->insert(a_loadPlaylist);
playlistOnly->insert(a_savePlaylist);
- a_showPlaylist = new QAction(tr("Show playlist"),Resource::loadIconSet( "txt" ), 0, 0, this, 0, false );
+ a_showPlaylist = new QAction(tr("Show playlist"),Opie::Core::OResource::loadPixmap( "txt",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false );
connect(a_showPlaylist,SIGNAL(activated()),this,SLOT(slotShowList()));
- a_ShowMedia = new QAction(tr("Show media window"),Resource::loadIconSet("opieplayer2/musicfile"), 0, 0, this, 0, false );
+ a_ShowMedia = new QAction(tr("Show media window"),Opie::Core::OResource::loadPixmap("opieplayer2/musicfile",
+ Opie::Core::OResource::SmallIcon), 0, 0, this, 0, false );
connect(a_ShowMedia,SIGNAL(activated()),this,SLOT(slotShowMediaWindow()));
- a_removeFiles = new QAction(tr("Remove file"),Resource::loadIconSet( "opieplayer2/remove_from_playlist" ), 0, 0, this, 0, false );
+ a_removeFiles = new QAction(tr("Remove file"),Opie::Core::OResource::loadPixmap( "opieplayer2/remove_from_playlist",
+ Opie::Core::OResource::SmallIcon), 0, 0, this, 0, false );
connect(a_removeFiles,SIGNAL(activated()),this,SLOT(slotRemoveFiles()));
playersGroup = new QActionGroup(this,"playgroup",false);
- a_playAction = new QAction(tr("Play list"),Resource::loadIconSet( "opieplayer2/play" ), 0, 0, this, 0, true);
+ a_playAction = new QAction(tr("Play list"),Opie::Core::OResource::loadPixmap( "opieplayer2/play",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true);
a_playAction->setOn(false);
connect(a_playAction,SIGNAL(toggled(bool)),this,SLOT(slotTogglePlay(bool)));
- a_playNext = new QAction(tr("Play next in list"),Resource::loadIconSet( "fastforward" ), 0, 0, this, 0, false );
+ a_playNext = new QAction(tr("Play next in list"),Opie::Core::OResource::loadPixmap( "fastforward",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false );
connect(a_playNext,SIGNAL(activated()),this,SLOT(slotPlayNext()));
- a_playPrevious = new QAction(tr("Play previous in list"),Resource::loadIconSet( "fastback" ), 0, 0, this, 0, false );
+ a_playPrevious = new QAction(tr("Play previous in list"),Opie::Core::OResource::loadPixmap( "fastback",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, false );
connect(a_playPrevious,SIGNAL(activated()),this,SLOT(slotPlayPrevious()));
- a_ShowFull = new QAction(tr("Show videos fullscreen"),Resource::loadIconSet( "fullscreen" ), 0, 0, this, 0, true );
+ a_ShowFull = new QAction(tr("Show videos fullscreen"),Opie::Core::OResource::loadPixmap( "fullscreen",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true );
connect(a_ShowFull,SIGNAL(toggled(bool)),this,SLOT(slotToggleFull(bool)));
playersGroup->insert(a_playPrevious);
playersGroup->insert(a_playAction);
playersGroup->insert(a_playNext);
/* initial states of actions */
a_showPlaylist->setEnabled(false);
a_removeFiles->setEnabled(false);
a_ShowMedia->setEnabled(false);
playersGroup->setEnabled(false);
settingsGroup = new QActionGroup(this,"configgroup",false);
- a_Scaleup = new QAction(tr("Scale videos larger"),Resource::loadIconSet( "fullscreen" ), 0, 0, this, 0, true );
+ a_Scaleup = new QAction(tr("Scale videos larger"),Opie::Core::OResource::loadPixmap( "fullscreen",
+ Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true );
connect(a_Scaleup,SIGNAL(toggled(bool)),this,SLOT(slot_scaleupToggled(bool)));
settingsGroup->insert(a_Scaleup);
}
void PMainWindow::setupToolBar()
{
setToolBarsMovable( false );
m_toolBar = new QToolBar( this );
//m_menuBar = new QMenuBar(m_toolBar);
m_menuBar=menuBar();
addToolBar(m_toolBar);
m_toolBar->setHorizontalStretchable( true );
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
@@ -29,26 +29,24 @@
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "playlist.h"
#include "../opieplayer2/lib.h"
#include "../opieplayer2/om3u.h"
#include <opie2/odebug.h>
#include <opie2/oresource.h>
#include <opie2/ofiledialog.h>
-#include <qpe/resource.h>
-
#include <qfileinfo.h>
#include <qmessagebox.h>
#include <qdir.h>
//#define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.pls;*.m3u;*.mp4;*.m4a"
#define DEFAULT_FILE_TYPES "*.mp3;*.ogg;*.ogm;*.wma;*.wav;*.asf;*.au;*.avi;*.mpeg;*.mpg;*.mv1;*.mov;*.wmv;*.mp4;*.m4a"
PlaylistItem::PlaylistItem(const DocLnk& aLink,PlaylistView*parent)
:QListViewItem(parent),m_Content(aLink),m_video(false)
{
}