##// END OF EJS Templates
- added call method that does a direct call on the ObjectType...
- added call method that does a direct call on the ObjectType - added comments and improved docs git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@72 ea8d5007-eb21-0410-b261-ccb3ea6e24a9

File last commit:

r28:cf202027b50b
r36:1d1e7c03e848
Show More
PythonQtWrapper_QFileIconProvider.cpp
104 lines | 3.8 KiB | text/x-c | CppLexer
/ generated_cpp / com_trolltech_qt_gui / PythonQtWrapper_QFileIconProvider.cpp
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include "PythonQtWrapper_QFileIconProvider.h"
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 #include <PythonQtSignalReceiver.h>
#include <PythonQtMethodInfo.h>
#include <PythonQtConversion.h>
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 #include <QVariant>
#include <qfileiconprovider.h>
#include <qfileinfo.h>
#include <qicon.h>
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 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);
}
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 QFileIconProvider* PythonQtWrapper_QFileIconProvider::new_QFileIconProvider()
{
florianlink
- added support for deriving CPP classes in Python and to override all public and protected virtual functions from PythonQt...
r24 return new PythonQtShell_QFileIconProvider(); }
florianlink
added initial generated wrappers for Qt 4.4.3...
r13
florianlink
upgraded wrappers to current generator version...
r28 QIcon PythonQtWrapper_QFileIconProvider::icon(QFileIconProvider* theWrappedObject, QFileIconProvider::IconType type) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_icon(type);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QString PythonQtWrapper_QFileIconProvider::type(QFileIconProvider* theWrappedObject, const QFileInfo& info) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_type(info);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }
florianlink
upgraded wrappers to current generator version...
r28 QIcon PythonQtWrapper_QFileIconProvider::icon(QFileIconProvider* theWrappedObject, const QFileInfo& info) const
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 {
florianlink
upgraded wrappers to current generator version...
r28 return ((PythonQtPublicPromoter_QFileIconProvider*)theWrappedObject)->promoted_icon(info);
florianlink
added initial generated wrappers for Qt 4.4.3...
r13 }