-rw-r--r-- | library/resource.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/resource.h b/library/resource.h index 4a3502a..9e4cb54 100644 --- a/library/resource.h +++ b/library/resource.h @@ -13,54 +13,64 @@ ** ** 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. ** **********************************************************************/ #ifndef PIXMAPLOADER_H #define PIXMAPLOADER_H #include <qimage.h> #include <qbitmap.h> #include <qiconset.h> #include <qstringlist.h> class Resource { public: Resource() {} static QImage loadImage( const QString &name); static QPixmap loadPixmap( const QString &name ); static QBitmap loadBitmap( const QString &name ); static QString findPixmap( const QString &name ); static QIconSet loadIconSet( const QString &name ); static QString findSound( const QString &name ); static QStringList allSounds(); }; +#ifdef OPIE_INTERNAL_LIBRARY_BUILD extern bool qpe_fast_findPixmap; +#endif + + // Inline for compatibility with SHARP ROMs inline QIconSet Resource::loadIconSet( const QString &pix ) { + +#ifdef OPIE_INTERNAL_LIBRARY_BUILD /* * disable the slow load */ bool oldMode = qpe_fast_findPixmap; qpe_fast_findPixmap = true; +#endif QPixmap dpm = loadPixmap( pix + "_disabled" ); QPixmap pm = loadPixmap( pix ); QIconSet is( pm ); if ( !dpm.isNull() ) is.setPixmap( dpm, pm.width() <= 22 ? QIconSet::Small : QIconSet::Large, QIconSet::Disabled ); +#ifdef OPIE_INTERNAL_LIBRARY_BUILD qpe_fast_findPixmap = oldMode; +#endif + return is; } #endif |