namespace Shiboken { inline bool Converter< QPixmap >::isConvertible(PyObject* pyobj) { if (ValueTypeConverter::isConvertible(pyobj)) return true; SbkBaseWrapperType* shiboType = reinterpret_cast(SbkType()); bool isVariant = SbkQVariant_Check(pyobj); if (isVariant) { QVariant var(Converter::toCpp(pyobj)); return var.type() == QVariant::Pixmap; } else if (SbkQSize_Check(pyobj) || SbkQString_Check(pyobj)) { return true; } else if (shiboType->ext_isconvertible) { return shiboType->ext_isconvertible(pyobj); } return false; } inline QPixmap Converter< QPixmap >::toCpp(PyObject* pyobj) { SbkBaseWrapperType* shiboType = reinterpret_cast(SbkType()); bool isVariant = SbkQVariant_Check(pyobj); if (isVariant) { QVariant var(Converter::toCpp(pyobj)); return var.value(); } else if (SbkQSize_Check(pyobj)) { return QPixmap(Shiboken::Converter::toCpp(pyobj)); } else if (SbkQString_Check(pyobj)) { return QPixmap(Shiboken::Converter::toCpp(pyobj)); } else if (shiboType->ext_isconvertible && shiboType->ext_tocpp && shiboType->ext_isconvertible(pyobj)) { QPixmap* cptr = reinterpret_cast(shiboType->ext_tocpp(pyobj)); std::auto_ptr cptr_auto_ptr(cptr); return *cptr; } return *Converter::toCpp(pyobj); } inline PyObject* Converter::toPython(const QPixmap& cppObj) { return ValueTypeConverter::toPython(cppObj); } }