summaryrefslogtreecommitdiff
authordrw <drw>2005-05-23 23:25:38 (UTC)
committer drw <drw>2005-05-23 23:25:38 (UTC)
commit3e2acb4665ddcdb24e0749e3ebfc589313be0065 (patch) (unidiff)
treeb7884a189d1b4928e61d71c1c4b5f908205a3655
parent71ecaf241641c2c58b997df56074cf4849e6d6c5 (diff)
downloadopie-3e2acb4665ddcdb24e0749e3ebfc589313be0065.zip
opie-3e2acb4665ddcdb24e0749e3ebfc589313be0065.tar.gz
opie-3e2acb4665ddcdb24e0749e3ebfc589313be0065.tar.bz2
Resource -> OResource
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/filesystem.cpp5
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp29
-rw-r--r--noncore/graphics/opie-eye/gui/imageinfoui.cpp8
-rw-r--r--noncore/graphics/opie-eye/gui/imageview.cpp38
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp73
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.cpp2
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.h2
7 files changed, 93 insertions, 64 deletions
diff --git a/noncore/graphics/opie-eye/gui/filesystem.cpp b/noncore/graphics/opie-eye/gui/filesystem.cpp
index 8efcdf7..d84e9f8 100644
--- a/noncore/graphics/opie-eye/gui/filesystem.cpp
+++ b/noncore/graphics/opie-eye/gui/filesystem.cpp
@@ -1,30 +1,31 @@
1/* 1/*
2 * GPLv2 zecke@handhelds.org 2 * GPLv2 zecke@handhelds.org
3 * No WArranty... 3 * No WArranty...
4 */ 4 */
5#include <stdlib.h> 5#include <stdlib.h>
6#include <qpopupmenu.h> 6#include <qpopupmenu.h>
7#include <qtoolbar.h> 7#include <qtoolbar.h>
8 8
9#include <qpe/resource.h> 9#include <opie2/oresource.h>
10
10#include <qpe/storage.h> 11#include <qpe/storage.h>
11 12
12 13
13#include "filesystem.h" 14#include "filesystem.h"
14 15
15PFileSystem::PFileSystem( QToolBar* bar) 16PFileSystem::PFileSystem( QToolBar* bar)
16 : QToolButton( bar ) 17 : QToolButton( bar )
17{ 18{
18 setIconSet( Resource::loadIconSet( "cardmon/pcmcia" ) ); 19 setIconSet( Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ) );
19 20
20 m_pop = new QPopupMenu( this ); 21 m_pop = new QPopupMenu( this );
21 connect( m_pop, SIGNAL( activated( int ) ), 22 connect( m_pop, SIGNAL( activated( int ) ),
22 this, SLOT(slotSelectDir( int ) ) ); 23 this, SLOT(slotSelectDir( int ) ) );
23 24
24 m_storage = new StorageInfo(); 25 m_storage = new StorageInfo();
25 connect(m_storage, SIGNAL(disksChanged() ), 26 connect(m_storage, SIGNAL(disksChanged() ),
26 this, SLOT( changed() ) ); 27 this, SLOT( changed() ) );
27 changed(); 28 changed();
28 29
29 connect(this,SIGNAL(pressed()),SLOT(slotPopUp())); 30 connect(this,SIGNAL(pressed()),SLOT(slotPopUp()));
30} 31}
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 @@
7#include "messagebox.h" 7#include "messagebox.h"
8 8
9#include <lib/imagecache.h> 9#include <lib/imagecache.h>
10#include <gui/imageinfoui.h> 10#include <gui/imageinfoui.h>
11 11
12#include <iface/dirview.h> 12#include <iface/dirview.h>
13#include <iface/dirlister.h> 13#include <iface/dirlister.h>
14 14
15#include <opie2/oconfig.h> 15#include <opie2/oconfig.h>
16#include <opie2/okeyconfigwidget.h> 16#include <opie2/okeyconfigwidget.h>
17#include <opie2/odebug.h> 17#include <opie2/odebug.h>
18#include <opie2/oimagescrollview.h> 18#include <opie2/oimagescrollview.h>
19#include <opie2/oresource.h>
19 20
20#include <qpe/resource.h>
21#include <qpe/qpemessagebox.h> 21#include <qpe/qpemessagebox.h>
22#include <qpe/ir.h> 22#include <qpe/ir.h>
23#include <qpe/qcopenvelope_qws.h> 23#include <qpe/qcopenvelope_qws.h>
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25 25
26#include <qiconview.h> 26#include <qiconview.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qhbox.h> 28#include <qhbox.h>
29#include <qcombobox.h> 29#include <qcombobox.h>
30#include <qdir.h> 30#include <qdir.h>
31#include <qapplication.h> 31#include <qapplication.h>
32#include <qmainwindow.h> 32#include <qmainwindow.h>
@@ -93,29 +93,29 @@ namespace {
93 */ 93 */
94 static QMap<QString, IconViewItem*> g_stringInf; 94 static QMap<QString, IconViewItem*> g_stringInf;
95 static QMap<QString, IconViewItem*> g_stringPix; 95 static QMap<QString, IconViewItem*> g_stringPix;
96 96
97 IconViewItem::IconViewItem( QIconView* view,const QString& path, 97 IconViewItem::IconViewItem( QIconView* view,const QString& path,
98 const QString& name, int a_iconsize, bool isDir) 98 const QString& name, int a_iconsize, bool isDir)
99 : QIconViewItem( view, name ), m_path( path ), m_isDir( isDir ), 99 : QIconViewItem( view, name ), m_path( path ), m_isDir( isDir ),
100 m_noInfo( false ),m_textOnly(false),m_Pixset(false) 100 m_noInfo( false ),m_textOnly(false),m_Pixset(false)
101 { 101 {
102 m_iconsize = a_iconsize; 102 m_iconsize = a_iconsize;
103 if ( isDir ) { 103 if ( isDir ) {
104 if (!_dirPix ) { 104 if (!_dirPix ) {
105 _dirPix = new QPixmap( Resource::loadPixmap("advancedfm/FileBrowser")); 105 _dirPix = new QPixmap( Opie::Core::OResource::loadPixmap("advancedfm/FileBrowser", Opie::Core::OResource::SmallIcon));
106 } 106 }
107 } else { 107 } else {
108 if (!_unkPix ) { 108 if (!_unkPix ) {
109 _unkPix = new QPixmap( Resource::loadPixmap( "UnknownDocument" ) ); 109 _unkPix = new QPixmap( Opie::Core::OResource::loadPixmap( "UnknownDocument", Opie::Core::OResource::SmallIcon ) );
110 } 110 }
111 } 111 }
112 check_pix(); 112 check_pix();
113 } 113 }
114 114
115 inline void IconViewItem::check_pix()const 115 inline void IconViewItem::check_pix()const
116 { 116 {
117 if (_dirPix && _dirPix->width()>m_iconsize) { 117 if (_dirPix && _dirPix->width()>m_iconsize) {
118 QImage Pix = _dirPix->convertToImage(); 118 QImage Pix = _dirPix->convertToImage();
119 *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize); 119 *_dirPix = Pix.smoothScale(m_iconsize,m_iconsize);
120 } 120 }
121 if (!_cpyPix && _unkPix) { 121 if (!_cpyPix && _unkPix) {
@@ -261,42 +261,42 @@ Opie::Core::OKeyConfigManager* PIconView::manager() {
261 */ 261 */
262void PIconView::initKeys() { 262void PIconView::initKeys() {
263 Opie::Core::OKeyPair::List lst; 263 Opie::Core::OKeyPair::List lst;
264 lst.append( Opie::Core::OKeyPair::upArrowKey() ); 264 lst.append( Opie::Core::OKeyPair::upArrowKey() );
265 lst.append( Opie::Core::OKeyPair::downArrowKey() ); 265 lst.append( Opie::Core::OKeyPair::downArrowKey() );
266 lst.append( Opie::Core::OKeyPair::leftArrowKey() ); 266 lst.append( Opie::Core::OKeyPair::leftArrowKey() );
267 lst.append( Opie::Core::OKeyPair::rightArrowKey() ); 267 lst.append( Opie::Core::OKeyPair::rightArrowKey() );
268 lst.append( Opie::Core::OKeyPair::returnKey() ); 268 lst.append( Opie::Core::OKeyPair::returnKey() );
269 269
270 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config", 270 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "View-KeyBoard-Config",
271 lst, false,this, "keyconfig name" ); 271 lst, false,this, "keyconfig name" );
272 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam", 272 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Beam Current Item") , "beam",
273 Resource::loadPixmap("beam"), BeamItem, 273 Opie::Core::OResource::loadPixmap("beam", Opie::Core::OResource::SmallIcon),
274 Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton), 274 BeamItem, Opie::Core::OKeyPair(Qt::Key_B, Qt::ShiftButton),
275 this, SLOT(slotBeam())) ); 275 this, SLOT(slotBeam())) );
276 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete", 276 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Delete Current Item"), "delete",
277 Resource::loadPixmap("trash"), DeleteItem, 277 Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon),
278 Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton), 278 DeleteItem, Opie::Core::OKeyPair(Qt::Key_D, Qt::ShiftButton),
279 this, SLOT(slotTrash())) ); 279 this, SLOT(slotTrash())) );
280 m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view", 280 m_viewManager->addKeyConfig( OKeyConfigItem(tr("View Current Item"), "view",
281 Resource::loadPixmap("1to1"), ViewItem, 281 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
282 Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), 282 ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton),
283 this, SLOT(slotShowImage()))); 283 this, SLOT(slotShowImage())));
284 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info", 284 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Show Image Info") , "info",
285 Resource::loadPixmap("DocumentTypeWord"), InfoItem, 285 Opie::Core::OResource::loadPixmap("DocumentTypeWord", Opie::Core::OResource::SmallIcon),
286 Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ), 286 InfoItem, Opie::Core::OKeyPair(Qt::Key_I, Qt::ShiftButton ),
287 this, SLOT(slotImageInfo()) ) ); 287 this, SLOT(slotImageInfo()) ) );
288 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow", 288 m_viewManager->addKeyConfig( OKeyConfigItem(tr("Start slideshow"), "slideshow",
289 Resource::loadPixmap("1to1"), SlideItem, 289 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
290 Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton), 290 SlideItem, Opie::Core::OKeyPair(Qt::Key_S, Qt::ShiftButton),
291 this, SLOT(slotStartSlide()))); 291 this, SLOT(slotStartSlide())));
292 m_viewManager->load(); 292 m_viewManager->load();
293 m_viewManager->handleWidget( m_view ); 293 m_viewManager->handleWidget( m_view );
294} 294}
295 295
296 296
297/* 297/*
298 * change one dir up 298 * change one dir up
299 */ 299 */
300void PIconView::slotDirUp() 300void PIconView::slotDirUp()
301{ 301{
302 slotChangeDir( currentView()->dirLister()->dirUp( m_path ) ); 302 slotChangeDir( currentView()->dirLister()->dirUp( m_path ) );
@@ -633,25 +633,26 @@ void PIconView::slotThumbNail(const QString& _path, const QPixmap &pix) {
633 int offy = (m_iconsize-pix.height())/2; 633 int offy = (m_iconsize-pix.height())/2;
634 if (offy<0) offy=0; 634 if (offy<0) offy=0;
635 pa.drawPixmap(offset,offy,pix); 635 pa.drawPixmap(offset,offy,pix);
636 pa.end(); 636 pa.end();
637 PPixmapCache::self()->insertImage( _path, p, m_iconsize, m_iconsize ); 637 PPixmapCache::self()->insertImage( _path, p, m_iconsize, m_iconsize );
638 item->setPixmap(p,true); 638 item->setPixmap(p,true);
639 } else { 639 } else {
640 PPixmapCache::self()->insertImage( _path, pix, m_iconsize, m_iconsize ); 640 PPixmapCache::self()->insertImage( _path, pix, m_iconsize, m_iconsize );
641 item->setPixmap(pix,true); 641 item->setPixmap(pix,true);
642 } 642 }
643 643
644 } else { 644 } else {
645 PPixmapCache::self()->insertImage( _path, Resource::loadPixmap( "UnknownDocument" ), m_iconsize, m_iconsize ); 645 PPixmapCache::self()->insertImage( _path, Opie::Core::OResource::loadPixmap( "UnknownDocument",
646 Opie::Core::OResource::SmallIcon ), m_iconsize, m_iconsize );
646 } 647 }
647 g_stringPix.remove( _path ); 648 g_stringPix.remove( _path );
648 m_view->arrangeItemsInGrid(true); 649 m_view->arrangeItemsInGrid(true);
649} 650}
650 651
651 652
652/* 653/*
653 * FIXME rename 654 * FIXME rename
654 */ 655 */
655void PIconView::slotRename() { 656void PIconView::slotRename() {
656 657
657} 658}
diff --git a/noncore/graphics/opie-eye/gui/imageinfoui.cpp b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
index 7afb62d..8f70602 100644
--- a/noncore/graphics/opie-eye/gui/imageinfoui.cpp
+++ b/noncore/graphics/opie-eye/gui/imageinfoui.cpp
@@ -10,27 +10,27 @@
10#include <qwhatsthis.h> 10#include <qwhatsthis.h>
11#include <qimage.h> 11#include <qimage.h>
12#include <qpixmap.h> 12#include <qpixmap.h>
13#include <qstring.h> 13#include <qstring.h>
14#include <qfileinfo.h> 14#include <qfileinfo.h>
15 15
16#include "lib/slavemaster.h" 16#include "lib/slavemaster.h"
17#include "lib/imagecache.h" 17#include "lib/imagecache.h"
18 18
19#include <opie2/oconfig.h> 19#include <opie2/oconfig.h>
20#include <opie2/okeyconfigwidget.h> 20#include <opie2/okeyconfigwidget.h>
21#include <opie2/odebug.h> 21#include <opie2/odebug.h>
22#include <opie2/oresource.h>
22 23
23#include <qpe/qcopenvelope_qws.h> 24#include <qpe/qcopenvelope_qws.h>
24#include <qpe/resource.h>
25 25
26static const int THUMBSIZE = 128; 26static const int THUMBSIZE = 128;
27 27
28using namespace Opie::Core; 28using namespace Opie::Core;
29 29
30imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, WFlags fl ) 30imageinfo::imageinfo(Opie::Core::OConfig *cfg,QWidget* parent, const char* name, WFlags fl )
31 : QWidget( parent, name, fl ) 31 : QWidget( parent, name, fl )
32{ 32{
33 m_viewManager = 0; 33 m_viewManager = 0;
34 m_cfg = cfg; 34 m_cfg = cfg;
35 init(name); 35 init(name);
36 initKeys(); 36 initKeys();
@@ -63,26 +63,26 @@ void imageinfo::initKeys()
63 } 63 }
64#endif 64#endif
65 Opie::Core::OKeyPair::List lst; 65 Opie::Core::OKeyPair::List lst;
66 lst.append( Opie::Core::OKeyPair::upArrowKey() ); 66 lst.append( Opie::Core::OKeyPair::upArrowKey() );
67 lst.append( Opie::Core::OKeyPair::downArrowKey() ); 67 lst.append( Opie::Core::OKeyPair::downArrowKey() );
68 lst.append( Opie::Core::OKeyPair::leftArrowKey() ); 68 lst.append( Opie::Core::OKeyPair::leftArrowKey() );
69 lst.append( Opie::Core::OKeyPair::rightArrowKey() ); 69 lst.append( Opie::Core::OKeyPair::rightArrowKey() );
70 lst.append( Opie::Core::OKeyPair::returnKey() ); 70 lst.append( Opie::Core::OKeyPair::returnKey() );
71 71
72 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys", 72 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "imageinfo_keys",
73 lst, false,this, "keyconfig name" ); 73 lst, false,this, "keyconfig name" );
74 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview", 74 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Full Image"), "infoview",
75 Resource::loadPixmap("1to1"), ViewItem, 75 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
76 Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton), 76 ViewItem, Opie::Core::OKeyPair(Qt::Key_V, Qt::ShiftButton),
77 this, SLOT(slotShowImage()))); 77 this, SLOT(slotShowImage())));
78 m_viewManager->load(); 78 m_viewManager->load();
79 m_viewManager->handleWidget( this ); 79 m_viewManager->handleWidget( this );
80 m_viewManager->handleWidget( TextView1 ); 80 m_viewManager->handleWidget( TextView1 );
81} 81}
82 82
83void imageinfo::slotShowImage() 83void imageinfo::slotShowImage()
84{ 84{
85 emit dispImage(currentFile); 85 emit dispImage(currentFile);
86} 86}
87 87
88void imageinfo::init(const char* name) { 88void imageinfo::init(const char* name) {
@@ -126,25 +126,25 @@ void imageinfo::init(const char* name) {
126 this, SLOT(slotThumbNail(const QString&, const QPixmap&))); 126 this, SLOT(slotThumbNail(const QString&, const QPixmap&)));
127} 127}
128 128
129void imageinfo::slotChangeName(const QString&_path) 129void imageinfo::slotChangeName(const QString&_path)
130{ 130{
131 currentFile=_path; 131 currentFile=_path;
132 QFileInfo fi(_path); 132 QFileInfo fi(_path);
133 fnameLabel->setText("<qt><center><b>"+fi.fileName()+"</b></center></qt>"); 133 fnameLabel->setText("<qt><center><b>"+fi.fileName()+"</b></center></qt>");
134 SlaveMaster::self()->imageInfo( currentFile ); 134 SlaveMaster::self()->imageInfo( currentFile );
135 135
136 QPixmap*m_pix = PPixmapCache::self()->cachedImage( _path, THUMBSIZE,THUMBSIZE ); 136 QPixmap*m_pix = PPixmapCache::self()->cachedImage( _path, THUMBSIZE,THUMBSIZE );
137 if (!m_pix) { 137 if (!m_pix) {
138 PixmapLabel1->setPixmap(QPixmap( Resource::loadPixmap( "UnknownDocument" ))); 138 PixmapLabel1->setPixmap(QPixmap( Opie::Core::OResource::loadPixmap( "UnknownDocument", Opie::Core::OResource::SmallIcon )));
139 SlaveMaster::self()->thumbNail(currentFile,THUMBSIZE,THUMBSIZE); 139 SlaveMaster::self()->thumbNail(currentFile,THUMBSIZE,THUMBSIZE);
140 } else { 140 } else {
141 PixmapLabel1->setPixmap(*m_pix); 141 PixmapLabel1->setPixmap(*m_pix);
142 } 142 }
143} 143}
144 144
145imageinfo::~imageinfo() 145imageinfo::~imageinfo()
146{ 146{
147 { 147 {
148 QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" ); 148 QCopEnvelope( "QPE/Application/opie-eye_slave", "refDown()" );
149 } 149 }
150 if (m_viewManager) { 150 if (m_viewManager) {
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp
index b919ca8..cda1a96 100644
--- a/noncore/graphics/opie-eye/gui/imageview.cpp
+++ b/noncore/graphics/opie-eye/gui/imageview.cpp
@@ -1,19 +1,19 @@
1#include "imageview.h" 1#include "imageview.h"
2 2
3#include <opie2/odebug.h> 3#include <opie2/odebug.h>
4#include <opie2/oconfig.h> 4#include <opie2/oconfig.h>
5#include <opie2/okeyconfigwidget.h> 5#include <opie2/okeyconfigwidget.h>
6#include <opie2/oresource.h>
6 7
7#include <qpe/resource.h>
8#include <qpe/qpeapplication.h> 8#include <qpe/qpeapplication.h>
9#include <qpe/qcopenvelope_qws.h> 9#include <qpe/qcopenvelope_qws.h>
10 10
11#include <qpopupmenu.h> 11#include <qpopupmenu.h>
12#include <qtimer.h> 12#include <qtimer.h>
13#include <qaction.h> 13#include <qaction.h>
14 14
15using namespace Opie::Core; 15using namespace Opie::Core;
16 16
17ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl ) 17ImageView::ImageView(Opie::Core::OConfig *cfg, QWidget* parent, const char* name, WFlags fl )
18 : Opie::MM::OImageScrollView(parent,name,fl) 18 : Opie::MM::OImageScrollView(parent,name,fl)
19{ 19{
@@ -154,61 +154,61 @@ void ImageView::initKeys()
154 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys", 154 m_viewManager = new Opie::Core::OKeyConfigManager(m_cfg, "image_view_keys",
155 lst, false,this, "image_view_keys" ); 155 lst, false,this, "image_view_keys" );
156 156
157 /** 157 /**
158 * Handle KeyEvents when they're pressed. This avoids problems 158 * Handle KeyEvents when they're pressed. This avoids problems
159 * with 'double next' on Return. 159 * with 'double next' on Return.
160 * The Return press would switch to this view and the return 160 * The Return press would switch to this view and the return
161 * release would emit the dispNext Signal. 161 * release would emit the dispNext Signal.
162 */ 162 */
163 m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed ); 163 m_viewManager->setEventMask( Opie::Core::OKeyConfigManager::MaskPressed );
164 164
165 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo", 165 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("View Image Info"), "imageviewinfo",
166 Resource::loadPixmap("1to1"), ViewInfo, 166 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
167 Opie::Core::OKeyPair(Qt::Key_I,0), 167 ViewInfo, Opie::Core::OKeyPair(Qt::Key_I,0),
168 this, SLOT(slotShowImageInfo()))); 168 this, SLOT(slotShowImageInfo())));
169 169
170 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate", 170 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autorotate"), "imageautorotate",
171 Resource::loadPixmap("rotate"), Autorotate, 171 Opie::Core::OResource::loadPixmap("rotate", Opie::Core::OResource::SmallIcon),
172 Opie::Core::OKeyPair(Qt::Key_R,0), 172 Autorotate, Opie::Core::OKeyPair(Qt::Key_R,0),
173 this, SIGNAL(toggleAutorotate()))); 173 this, SIGNAL(toggleAutorotate())));
174 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale", 174 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle autoscale"), "imageautoscale",
175 Resource::loadPixmap("1to1"), Autoscale, 175 Opie::Core::OResource::loadPixmap("1to1", Opie::Core::OResource::SmallIcon),
176 Opie::Core::OKeyPair(Qt::Key_S,0), 176 Autoscale, Opie::Core::OKeyPair(Qt::Key_S,0),
177 this, SIGNAL(toggleAutoscale()))); 177 this, SIGNAL(toggleAutoscale())));
178 178
179 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext", 179 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to next image"), "imageshownext",
180 Resource::loadPixmap("forward"), ShowNext, 180 Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon),
181 Opie::Core::OKeyPair(Qt::Key_Return,0), 181 ShowNext, Opie::Core::OKeyPair(Qt::Key_Return,0),
182 this, SIGNAL(dispNext()))); 182 this, SIGNAL(dispNext())));
183 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev", 183 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Switch to previous image"), "imageshowprev",
184 Resource::loadPixmap("back"), ShowPrevious, 184 Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
185 Opie::Core::OKeyPair(Qt::Key_P,0), 185 ShowPrevious, Opie::Core::OKeyPair(Qt::Key_P,0),
186 this, SIGNAL(dispPrev()))); 186 this, SIGNAL(dispPrev())));
187 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle fullscreen"), "imagefullscreen", 187 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle fullscreen"), "imagefullscreen",
188 Resource::loadPixmap("fullscreen"), FullScreen, 188 Opie::Core::OResource::loadPixmap("fullscreen", Opie::Core::OResource::SmallIcon),
189 Opie::Core::OKeyPair(Qt::Key_F,0), 189 FullScreen, Opie::Core::OKeyPair(Qt::Key_F,0),
190 this, SIGNAL(toggleFullScreen()))); 190 this, SIGNAL(toggleFullScreen())));
191 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer", 191 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Toggle thumbnail"), "imagezoomer",
192 Resource::loadPixmap("mag"), Zoomer, 192 Opie::Core::OResource::loadPixmap("mag", Opie::Core::OResource::SmallIcon),
193 Opie::Core::OKeyPair(Qt::Key_T,0), 193 Zoomer, Opie::Core::OKeyPair(Qt::Key_T,0),
194 this, SIGNAL(toggleZoomer()))); 194 this, SIGNAL(toggleZoomer())));
195 195
196 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Increase brightness"), "incbrightness", 196 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Increase brightness"), "incbrightness",
197 Resource::loadPixmap("up"), Incbrightness, 197 Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon),
198 Opie::Core::OKeyPair(Qt::Key_B,0), 198 Incbrightness, Opie::Core::OKeyPair(Qt::Key_B,0),
199 this, SIGNAL(incBrightness()))); 199 this, SIGNAL(incBrightness())));
200 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Decrease brightness"), "decbrightness", 200 m_viewManager->addKeyConfig( Opie::Core::OKeyConfigItem(tr("Decrease brightness"), "decbrightness",
201 Resource::loadPixmap("down"), Decbrightness, 201 Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon),
202 Opie::Core::OKeyPair(Qt::Key_D,0), 202 Decbrightness, Opie::Core::OKeyPair(Qt::Key_D,0),
203 this, SIGNAL(decBrightness()))); 203 this, SIGNAL(decBrightness())));
204 m_viewManager->handleWidget( this ); 204 m_viewManager->handleWidget( this );
205 m_viewManager->load(); 205 m_viewManager->load();
206} 206}
207 207
208void ImageView::keyReleaseEvent(QKeyEvent * e) 208void ImageView::keyReleaseEvent(QKeyEvent * e)
209{ 209{
210 if (!e || e->state()!=0) { 210 if (!e || e->state()!=0) {
211 return; 211 return;
212 } 212 }
213 if (e->key()==Qt::Key_Escape) { 213 if (e->key()==Qt::Key_Escape) {
214 if (fullScreen()) { 214 if (fullScreen()) {
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp
index 3efbb53..d4c5b42 100644
--- a/noncore/graphics/opie-eye/gui/mainwindow.cpp
+++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp
@@ -12,26 +12,26 @@
12#include "basesetup.h" 12#include "basesetup.h"
13 13
14#include <iface/ifaceinfo.h> 14#include <iface/ifaceinfo.h>
15#include <iface/dirview.h> 15#include <iface/dirview.h>
16 16
17#include <opie2/odebug.h> 17#include <opie2/odebug.h>
18#include <opie2/owidgetstack.h> 18#include <opie2/owidgetstack.h>
19#include <opie2/oapplicationfactory.h> 19#include <opie2/oapplicationfactory.h>
20#include <opie2/otabwidget.h> 20#include <opie2/otabwidget.h>
21#include <opie2/okeyconfigwidget.h> 21#include <opie2/okeyconfigwidget.h>
22#include <opie2/owait.h> 22#include <opie2/owait.h>
23#include <opie2/oapplication.h> 23#include <opie2/oapplication.h>
24#include <opie2/oresource.h>
24 25
25#include <qpe/resource.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27#include <qpe/ir.h> 27#include <qpe/ir.h>
28#include <qpe/storage.h> 28#include <qpe/storage.h>
29#include <qpe/applnk.h> 29#include <qpe/applnk.h>
30 30
31#include <qtoolbar.h> 31#include <qtoolbar.h>
32#include <qtoolbutton.h> 32#include <qtoolbutton.h>
33#include <qlayout.h> 33#include <qlayout.h>
34#include <qdialog.h> 34#include <qdialog.h>
35#include <qmap.h> 35#include <qmap.h>
36#include <qtimer.h> 36#include <qtimer.h>
37#include <qframe.h> 37#include <qframe.h>
@@ -508,155 +508,180 @@ void PMainWindow::dirChanged()
508 508
509void PMainWindow::showToolbar(bool how) 509void PMainWindow::showToolbar(bool how)
510{ 510{
511 if (!how) toolBar->hide(); 511 if (!how) toolBar->hide();
512 else toolBar->show(); 512 else toolBar->show();
513 if (autoSave) { 513 if (autoSave) {
514 m_cfg->writeEntry("showtoolbar",how); 514 m_cfg->writeEntry("showtoolbar",how);
515 } 515 }
516} 516}
517 517
518void PMainWindow::setupActions() 518void PMainWindow::setupActions()
519{ 519{
520 m_aDirUp = new QAction( tr( "Go dir up" ), Resource::loadIconSet( "up" ), 0, 0, this, 0, true ); 520 m_aDirUp = new QAction( tr( "Go dir up" ), Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ),
521 0, 0, this, 0, true );
521 m_aDirUp->setToggleAction(false); 522 m_aDirUp->setToggleAction(false);
522 connect(m_aDirUp,SIGNAL(activated()),m_view,SLOT(slotDirUp())); 523 connect(m_aDirUp,SIGNAL(activated()),m_view,SLOT(slotDirUp()));
523 524
524 if ( Ir::supported() ) { 525 if ( Ir::supported() ) {
525 m_aBeam = new QAction( tr( "Beam file" ), Resource::loadIconSet( "beam" ),0, 0, this, 0, true ); 526 m_aBeam = new QAction( tr( "Beam file" ), Opie::Core::OResource::loadPixmap( "beam", Opie::Core::OResource::SmallIcon ),
527 0, 0, this, 0, true );
526 m_aBeam->setToggleAction(false); 528 m_aBeam->setToggleAction(false);
527 connect(m_aBeam,SIGNAL(activated()),m_view,SLOT(slotBeam())); 529 connect(m_aBeam,SIGNAL(activated()),m_view,SLOT(slotBeam()));
528 } else { 530 } else {
529 m_aBeam = 0; 531 m_aBeam = 0;
530 } 532 }
531 533
532 m_aShowInfo = new QAction( tr( "Show imageinfo" ), Resource::loadIconSet( "edit" ), 0, 0, this, 0, true ); 534 m_aShowInfo = new QAction( tr( "Show imageinfo" ), Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
535 0, 0, this, 0, true );
533 m_aShowInfo->setToggleAction(false); 536 m_aShowInfo->setToggleAction(false);
534 connect(m_aShowInfo,SIGNAL(activated()),m_view,SLOT(slotImageInfo())); 537 connect(m_aShowInfo,SIGNAL(activated()),m_view,SLOT(slotImageInfo()));
535 538
536 m_aTrash = new QAction( tr( "Delete file" ), Resource::loadIconSet("trash"), 0, 0, this, 0, true ); 539 m_aTrash = new QAction( tr( "Delete file" ), Opie::Core::OResource::loadPixmap("trash", Opie::Core::OResource::SmallIcon),
540 0, 0, this, 0, true );
537 m_aTrash->setToggleAction(false); 541 m_aTrash->setToggleAction(false);
538 connect(m_aTrash,SIGNAL(activated()),m_view,SLOT(slotTrash())); 542 connect(m_aTrash,SIGNAL(activated()),m_view,SLOT(slotTrash()));
539 543
540 m_aViewfile = new QAction( tr( "Display image" ), Resource::loadIconSet("mag"), 0, 0, this, 0, true ); 544 m_aViewfile = new QAction( tr( "Display image" ), Opie::Core::OResource::loadPixmap("mag", Opie::Core::OResource::SmallIcon),
545 0, 0, this, 0, true );
541 m_aViewfile->setToggleAction(false); 546 m_aViewfile->setToggleAction(false);
542 connect(m_aViewfile,SIGNAL(activated()),m_view,SLOT(slotShowImage())); 547 connect(m_aViewfile,SIGNAL(activated()),m_view,SLOT(slotShowImage()));
543 548
544 m_aStartSlide = new QAction( tr( "Start slideshow" ), Resource::loadIconSet("play"),0, 0, this, 0, true ); 549 m_aStartSlide = new QAction( tr( "Start slideshow" ), Opie::Core::OResource::loadPixmap("play", Opie::Core::OResource::SmallIcon),
550 0, 0, this, 0, true );
545 m_aStartSlide->setToggleAction(false); 551 m_aStartSlide->setToggleAction(false);
546 connect(m_aStartSlide,SIGNAL(activated()),m_view,SLOT(slotStartSlide())); 552 connect(m_aStartSlide,SIGNAL(activated()),m_view,SLOT(slotStartSlide()));
547 553
548 m_aHideToolbar = new QAction( tr( "Show toolbar" ), Resource::loadIconSet( "UtilsIcon" ), 0, 0, this, 0, true ); 554 m_aHideToolbar = new QAction( tr( "Show toolbar" ), Opie::Core::OResource::loadPixmap( "UtilsIcon",
555 Opie::Core::OResource::SmallIcon ), 0, 0, this, 0, true );
549 m_aHideToolbar->setOn (true); 556 m_aHideToolbar->setOn (true);
550 connect(m_aHideToolbar,SIGNAL(toggled(bool)),this,SLOT(showToolbar(bool))); 557 connect(m_aHideToolbar,SIGNAL(toggled(bool)),this,SLOT(showToolbar(bool)));
551 558
552 m_aSetup = new QAction( tr( "Settings" ), Resource::loadIconSet("SettingsIcon"), 0, 0, this, 0, true ); 559 m_aSetup = new QAction( tr( "Settings" ), Opie::Core::OResource::loadPixmap("SettingsIcon", Opie::Core::OResource::SmallIcon),
560 0, 0, this, 0, true );
553 m_aSetup->setToggleAction(false); 561 m_aSetup->setToggleAction(false);
554 connect(m_aSetup,SIGNAL(activated()),this,SLOT(slotConfig())); 562 connect(m_aSetup,SIGNAL(activated()),this,SLOT(slotConfig()));
555 563
556 m_gListViewMode = new QActionGroup(this,"Select listmode",true); 564 m_gListViewMode = new QActionGroup(this,"Select listmode",true);
557 connect(m_gListViewMode,SIGNAL(selected(QAction*)),this,SLOT(listviewselected(QAction*))); 565 connect(m_gListViewMode,SIGNAL(selected(QAction*)),this,SLOT(listviewselected(QAction*)));
558 566
559 m_aDirLong = new QAction( tr( "Thumbnail and Imageinfo" ),Resource::loadIconSet("opie-eye/opie-eye-thumb"), 0, 0, this, 0, true ); 567 m_aDirLong = new QAction( tr( "Thumbnail and Imageinfo" ),Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-thumb",
568 Opie::Core::OResource::SmallIcon), 0, 0, this, 0, true );
560 m_aDirLong->setToggleAction(true); 569 m_aDirLong->setToggleAction(true);
561 m_aDirShort = new QAction( tr( "Thumbnail and name" ),Resource::loadIconSet("opie-eye/opie-eye-thumbonly"), 0, 0, this, 0, true ); 570 m_aDirShort = new QAction( tr( "Thumbnail and name" ),Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-thumbonly",
571 Opie::Core::OResource::SmallIcon), 0, 0, this, 0, true );
562 m_aDirShort->setToggleAction(true); 572 m_aDirShort->setToggleAction(true);
563 m_aDirName = new QAction( tr( "Name only" ), Resource::loadIconSet("opie-eye/opie-eye-textview"),0, 0, this, 0, true ); 573 m_aDirName = new QAction( tr( "Name only" ), Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-textview",
574 Opie::Core::OResource::SmallIcon),0, 0, this, 0, true );
564 m_aDirName->setToggleAction(true); 575 m_aDirName->setToggleAction(true);
565 int mode = m_cfg->readNumEntry("ListViewMode", 1); 576 int mode = m_cfg->readNumEntry("ListViewMode", 1);
566 if (mode < 1 || mode>3) mode = 1; 577 if (mode < 1 || mode>3) mode = 1;
567 switch (mode) { 578 switch (mode) {
568 case 3: 579 case 3:
569 m_aDirName->setOn(true); 580 m_aDirName->setOn(true);
570 break; 581 break;
571 case 2: 582 case 2:
572 m_aDirShort->setOn(true); 583 m_aDirShort->setOn(true);
573 break; 584 break;
574 case 1: 585 case 1:
575 default: 586 default:
576 m_aDirLong->setOn(true); 587 m_aDirLong->setOn(true);
577 } 588 }
578 m_gListViewMode->insert(m_aDirLong); 589 m_gListViewMode->insert(m_aDirLong);
579 m_gListViewMode->insert(m_aDirShort); 590 m_gListViewMode->insert(m_aDirShort);
580 m_gListViewMode->insert(m_aDirName); 591 m_gListViewMode->insert(m_aDirName);
581 592
582 m_gPrevNext = new QActionGroup(this,"imageprevnext",false); 593 m_gPrevNext = new QActionGroup(this,"imageprevnext",false);
583 m_aNext = new QAction( tr( "Next image" ), Resource::loadIconSet("forward"), 0, 0, this, 0, true ); 594 m_aNext = new QAction( tr( "Next image" ),Opie::Core::OResource::loadPixmap("forward", Opie::Core::OResource::SmallIcon),
595 0, 0, this, 0, true );
584 m_aNext->setToggleAction(false); 596 m_aNext->setToggleAction(false);
585 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext())); 597 connect(m_aNext,SIGNAL(activated()),m_view,SLOT(slotShowNext()));
586 m_aPrevious = new QAction( tr( "Previous image" ), Resource::loadIconSet("back"), 0, 0, this, 0, true ); 598 m_aPrevious = new QAction( tr( "Previous image" ),Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon),
599 0, 0, this, 0, true );
587 m_aPrevious->setToggleAction(false); 600 m_aPrevious->setToggleAction(false);
588 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev())); 601 connect(m_aPrevious,SIGNAL(activated()),m_view,SLOT(slotShowPrev()));
589 m_gPrevNext->insert(m_aPrevious); 602 m_gPrevNext->insert(m_aPrevious);
590 m_gPrevNext->insert(m_aNext); 603 m_gPrevNext->insert(m_aNext);
591 604
592 m_aFullScreen = new QAction( tr( "Show images fullscreen" ), 605 m_aFullScreen = new QAction( tr( "Show images fullscreen" ),
593 Resource::loadIconSet("fullscreen"), 0, 0, this, 0, true ); 606 Opie::Core::OResource::loadPixmap("fullscreen", Opie::Core::OResource::SmallIcon), 0, 0, this, 0, true );
594 m_aFullScreen->setToggleAction(true); 607 m_aFullScreen->setToggleAction(true);
595 if (autoSave) { 608 if (autoSave) {
596 m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false)); 609 m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false));
597 } else { 610 } else {
598 m_aFullScreen->setOn(false); 611 m_aFullScreen->setOn(false);
599 } 612 }
600 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); 613 connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool)));
601 614
602 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false); 615 m_gDisplayType = new QActionGroup(this,"imagedisplaytype",false);
603 m_aAutoRotate = new QAction( tr( "Auto rotate images" ), Resource::loadIconSet( "rotate" ), 0, 0, this, 0, true ); 616 m_aAutoRotate = new QAction( tr( "Auto rotate images" ),
617 Opie::Core::OResource::loadPixmap( "rotate", Opie::Core::OResource::SmallIcon ),
618 0, 0, this, 0, true );
604 m_aAutoRotate->setToggleAction(true); 619 m_aAutoRotate->setToggleAction(true);
605 620
606 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { 621 if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) {
607 m_aAutoRotate->setOn(true); 622 m_aAutoRotate->setOn(true);
608 } else { 623 } else {
609 m_aAutoRotate->setOn(false); 624 m_aAutoRotate->setOn(false);
610 } 625 }
611 if (autoSave) { 626 if (autoSave) {
612 m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn())); 627 m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn()));
613 } 628 }
614 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); 629 connect(m_aAutoRotate,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool)));
615 630
616 m_aUnscaled = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); 631 m_aUnscaled = new QAction( tr( "Show images unscaled" ),
632 Opie::Core::OResource::loadPixmap( "1to1", Opie::Core::OResource::SmallIcon ),
633 0, 0, this, 0, true );
617 m_aUnscaled->setToggleAction(true); 634 m_aUnscaled->setToggleAction(true);
618 connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); 635 connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool)));
619 if (autoSave) { 636 if (autoSave) {
620 m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false)); 637 m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false));
621 } else { 638 } else {
622 m_aUnscaled->setOn(false); 639 m_aUnscaled->setOn(false);
623 } 640 }
624 641
625 m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ), Resource::loadIconSet( "mag" ), 0, 0, this, 0, true ); 642 m_aZoomer = new QAction( tr( "Show zoomer window when unscaled" ),
643 Opie::Core::OResource::loadPixmap( "mag", Opie::Core::OResource::SmallIcon ),
644 0, 0, this, 0, true );
626 m_aZoomer->setToggleAction(true); 645 m_aZoomer->setToggleAction(true);
627 if (autoSave) { 646 if (autoSave) {
628 m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true)); 647 m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true));
629 } else { 648 } else {
630 m_aZoomer->setOn (true); 649 m_aZoomer->setOn (true);
631 } 650 }
632 connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); 651 connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool)));
633 m_gDisplayType->insert(m_aAutoRotate); 652 m_gDisplayType->insert(m_aAutoRotate);
634 m_gDisplayType->insert(m_aUnscaled); 653 m_gDisplayType->insert(m_aUnscaled);
635 m_gDisplayType->insert(m_aZoomer); 654 m_gDisplayType->insert(m_aZoomer);
636 655
637 m_hGroup = new QActionGroup(this,"actioncollection",false); 656 m_hGroup = new QActionGroup(this,"actioncollection",false);
638 m_hGroup->insert(m_aFullScreen); 657 m_hGroup->insert(m_aFullScreen);
639 658
640 if (!m_SmallWindow) { 659 if (!m_SmallWindow) {
641 m_aForceSmall = new QAction(tr("Dont show seperate windows"),Resource::loadIconSet( "AppsIcon" ), 0, 0, this, 0, true); 660 m_aForceSmall = new QAction(tr("Dont show seperate windows"),
661 Opie::Core::OResource::loadPixmap( "AppsIcon", Opie::Core::OResource::SmallIcon ),
662 0, 0, this, 0, true);
642 m_aForceSmall->setToggleAction(true); 663 m_aForceSmall->setToggleAction(true);
643 connect(m_aForceSmall,SIGNAL(toggled(bool)),this,SLOT(slotForceSmall(bool))); 664 connect(m_aForceSmall,SIGNAL(toggled(bool)),this,SLOT(slotForceSmall(bool)));
644 } else { 665 } else {
645 m_aForceSmall = 0; 666 m_aForceSmall = 0;
646 } 667 }
647 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false); 668 m_setCurrentBrightness = new QAction(tr("Display brightness..."), 0, 0, this, 0, false);
648 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness())); 669 connect(m_setCurrentBrightness,SIGNAL(activated()),this,SLOT(setupBrightness()));
649 m_IncBrightness = new QAction(tr("Increase brightness by 5"),Resource::loadIconSet( "up" ),0, 0, this, 0, false); 670 m_IncBrightness = new QAction(tr("Increase brightness by 5"),
650 m_DecBrightness = new QAction(tr("Decrease brightness by 5"),Resource::loadIconSet( "down" ),0, 0, this, 0, false); 671 Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ),
672 0, 0, this, 0, false);
673 m_DecBrightness = new QAction(tr("Decrease brightness by 5"),
674 Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ),
675 0, 0, this, 0, false);
651 m_hBright = new QActionGroup(this,"actioncollection",false), 676 m_hBright = new QActionGroup(this,"actioncollection",false),
652 m_hBright->insert(m_setCurrentBrightness); 677 m_hBright->insert(m_setCurrentBrightness);
653 m_hBright->insert(m_IncBrightness); 678 m_hBright->insert(m_IncBrightness);
654 m_hBright->insert(m_DecBrightness); 679 m_hBright->insert(m_DecBrightness);
655} 680}
656 681
657void PMainWindow::setupBrightness() 682void PMainWindow::setupBrightness()
658{ 683{
659 if (!m_disp) { 684 if (!m_disp) {
660 return; 685 return;
661 } 686 }
662 bool reshow=false; 687 bool reshow=false;
@@ -711,37 +736,39 @@ void PMainWindow::setupMenu()
711 menuBar()->insertItem( tr( "Show" ), dispMenu ); 736 menuBar()->insertItem( tr( "Show" ), dispMenu );
712 settingsMenu = new QPopupMenu( menuBar() ); 737 settingsMenu = new QPopupMenu( menuBar() );
713 menuBar()->insertItem( tr( "Settings" ), settingsMenu ); 738 menuBar()->insertItem( tr( "Settings" ), settingsMenu );
714 739
715 m_aViewfile->addTo(fileMenu); 740 m_aViewfile->addTo(fileMenu);
716 m_aShowInfo->addTo(fileMenu); 741 m_aShowInfo->addTo(fileMenu);
717 m_aStartSlide->addTo(fileMenu); 742 m_aStartSlide->addTo(fileMenu);
718 743
719 fileMenu->insertSeparator(); 744 fileMenu->insertSeparator();
720 m_aDirUp->addTo( fileMenu ); 745 m_aDirUp->addTo( fileMenu );
721 746
722 fsMenu = new QPopupMenu(fileMenu); 747 fsMenu = new QPopupMenu(fileMenu);
723 fileMenu->insertItem(Resource::loadIconSet( "cardmon/pcmcia" ),tr("Select filesystem"),fsMenu); 748 fileMenu->insertItem(Opie::Core::OResource::loadPixmap( "cardmon/pcmcia", Opie::Core::OResource::SmallIcon ),
749 tr("Select filesystem"),fsMenu);
724 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) ); 750 connect( fsMenu, SIGNAL( activated( int ) ), this, SLOT(slotSelectDir( int ) ) );
725 dirChanged(); 751 dirChanged();
726 752
727 if ( m_aBeam ) { 753 if ( m_aBeam ) {
728 fileMenu->insertSeparator(); 754 fileMenu->insertSeparator();
729 m_aBeam->addTo( fileMenu ); 755 m_aBeam->addTo( fileMenu );
730 } 756 }
731 fileMenu->insertSeparator(); 757 fileMenu->insertSeparator();
732 m_aTrash->addTo(fileMenu); 758 m_aTrash->addTo(fileMenu);
733 759
734 listviewMenu = new QPopupMenu(dispMenu); 760 listviewMenu = new QPopupMenu(dispMenu);
735 dispMenu->insertItem(Resource::loadIconSet("opie-eye/opie-eye-thumb"),tr("Listview mode"),listviewMenu); 761 dispMenu->insertItem(Opie::Core::OResource::loadPixmap("opie-eye/opie-eye-thumb", Opie::Core::OResource::SmallIcon),
762 tr("Listview mode"),listviewMenu);
736 m_gListViewMode->addTo(listviewMenu); 763 m_gListViewMode->addTo(listviewMenu);
737 dispMenu->insertSeparator(); 764 dispMenu->insertSeparator();
738 m_aFullScreen->addTo(dispMenu); 765 m_aFullScreen->addTo(dispMenu);
739 m_gDisplayType->addTo(dispMenu); 766 m_gDisplayType->addTo(dispMenu);
740 dispMenu->insertSeparator(); 767 dispMenu->insertSeparator();
741 m_gPrevNext->addTo(dispMenu); 768 m_gPrevNext->addTo(dispMenu);
742 dispMenu->insertSeparator(); 769 dispMenu->insertSeparator();
743 m_hBright->addTo(dispMenu); 770 m_hBright->addTo(dispMenu);
744 m_hBright->setEnabled(false); 771 m_hBright->setEnabled(false);
745 772
746 if (m_aForceSmall) { 773 if (m_aForceSmall) {
747 dispMenu->insertSeparator(); 774 dispMenu->insertSeparator();
diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
index aa15d31..5680454 100644
--- a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
+++ b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
@@ -35,14 +35,14 @@ void ViewModeButton::slotChange( int i ) {
35 case 1: 35 case 1:
36 name = "opie-eye/opie-eye-thumb"; 36 name = "opie-eye/opie-eye-thumb";
37 break; 37 break;
38 case 2: 38 case 2:
39 name = "opie-eye/opie-eye-thumbonly"; 39 name = "opie-eye/opie-eye-thumbonly";
40 break; 40 break;
41 case 3: 41 case 3:
42 name = "opie-eye/opie-eye-textview"; 42 name = "opie-eye/opie-eye-textview";
43 break; 43 break;
44 } 44 }
45 45
46 owarn << "foo " << name << oendl; 46 owarn << "foo " << name << oendl;
47 setIconSet( Resource::loadIconSet( name ) ); 47 setIconSet( Opie::Core::OResource::loadPixmap( name, Opie::Core::OResource::SmallIcon ) );
48} 48}
diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.h b/noncore/graphics/opie-eye/gui/viewmodebutton.h
index 48f0e67..1637888 100644
--- a/noncore/graphics/opie-eye/gui/viewmodebutton.h
+++ b/noncore/graphics/opie-eye/gui/viewmodebutton.h
@@ -1,21 +1,21 @@
1/* 1/*
2 * GPLv2 only 2 * GPLv2 only
3 * zecke@handhelds.org 3 * zecke@handhelds.org
4 */ 4 */
5 5
6#ifndef PHUNK_VIEW_MODE_BUTTON_H 6#ifndef PHUNK_VIEW_MODE_BUTTON_H
7#define PHUNK_VIEW_MODE_BUTTON_H 7#define PHUNK_VIEW_MODE_BUTTON_H
8 8
9#include <qpe/resource.h> 9#include <opie2/oresource.h>
10 10
11#include <qtoolbutton.h> 11#include <qtoolbutton.h>
12 12
13class ViewModeButton : public QToolButton { 13class ViewModeButton : public QToolButton {
14 Q_OBJECT 14 Q_OBJECT
15public: 15public:
16 ViewModeButton( QToolBar*,int def=1 ); 16 ViewModeButton( QToolBar*,int def=1 );
17 ~ViewModeButton(); 17 ~ViewModeButton();
18 18
19signals: 19signals:
20 void changeMode( int ); 20 void changeMode( int );
21private slots: 21private slots: