Public Methods |
virtual bool | exists (const QString &ID) const |
virtual QPixmap | getQPixmap (const QString &ID) const |
| get a QPixmap associated with a resource ID. More...
|
virtual QImage | getQImage (const QString &ID) const |
| get a QImage associated with a resource ID. More...
|
virtual QBitmap | getQBitmap (const QString &ID) const |
| get a QBitmap associated with a resource ID. More...
|
virtual QMovie | getQMovie (const QString &ID) const |
| get a QMovie associated with a resource ID. More...
|
virtual bool | get (const QString &ID, unsigned char **ppOutData, int *pOutLength) const |
| get the data associated with a resource ID. More...
|
Static Public Methods |
const ZSkin& | skin () |
| get a reference to the application's skin. More...
|
void | reloadSkin () |
| reload the default skin. More...
|
Protected Methods |
| ZSkin () |
virtual | ~ZSkin () |
| ZSkin (const QString &systemBaseName, const QString &systemSkinName, const QString &applicationBaseName, const QString &applicationSkinName) |
void | init (const QString &systemBaseName, const QString &systemSkinName, const QString &applicationBaseName, const QString &applicationSkinName) |
Protected Attributes |
ZResFileReader* | systemBase |
ZResFileReader* | systemSkin |
ZResFileReader* | appBase |
ZResFileReader* | appSkin |
Static Protected Attributes |
ZSkin* | defaultSkin |
The application skin is a stack of between zero and four resource files, the application skin, the applicaiton base, the system skin, and the system base.
void myClass::myFunc(...)
{
const ZSkin& skin = ZSkin::skin();
QPixmap pm = skin.getPixmap("CST_Back_O.g");
void *data;
int length;
if (skin.get("somedata.dat", &data, &length))
{
printf("somedata.dat is located at 0x%08x and is of length %d",
data, length);
}
else
{
printf("somedata.dat could not be found");
}
}