##// END OF EJS Templates
improved so that dict contains properties and that dir() shows all available things, including the derived base attributes...
improved so that dict contains properties and that dir() shows all available things, including the derived base attributes git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@70 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r34:5daedfb035c8
Show More
PythonQtWrapper_QFileIconProvider.cpp
104 lines | 3.8 KiB | text/x-c | CppLexer
/ generated_cpp / com_trolltech_qt_gui / PythonQtWrapper_QFileIconProvider.cpp
#include "PythonQtWrapper_QFileIconProvider.h"
#include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
#include <QVariant>
#include <qfileiconprovider.h>
#include <qfileinfo.h>
#include <qicon.h>
QIcon PythonQtShell_QFileIconProvider::icon(QFileIconProvider::IconType type) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "icon");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QFileIconProvider::staticMetaObject,
"icon(QFileIconProvider*,QFileIconProvider::IconType )");
QIcon returnValue;
void* args[2] = {NULL, (void*)&type};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
returnValue = *((QIcon *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QFileIconProvider::icon(type);
}
QIcon PythonQtShell_QFileIconProvider::icon(const QFileInfo& info) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "icon");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QFileIconProvider::staticMetaObject,
"icon(QFileIconProvider*,const QFileInfo& )");
QIcon returnValue;
void* args[2] = {NULL, (void*)&info};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
returnValue = *((QIcon *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QFileIconProvider::icon(info);
}
QString PythonQtShell_QFileIconProvider::type(const QFileInfo& info) const
{
if (_wrapper) {
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "type");
PyErr_Clear();
if (obj && !PythonQtSlotFunction_Check(obj)) {
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature(
&PythonQtWrapper_QFileIconProvider::staticMetaObject,
"type(QFileIconProvider*,const QFileInfo& )");
QString returnValue;
void* args[2] = {NULL, (void*)&info};
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true);
if (result) {
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue);
if (args[0]!=&returnValue) {
returnValue = *((QString *)args[0]);
}
}
if (result) { Py_DECREF(result); }
Py_DECREF(obj);
return returnValue;
}
}
return QFileIconProvider::type(info);
}
QFileIconProvider* PythonQtWrapper_QFileIconProvider::new_QFileIconProvider()
{
return new PythonQtShell_QFileIconProvider(); }
QIcon PythonQtWrapper_QFileIconProvider::icon(QFileIconProvider* theWrappedObject, QFileIconProvider::IconType type) const
{
return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_icon(type);
}
QString PythonQtWrapper_QFileIconProvider::type(QFileIconProvider* theWrappedObject, const QFileInfo& info) const
{
return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_type(info);
}
QIcon PythonQtWrapper_QFileIconProvider::icon(QFileIconProvider* theWrappedObject, const QFileInfo& info) const
{
return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_icon(info);
}