Diffstat (limited to 'noncore/graphics/opie-eye/gui/iconview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/iconview.cpp | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp index 59091a8..9365932 100644 --- a/noncore/graphics/opie-eye/gui/iconview.cpp +++ b/noncore/graphics/opie-eye/gui/iconview.cpp @@ -7,26 +7,26 @@ #include "messagebox.h" #include <lib/imagecache.h> #include <gui/imageinfoui.h> #include <iface/dirview.h> #include <iface/dirlister.h> #include <opie2/oconfig.h> #include <opie2/okeyconfigwidget.h> #include <opie2/odebug.h> #include <opie2/oimagescrollview.h> +#include <opie2/oresource.h> -#include <qpe/resource.h> #include <qpe/qpemessagebox.h> #include <qpe/ir.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <qiconview.h> #include <qlabel.h> #include <qhbox.h> #include <qcombobox.h> #include <qdir.h> #include <qapplication.h> #include <qmainwindow.h> @@ -93,29 +93,29 @@ namespace { */ static QMap<QString, IconViewItem*> g_stringInf; static QMap<QString, IconViewItem*> g_stringPix; IconViewItem::IconViewItem( QIconView* view,const QString& path, const QString& name, int a_iconsize, bool isDir) : QIconViewItem( view, name ), m_path( path ), m_isDir( isDir ), m_noInfo( false ),m_textOnly(false),m_Pixset(false) { m_iconsize = a_iconsize; if ( isDir ) { if (!_dirPix ) { - _dirPix = new QPixmap( Resource::loadPixmap("advancedfm/FileBrowser")); + _dirPix = new QPixmap( Opie::Core::OResource::loadPixmap("advancedfm/FileBrowser", Opie::Core::OResource::SmallIcon)); } } else { if (!_unkPix ) { - _unkPix = new QPixmap( Resource::loadPixmap( "UnknownDocument" ) ); + _unkPix = new QPixmap( Opie::Core::OResource::loadPixmap( "UnknownDocument", Opie::Core::OResource::SmallIcon ) ); } } check_pix(); } inline void IconViewItem::check_pix()const { if (_dirPix && _dirPix->width()>m_iconsize) { QImage Pix = _dirPix->convertToImage(); *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize); } if (!_cpyPix && _unkPix) { @@ -261,42 +261,42 @@ Opie::Core::OKeyConfigManager* PIconView::manager() { */ void PIconView::initKeys() { Opie::Core::OKeyPair::List lst; lst.append( Opie::Core::OKeyPair::upArrowKey() ); lst.append( Opie::Core::OKeyPair::downArrowKey() ); lst.append( Opie::Core::OKeyPair::leftArrowKey() ); lst.append( Opie::Core::OKeyPair::rightArrowKey() ); lst.append( Opie::Core::OKeyPair::returnKey() ); m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", lst, false,this, "keyconfig name" ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", - Resource::loadPixmap("beam"), BeamItem, - Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), + Opie::Core::OResource::loadPixmap("beam", Opie::Core::OResource::SmallIcon), + BeamItem, Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), this, SLOT(slotBeam())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", - Resource::loadPixmap("trash"), DeleteItem, - Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), + Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon), + DeleteItem, Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), this, SLOT(slotTrash())) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", - Resource::loadPixmap("1to1"), ViewItem, - Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), + Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), + ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), this, SLOT(slotShowImage()))); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", - Resource::loadPixmap("DocumentTypeWord"), InfoItem, - Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), + Opie::Core::OResource::loadPixmap("DocumentTypeWord", Opie::Core::OResource::SmallIcon), + InfoItem, Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), this, SLOT(slotImageInfo()) ) ); m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow", - Resource::loadPixmap("1to1"), SlideItem, - Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), + Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon), + SlideItem, Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), this, SLOT(slotStartSlide()))); m_viewManager->load(); m_viewManager->handleWidget( m_view ); } /* * change one dir up */ void PIconView::slotDirUp() { slotChangeDir( currentView()->dirLister()->dirUp( m_path ) ); @@ -633,25 +633,26 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) { int offy = (m_iconsize-pix.height())/2; if (offy<0) offy=0; pa.drawPixmap(offset,offy,pix); pa.end(); PPixmapCache::self()->insertImage( _path, p, m_iconsize, m_iconsize ); item->setPixmap(p,true); } else { PPixmapCache::self()->insertImage( _path, pix, m_iconsize, m_iconsize ); item->setPixmap(pix,true); } } else { - PPixmapCache::self()->insertImage( _path, Resource::loadPixmap( "UnknownDocument" ), m_iconsize, m_iconsize ); + PPixmapCache::self()->insertImage( _path, Opie::Core::OResource::loadPixmap( "UnknownDocument", + Opie::Core::OResource::SmallIcon ), m_iconsize, m_iconsize ); } g_stringPix.remove( _path ); m_view->arrangeItemsInGrid(true); } /* * FIXME rename */ void PIconView::slotRename() { } |