author | drw <drw> | 2005-06-09 21:17:15 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-09 21:17:15 (UTC) |
commit | d5c8de3585a6e94c18156e51299f1e49cc992285 (patch) (side-by-side diff) | |
tree | e7a0bf5f44e7d972904c748d8c03f97ae52c5c87 | |
parent | 346a2cd09c2c28bd4d2086b0c152dd348913eaa9 (diff) | |
download | opie-d5c8de3585a6e94c18156e51299f1e49cc992285.zip opie-d5c8de3585a6e94c18156e51299f1e49cc992285.tar.gz opie-d5c8de3585a6e94c18156e51299f1e49cc992285.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sysinfo/sysinfo.cpp | 4 | ||||
-rw-r--r-- | noncore/settings/sysinfo/versioninfo.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 2a269b8..ac6e1fa 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -9,36 +9,36 @@ ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "benchmarkinfo.h" /* OPIE */ #include <opie2/odebug.h> #include <opie2/ostorageinfo.h> #include <opie2/olistview.h> +#include <opie2/oresource.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpedecoration_qws.h> -#include <qpe/resource.h> #include <qpe/config.h> using namespace Opie::Core; using namespace Opie::Ui; /* QT */ #include <qclipboard.h> #include <qcolor.h> #include <qcombobox.h> #include <qdirectpainter_qws.h> #include <qfile.h> #include <qtextstream.h> #include <qfiledialog.h> #include <qlabel.h> #include <qlayout.h> #include <qpainter.h> #include <qpushbutton.h> @@ -316,33 +316,33 @@ int BenchmarkInfo::gfxRendering( int seconds ) ++loops; } QBrush br1; br1.setStyle( SolidPattern ); t.restart(); stop = t.elapsed() + seconds*1000; while ( t.elapsed() < stop ) { int k = rand() % 9; br1.setColor( QColor( rr[ k ], gg[ k ], bb[ k ] ) ); bpw.p.fillRect( rand()%w, rand()%h, rand()%w, rand()%h, br1 ); ++loops; } - QPixmap p = Resource::loadPixmap( "sysinfo/pattern" ); + QPixmap p = Opie::Core::OResource::loadPixmap( "sysinfo/pattern" ); t.restart(); stop = t.elapsed() + seconds*1000; while ( t.elapsed() < stop ) { bpw.p.drawPixmap( rand()%w, rand()%h, p ); ++loops; } return loops; } const unsigned int FILE_TEST_COUNT = 8000; const unsigned int FILE_TEST_BLOCKSIZE = 1024; diff --git a/noncore/settings/sysinfo/sysinfo.cpp b/noncore/settings/sysinfo/sysinfo.cpp index 03db22a..63be111 100644 --- a/noncore/settings/sysinfo/sysinfo.cpp +++ b/noncore/settings/sysinfo/sysinfo.cpp @@ -20,44 +20,44 @@ ** ** Enhancements by: Dan Williams, <williamsdr@acm.org> ** **********************************************************************/ #include "memory.h" #include "devicesinfo.h" #include "storage.h" #include "processinfo.h" #include "modulesinfo.h" #include "benchmarkinfo.h" #include "sysloginfo.h" #include "versioninfo.h" #include "sysinfo.h" /* OPIE */ +#include <opie2/oresource.h> #include <opie2/otabwidget.h> using namespace Opie::Ui; #include <qpe/config.h> -#include <qpe/resource.h> /* QT */ #include <qlayout.h> SystemInfo::SystemInfo( QWidget *parent, const char *name, WFlags ) : QWidget( parent, name, WStyle_ContextHelp ) { - setIcon( Resource::loadPixmap( "system_icon" ) ); + setIcon( Opie::Core::OResource::loadPixmap( "system_icon", Opie::Core::OResource::SmallIcon ) ); setCaption( tr("System Info") ); QVBoxLayout *lay = new QVBoxLayout( this ); OTabWidget *tab = new OTabWidget( this, "tabwidget", OTabWidget::Global ); lay->addWidget( tab ); tab->addTab( new MemoryInfo( tab ), "sysinfo/memorytabicon", tr("Memory") ); #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) tab->addTab( new FileSysInfo( tab ), "sysinfo/storagetabicon", tr("Storage") ); #endif tab->addTab( new DevicesInfo( tab ), "sysinfo/cputabicon", tr("Devices") ); tab->addTab( new ProcessInfo( tab ), "sysinfo/processtabicon", tr( "Process" ) ); tab->addTab( new ModulesInfo( tab ), "sysinfo/moduletabicon", tr( "Modules" ) ); tab->addTab( new SyslogInfo( tab ), "sysinfo/syslogtabicon", tr( "Syslog" ) ); tab->addTab( new BenchmarkInfo( tab ), "sysinfo/benchmarktabicon", tr( "Benchmark" ) ); tab->addTab( new VersionInfo( tab ), "sysinfo/versiontabicon", tr("Version") ); diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 5736faa..29c9a05 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp @@ -9,33 +9,33 @@ ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "versioninfo.h" /* OPIE */ #include <opie2/odevice.h> -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <qpe/version.h> /* QT */ #include <qfile.h> #include <qlabel.h> #include <qlayout.h> #include <qscrollview.h> #include <qtextstream.h> #include <qwhatsthis.h> using namespace Opie::Core; VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) : QWidget( parent, name, f ) { setMinimumSize( 200, 150 ); @@ -76,50 +76,50 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) #ifdef QPE_VENDOR QString builder = QPE_VENDOR; #else QString builder = "Unknown"; #endif palmtopVersionString.append( tr( "Built against Qt/E " ) ); palmtopVersionString.append( QT_VERSION_STR ); palmtopVersionString.append( "<br>" ); palmtopVersionString.append( tr( "Built on: " ) ); palmtopVersionString.append( __DATE__ ); palmtopVersionString.append( "</qt>" ); QHBoxLayout *hb1 = new QHBoxLayout( vb ); hb1->setSpacing( 2 ); QLabel *palmtopLogo = new QLabel( container ); - QImage logo1 = Resource::loadImage( "logo/opielogo" ); + QImage logo1 = Opie::Core::OResource::loadImage( "logo/opielogo" ); logo1 = logo1.smoothScale( 50, 55 ); QPixmap logo1Pixmap; logo1Pixmap.convertFromImage( logo1 ); palmtopLogo->setPixmap( logo1Pixmap ); palmtopLogo->setFixedSize( 60, 60 ); hb1->addWidget( palmtopLogo, 0, Qt::AlignTop + Qt::AlignLeft ); QLabel *palmtopVersion = new QLabel( container ); palmtopVersion->setText( palmtopVersionString ); hb1->addWidget( palmtopVersion, 1, Qt::AlignTop + Qt::AlignLeft ); QHBoxLayout *hb2 = new QHBoxLayout( vb ); hb1->setSpacing( 2 ); QLabel *linuxLogo = new QLabel( container ); - QImage logo2 = Resource::loadImage( "logo/tux-logo" ); + QImage logo2 = Opie::Core::OResource::loadImage( "logo/tux-logo" ); logo2 = logo2.smoothScale( 55, 60 ); QPixmap logo2Pixmap; logo2Pixmap.convertFromImage( logo2 ); linuxLogo->setPixmap( logo2Pixmap ); linuxLogo->setFixedSize( 60, 60 ); hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); QLabel *kernelVersion = new QLabel( container ); kernelVersion->setText( kernelVersionString ); hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); QHBoxLayout *hb3 = new QHBoxLayout( vb ); hb3->setSpacing( 2 ); QLabel *palmtopLogo3 = new QLabel( container ); @@ -128,33 +128,33 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) QString modelPixmap = "sysinfo/"; if ( model == Model_Zaurus_SLC7x0 ) modelPixmap += "zaurusc700"; else if ( model >= Model_Zaurus_SL5000 && model <= Model_Zaurus_SLB600 ) modelPixmap += "zaurus5500"; else if ( model >= Model_iPAQ_H31xx && model <= Model_iPAQ_H5xxx ) modelPixmap += "ipaq3600"; else if ( model >= Model_SIMpad_CL4 && model <= Model_SIMpad_TSinus ) modelPixmap += "simpad"; else if ( model == Model_Jornada_56x ) modelPixmap += "jornada56x"; else if ( model == Model_Jornada_720 ) modelPixmap += "jornada720"; else modelPixmap += "pda"; - QImage logo3 = Resource::loadImage( modelPixmap ); + QImage logo3 = Opie::Core::OResource::loadImage( modelPixmap ); int width = logo3.width(); int height = logo3.height(); float aspect = float( height ) / width; logo3 = logo3.smoothScale( 50, 50.0 * aspect ); QPixmap logo3Pixmap; logo3Pixmap.convertFromImage( logo3 ); palmtopLogo3->setPixmap( logo3Pixmap ); palmtopLogo3->setFixedSize( 60, 100 ); hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); QString systemString = "<qt><b>"; systemString.append( ODevice::inst()->systemString() ); systemString.append( "</b>" ); systemString.append( tr( "<p>Version: " ) ); |