int WallpaperImage::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { typedef bb::cascades::ImageView QMocSuperClass; _id = QMocSuperClass::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 13) qt_static_metacall(this, _c, _id, _a); _id -= 13; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QUrl*>(_v) = url(); break; case 1: *reinterpret_cast< QString*>(_v) = imageID(); break; case 2: *reinterpret_cast< float*>(_v) = loading(); break; case 3: *reinterpret_cast< QUrl*>(_v) = defaultImage(); break; case 4: *reinterpret_cast< bool*>(_v) = ready(); break; } _id -= 5; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setUrl(*reinterpret_cast< QUrl*>(_v)); break; case 1: setImageID(*reinterpret_cast< QString*>(_v)); break; case 2: setLoading(*reinterpret_cast< float*>(_v)); break; case 3: setDefaultImage(*reinterpret_cast< QUrl*>(_v)); break; case 4: setReady(*reinterpret_cast< bool*>(_v)); break; } _id -= 5; } else if (_c == QMetaObject::ResetProperty) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 5; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 5; } #endif // QT_NO_PROPERTIES return _id; }
/*! * \returns the original pixmap of the current wallpaper * \param orientation whether which orientation is wanted * * FIXME: handle the difference between the original image and the modified * image in the WallpaperDescriptor? */ QPixmap WallpaperCurrentDescriptor::originalPixmap ( M::Orientation orientation) const { QString fileName; QString imageId; QPixmap retval; fileName = originalImageFile(orientation); imageId = imageID (orientation == M::Portrait ? WallpaperDescriptor::Portrait : WallpaperDescriptor::Landscape); if (!imageId.isEmpty()) { QPixmap *themedPixmap; themedPixmap = MTheme::pixmapCopy(imageId); retval = *themedPixmap; delete themedPixmap; } else { retval.load (fileName); } return retval; }
QImage CBlockGraphicsItem::image(void) const { return GData::GetImage(imageID()); }