Resource Class Reference
The Resource class provides access to named resources. More...
#include <resource.h>
Static Public Member Functions | |
| QImage | loadImage (const QString &name) |
| QPixmap | loadPixmap (const QString &name) |
| QBitmap | loadBitmap (const QString &name) |
| QString | findPixmap (const QString &name) |
| QIconSet | loadIconSet (const QString &name) |
| QString | findSound (const QString &name) |
| QStringList | allSounds () |
Detailed Description
The Resource class provides access to named resources.The resources may be provided from files or other sources.
The allSounds() function returns a list of all the sounds available. A particular sound can be searched for using findSound().
Images can be loaded with loadImage(), loadPixmap(), loadBitmap() and loadIconSet().
Definition at line 28 of file resource.h.
Member Function Documentation
|
|
Returns the QImage called name. You should avoid including any filename type extension (e.g. .png, .xpm). Definition at line 176 of file resource.cpp. References QImage::create(), QImage::detach(), QImage::height(), QImage::isNull(), QString::left(), QString::length(), QImage::pixel(), QString::right(), QImage::setAlphaBuffer(), QImage::setPixel(), and QImage::width(). Referenced by loadPixmap(), and AppLnk::setIcon(). |
|
|
Returns the QPixmap called pix. You should avoid including any filename type extension (e.g. .png, .xpm). Definition at line 63 of file resource.cpp. References QPixmap::convertFromImage(), QPixmapCache::find(), QPixmapCache::insert(), and loadImage(). Referenced by loadBitmap(), and loadIconSet(). |
|
|
Returns the QBitmap called pix. You should avoid including any filename type extension (e.g. .png, .xpm). Definition at line 78 of file resource.cpp. References loadPixmap(). |
|
|
Returns the filename of a pixmap called pix. You should avoid including any filename type extension (e.g. .png, .xpm). Normally you will use loadPixmap() rather than this function. Definition at line 91 of file resource.cpp. References QValueList::begin(), QList::current(), QValueList::end(), QList::first(), QImageIO::inputFormats(), QString::lower(), QList::next(), and QPEApplication::qpeDir(). |
|
|
Returns a QIconSet for the pixmap named name. A disabled icon is generated that conforms to the Qtopia look & feel. You should avoid including any filename type extension (eg. .png, .xpm). Definition at line 46 of file resource.h. References QPixmap::isNull(), loadPixmap(), QIconSet::setPixmap(), and QPixmap::width(). |
|
|
Returns a sound file for a sound called name. You should avoid including any filename type extension (e.g. .wav), as the system will search for only those fileformats which are supported by the library. Currently, only WAV files are supported. Definition at line 136 of file resource.cpp. References QPEApplication::qpeDir(). |
|
|
Returns a list of all sound names. Definition at line 150 of file resource.cpp. References QValueList::append(), QValueList::begin(), QValueList::end(), and QDir::entryList(). |
The documentation for this class was generated from the following files:
