// C++ interface wrapper code.
//
// Generated by SIP 3.7 (build 102) on Fri Jul 25 00:26:03 2003
//
// Copyright (c) 2003
// 	Riverbank Computing Limited <info@riverbankcomputing.co.uk>
// 
// This file is part of PyQt.
// 
// This copy of PyQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#include "sipqtcanvasDeclqtcanvas.h"
#include "sipqtcanvasQCanvas.h"


PyObject *sipClass_QCanvas;

static void sipDealloc_QCanvas(sipThisType *);

static PyTypeObject sipType_QCanvas = {
	PyObject_HEAD_INIT(&PyType_Type)
	0,
	sipWrapperTypeName,
	sizeof (sipThisType),
	0,
	(destructor)sipDealloc_QCanvas,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	Py_TPFLAGS_DEFAULT,
};

sipQCanvas::sipQCanvas(QObject * a0,const char * a1) : QCanvas(a0,a1), sipPyThis(0)
{
	sipCommonCtor(sipPyMethods,26);
}

sipQCanvas::sipQCanvas(int a0,int a1) : QCanvas(a0,a1), sipPyThis(0)
{
	sipCommonCtor(sipPyMethods,26);
}

sipQCanvas::sipQCanvas(QPixmap a0,int a1,int a2,int a3,int a4) : QCanvas(a0,a1,a2,a3,a4), sipPyThis(0)
{
	sipCommonCtor(sipPyMethods,26);
}

sipQCanvas::~sipQCanvas()
{
	sipCommonDtor(sipPyThis);
}

void sipQCanvas::customEvent(QCustomEvent * a0)
{
	if (sipIsPyMethod(&sipPyMethods[0],sipPyThis,NULL,sipName_customEvent))
		sipQObject::sipVH_customEvent(&sipPyMethods[0],sipPyThis,a0);
	else
		QObject::customEvent(a0);
}

void sipQCanvas::childEvent(QChildEvent * a0)
{
	if (sipIsPyMethod(&sipPyMethods[1],sipPyThis,NULL,sipName_childEvent))
		sipQObject::sipVH_childEvent(&sipPyMethods[1],sipPyThis,a0);
	else
		QObject::childEvent(a0);
}

void sipQCanvas::timerEvent(QTimerEvent * a0)
{
	if (sipIsPyMethod(&sipPyMethods[2],sipPyThis,NULL,sipName_timerEvent))
		sipQObject::sipVH_timerEvent(&sipPyMethods[2],sipPyThis,a0);
	else
		QObject::timerEvent(a0);
}

QVariant sipQCanvas::property(const char * a0) const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[3],sipPyThis,NULL,sipName_property) ?
		sipQObject::sipVH_property(&sipPyMethods[3],sipPyThis,a0) :
		QObject::property(a0);
}

bool sipQCanvas::setProperty(const char * a0,const QVariant& a1)
{
	return sipIsPyMethod(&sipPyMethods[4],sipPyThis,NULL,sipName_setProperty) ?
		sipQObject::sipVH_setProperty(&sipPyMethods[4],sipPyThis,a0,a1) :
		QObject::setProperty(a0,a1);
}

void sipQCanvas::removeChild(QObject * a0)
{
	if (sipIsPyMethod(&sipPyMethods[5],sipPyThis,NULL,sipName_removeChild))
		sipQObject::sipVH_removeChild(&sipPyMethods[5],sipPyThis,a0);
	else
		QObject::removeChild(a0);
}

void sipQCanvas::insertChild(QObject * a0)
{
	if (sipIsPyMethod(&sipPyMethods[6],sipPyThis,NULL,sipName_insertChild))
		sipQObject::sipVH_insertChild(&sipPyMethods[6],sipPyThis,a0);
	else
		QObject::insertChild(a0);
}

void sipQCanvas::setName(const char * a0)
{
	if (sipIsPyMethod(&sipPyMethods[7],sipPyThis,NULL,sipName_setName))
		sipQObject::sipVH_setName(&sipPyMethods[7],sipPyThis,a0);
	else
		QObject::setName(a0);
}

bool sipQCanvas::eventFilter(QObject * a0,QEvent * a1)
{
	return sipIsPyMethod(&sipPyMethods[8],sipPyThis,NULL,sipName_eventFilter) ?
		sipQObject::sipVH_eventFilter(&sipPyMethods[8],sipPyThis,a0,a1) :
		QObject::eventFilter(a0,a1);
}

bool sipQCanvas::event(QEvent * a0)
{
	return sipIsPyMethod(&sipPyMethods[9],sipPyThis,NULL,sipName_event) ?
		sipQObject::sipVH_event(&sipPyMethods[9],sipPyThis,a0) :
		QObject::event(a0);
}

void sipQCanvas::drawForeground(QPainter& a0,const QRect& a1)
{
	if (sipIsPyMethod(&sipPyMethods[10],sipPyThis,NULL,sipName_drawForeground))
		sipQCanvas::sipVH_drawForeground(&sipPyMethods[10],sipPyThis,a0,a1);
	else
		QCanvas::drawForeground(a0,a1);
}

void sipQCanvas::drawBackground(QPainter& a0,const QRect& a1)
{
	if (sipIsPyMethod(&sipPyMethods[11],sipPyThis,NULL,sipName_drawBackground))
		sipQCanvas::sipVH_drawBackground(&sipPyMethods[11],sipPyThis,a0,a1);
	else
		QCanvas::drawBackground(a0,a1);
}

void sipQCanvas::update()
{
	if (sipIsPyMethod(&sipPyMethods[12],sipPyThis,NULL,sipName_update))
		sipQCanvas::sipVH_update(&sipPyMethods[12],sipPyThis);
	else
		QCanvas::update();
}

void sipQCanvas::advance()
{
	if (sipIsPyMethod(&sipPyMethods[13],sipPyThis,NULL,sipName_advance))
		sipQCanvas::sipVH_advance(&sipPyMethods[13],sipPyThis);
	else
		QCanvas::advance();
}

void sipQCanvas::setDoubleBuffering(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[14],sipPyThis,NULL,sipName_setDoubleBuffering))
		sipQCanvas::sipVH_setDoubleBuffering(&sipPyMethods[14],sipPyThis,a0);
	else
		QCanvas::setDoubleBuffering(a0);
}

void sipQCanvas::setUpdatePeriod(int a0)
{
	if (sipIsPyMethod(&sipPyMethods[15],sipPyThis,NULL,sipName_setUpdatePeriod))
		sipQCanvas::sipVH_setUpdatePeriod(&sipPyMethods[15],sipPyThis,a0);
	else
		QCanvas::setUpdatePeriod(a0);
}

void sipQCanvas::setAdvancePeriod(int a0)
{
	if (sipIsPyMethod(&sipPyMethods[16],sipPyThis,NULL,sipName_setAdvancePeriod))
		sipQCanvas::sipVH_setAdvancePeriod(&sipPyMethods[16],sipPyThis,a0);
	else
		QCanvas::setAdvancePeriod(a0);
}

void sipQCanvas::setUnchanged(const QRect& a0)
{
	if (sipIsPyMethod(&sipPyMethods[17],sipPyThis,NULL,sipName_setUnchanged))
		sipQCanvas::sipVH_setUnchanged(&sipPyMethods[17],sipPyThis,a0);
	else
		QCanvas::setUnchanged(a0);
}

void sipQCanvas::setChanged(const QRect& a0)
{
	if (sipIsPyMethod(&sipPyMethods[18],sipPyThis,NULL,sipName_setChanged))
		sipQCanvas::sipVH_setChanged(&sipPyMethods[18],sipPyThis,a0);
	else
		QCanvas::setChanged(a0);
}

void sipQCanvas::setAllChanged()
{
	if (sipIsPyMethod(&sipPyMethods[19],sipPyThis,NULL,sipName_setAllChanged))
		sipQCanvas::sipVH_setAllChanged(&sipPyMethods[19],sipPyThis);
	else
		QCanvas::setAllChanged();
}

void sipQCanvas::retune(int a0,int a1)
{
	if (sipIsPyMethod(&sipPyMethods[20],sipPyThis,NULL,sipName_retune))
		sipQCanvas::sipVH_retune(&sipPyMethods[20],sipPyThis,a0,a1);
	else
		QCanvas::retune(a0,a1);
}

void sipQCanvas::resize(int a0,int a1)
{
	if (sipIsPyMethod(&sipPyMethods[21],sipPyThis,NULL,sipName_resize))
		sipQCanvas::sipVH_resize(&sipPyMethods[21],sipPyThis,a0,a1);
	else
		QCanvas::resize(a0,a1);
}

void sipQCanvas::setTile(int a0,int a1,int a2)
{
	if (sipIsPyMethod(&sipPyMethods[22],sipPyThis,NULL,sipName_setTile))
		sipQCanvas::sipVH_setTile(&sipPyMethods[22],sipPyThis,a0,a1,a2);
	else
		QCanvas::setTile(a0,a1,a2);
}

void sipQCanvas::setBackgroundColor(const QColor& a0)
{
	if (sipIsPyMethod(&sipPyMethods[23],sipPyThis,NULL,sipName_setBackgroundColor))
		sipQCanvas::sipVH_setBackgroundColor(&sipPyMethods[23],sipPyThis,a0);
	else
		QCanvas::setBackgroundColor(a0);
}

void sipQCanvas::setBackgroundPixmap(const QPixmap& a0)
{
	if (sipIsPyMethod(&sipPyMethods[24],sipPyThis,NULL,sipName_setBackgroundPixmap))
		sipQCanvas::sipVH_setBackgroundPixmap(&sipPyMethods[24],sipPyThis,a0);
	else
		QCanvas::setBackgroundPixmap(a0);
}

void sipQCanvas::setTiles(QPixmap a0,int a1,int a2,int a3,int a4)
{
	if (sipIsPyMethod(&sipPyMethods[25],sipPyThis,NULL,sipName_setTiles))
		sipQCanvas::sipVH_setTiles(&sipPyMethods[25],sipPyThis,a0,a1,a2,a3,a4);
	else
		QCanvas::setTiles(a0,a1,a2,a3,a4);
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_drawForeground(const sipMethodCache *pymc,sipThisType *sipThis,QPainter& a0,const QRect& a1)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;
	PyObject *a1obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPainter);

	a1obj = sipMapCppToSelf(&a1,sipClass_QRect);

	sipArgs = Py_BuildValue("(ONN)",sipThis -> sipSelf,a0obj,a1obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_drawForeground);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_drawBackground(const sipMethodCache *pymc,sipThisType *sipThis,QPainter& a0,const QRect& a1)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;
	PyObject *a1obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPainter);

	a1obj = sipMapCppToSelf(&a1,sipClass_QRect);

	sipArgs = Py_BuildValue("(ONN)",sipThis -> sipSelf,a0obj,a1obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_drawBackground);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_update(const sipMethodCache *pymc,sipThisType *sipThis)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(O)",sipThis -> sipSelf);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_update);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_advance(const sipMethodCache *pymc,sipThisType *sipThis)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(O)",sipThis -> sipSelf);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_advance);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setDoubleBuffering(const sipMethodCache *pymc,sipThisType *sipThis,bool a0)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oi)",sipThis -> sipSelf,a0);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setDoubleBuffering);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setUpdatePeriod(const sipMethodCache *pymc,sipThisType *sipThis,int a0)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oi)",sipThis -> sipSelf,a0);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setUpdatePeriod);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setAdvancePeriod(const sipMethodCache *pymc,sipThisType *sipThis,int a0)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oi)",sipThis -> sipSelf,a0);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setAdvancePeriod);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setUnchanged(const sipMethodCache *pymc,sipThisType *sipThis,const QRect& a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QRect);

	sipArgs = Py_BuildValue("(ON)",sipThis -> sipSelf,a0obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setUnchanged);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setChanged(const sipMethodCache *pymc,sipThisType *sipThis,const QRect& a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QRect);

	sipArgs = Py_BuildValue("(ON)",sipThis -> sipSelf,a0obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setChanged);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setAllChanged(const sipMethodCache *pymc,sipThisType *sipThis)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(O)",sipThis -> sipSelf);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setAllChanged);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_retune(const sipMethodCache *pymc,sipThisType *sipThis,int a0,int a1)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oii)",sipThis -> sipSelf,a0,a1);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_retune);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_resize(const sipMethodCache *pymc,sipThisType *sipThis,int a0,int a1)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oii)",sipThis -> sipSelf,a0,a1);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_resize);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setTile(const sipMethodCache *pymc,sipThisType *sipThis,int a0,int a1,int a2)
{
	PyObject *resobj;
	PyObject *sipArgs;

	sipArgs = Py_BuildValue("(Oiii)",sipThis -> sipSelf,a0,a1,a2);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setTile);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setBackgroundColor(const sipMethodCache *pymc,sipThisType *sipThis,const QColor& a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QColor);

	sipArgs = Py_BuildValue("(ON)",sipThis -> sipSelf,a0obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setBackgroundColor);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setBackgroundPixmap(const sipMethodCache *pymc,sipThisType *sipThis,const QPixmap& a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPixmap);

	sipArgs = Py_BuildValue("(ON)",sipThis -> sipSelf,a0obj);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setBackgroundPixmap);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

// The common handler for all classes that inherit this virtual member
// function.

void sipQCanvas::sipVH_setTiles(const sipMethodCache *pymc,sipThisType *sipThis,QPixmap a0,int a1,int a2,int a3,int a4)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPixmap);

	sipArgs = Py_BuildValue("(ONiiii)",sipThis -> sipSelf,a0obj,a1,a2,a3,a4);

	if (sipArgs == NULL)
		goto reportError;

	resobj = sipEvalMethod(&pymc -> pyMethod,sipArgs);

	Py_DECREF(sipArgs);

	if (resobj != NULL)
	{
		Py_DECREF(resobj);

		if (resobj == Py_None)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvas,sipName_setTiles);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

const QObject * sipQCanvas::sipProtect_sender()
{
	return QObject::sender();
}

void sipQCanvas::sipProtect_timerEvent(QTimerEvent * a0)
{
	QObject::timerEvent(a0);
}

void sipQCanvas::sipProtect_childEvent(QChildEvent * a0)
{
	QObject::childEvent(a0);
}

void sipQCanvas::sipProtect_customEvent(QCustomEvent * a0)
{
	QObject::customEvent(a0);
}

void sipQCanvas::sipProtect_drawBackground(QPainter& a0,const QRect& a1)
{
	QCanvas::drawBackground(a0,a1);
}

void sipQCanvas::sipProtect_drawForeground(QPainter& a0,const QRect& a1)
{
	QCanvas::drawForeground(a0,a1);
}

int sipQCanvas::sipEmit_destroyed(PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		if (sipParseArgs(&sipArgsParsed,sipArgs,""))
		{
			Py_BEGIN_ALLOW_THREADS
			emit destroyed();
			Py_END_ALLOW_THREADS

			return 0;
		}
	}

	{
		QObject * a0;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"J0",sipClass_QObject,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			emit destroyed(a0);
			Py_END_ALLOW_THREADS

			return 0;
		}
	}

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_destroyed);

	return -1;
}

static int QCanvas_emit_destroyed(sipThisType *w,PyObject *sipArgs)
{
	sipQCanvas *ptr;

	if ((ptr = (sipQCanvas *)sipGetComplexCppPtr(w)) == NULL)
		return -1;

	return ptr -> sipEmit_destroyed(sipArgs);
}

int sipQCanvas::sipEmit_resized(PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		if (sipParseArgs(&sipArgsParsed,sipArgs,""))
		{
			Py_BEGIN_ALLOW_THREADS
			emit resized();
			Py_END_ALLOW_THREADS

			return 0;
		}
	}

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_resized);

	return -1;
}

static int QCanvas_emit_resized(sipThisType *w,PyObject *sipArgs)
{
	sipQCanvas *ptr;

	if ((ptr = (sipQCanvas *)sipGetComplexCppPtr(w)) == NULL)
		return -1;

	return ptr -> sipEmit_resized(sipArgs);
}

static sipQtSignal sipSignals_QCanvas[] = {
	{sipName_destroyed, QCanvas_emit_destroyed},
	{sipName_resized, QCanvas_emit_resized},
	{NULL, NULL}
};

static PyObject *sipDo_QCanvas_sender(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
#line 526 "sip/qobject.sip"
		QObject *ptr;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QObject,&ptr))
			return sipMapCppToSelfSubClass(sipGetSender(),sipClass_QObject);
#line 971 "sipqtcanvasQCanvas.cpp"
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_sender);

	return NULL;
}

static PyObject *sipDo_QCanvas_timerEvent(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QTimerEvent * a0;
		sipQCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ0",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QTimerEvent,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_timerEvent(a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_timerEvent);

	return NULL;
}

static PyObject *sipDo_QCanvas_childEvent(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QChildEvent * a0;
		sipQCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ0",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QChildEvent,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_childEvent(a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_childEvent);

	return NULL;
}

static PyObject *sipDo_QCanvas_customEvent(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCustomEvent * a0;
		sipQCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ0",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QCustomEvent,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_customEvent(a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_customEvent);

	return NULL;
}

static PyObject *sipDo_QCanvas_setTiles(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QPixmap * a0;
		int a1;
		int a2;
		int a3;
		int a4;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1iiii",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPixmap,&a0,&a1,&a2,&a3,&a4))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setTiles(*a0,a1,a2,a3,a4);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setTiles);

	return NULL;
}

static PyObject *sipDo_QCanvas_setBackgroundPixmap(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QPixmap * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPixmap,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setBackgroundPixmap(*a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setBackgroundPixmap);

	return NULL;
}

static PyObject *sipDo_QCanvas_backgroundPixmap(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			QPixmap *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QPixmap(sipCpp -> QCanvas::backgroundPixmap());
			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QPixmap,SIP_SIMPLE | SIP_PY_OWNED);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_backgroundPixmap);

	return NULL;
}

static PyObject *sipDo_QCanvas_setBackgroundColor(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QColor * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QColor,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setBackgroundColor(*a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setBackgroundColor);

	return NULL;
}

static PyObject *sipDo_QCanvas_backgroundColor(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			QColor *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QColor(sipCpp -> QCanvas::backgroundColor());
			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QColor,SIP_SIMPLE | SIP_PY_OWNED);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_backgroundColor);

	return NULL;
}

static PyObject *sipDo_QCanvas_setTile(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1;
		int a2;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"miii",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1,&a2))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setTile(a0,a1,a2);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setTile);

	return NULL;
}

static PyObject *sipDo_QCanvas_tile(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mii",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::tile(a0,a1);
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_tile);

	return NULL;
}

static PyObject *sipDo_QCanvas_tilesHorizontally(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::tilesHorizontally();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_tilesHorizontally);

	return NULL;
}

static PyObject *sipDo_QCanvas_tilesVertically(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::tilesVertically();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_tilesVertically);

	return NULL;
}

static PyObject *sipDo_QCanvas_tileWidth(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::tileWidth();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_tileWidth);

	return NULL;
}

static PyObject *sipDo_QCanvas_tileHeight(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::tileHeight();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_tileHeight);

	return NULL;
}

static PyObject *sipDo_QCanvas_resize(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mii",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::resize(a0,a1);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_resize);

	return NULL;
}

static PyObject *sipDo_QCanvas_width(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::width();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_width);

	return NULL;
}

static PyObject *sipDo_QCanvas_height(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::height();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_height);

	return NULL;
}

static PyObject *sipDo_QCanvas_size(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			QSize *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QSize(sipCpp -> QCanvas::size());
			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QSize,SIP_SIMPLE | SIP_PY_OWNED);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_size);

	return NULL;
}

static PyObject *sipDo_QCanvas_rect(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			QRect *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QRect(sipCpp -> QCanvas::rect());
			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QRect,SIP_SIMPLE | SIP_PY_OWNED);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_rect);

	return NULL;
}

static PyObject *sipDo_QCanvas_onCanvas(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mii",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::onCanvas(a0,a1);
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

	{
		QPoint * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPoint,&a0))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::onCanvas(*a0);
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_onCanvas);

	return NULL;
}

static PyObject *sipDo_QCanvas_validChunk(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mii",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::validChunk(a0,a1);
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

	{
		QPoint * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPoint,&a0))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::validChunk(*a0);
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_validChunk);

	return NULL;
}

static PyObject *sipDo_QCanvas_chunkSize(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			int res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvas::chunkSize();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_chunkSize);

	return NULL;
}

static PyObject *sipDo_QCanvas_retune(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		int a1 = 100;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mi|i",sipThisObj,sipClass_QCanvas,&sipCpp,&a0,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::retune(a0,a1);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_retune);

	return NULL;
}

static PyObject *sipDo_QCanvas_setAllChanged(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setAllChanged();
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setAllChanged);

	return NULL;
}

static PyObject *sipDo_QCanvas_setChanged(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QRect * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QRect,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setChanged(*a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setChanged);

	return NULL;
}

static PyObject *sipDo_QCanvas_setUnchanged(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QRect * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QRect,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setUnchanged(*a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setUnchanged);

	return NULL;
}

static PyObject *sipDo_QCanvas_allItems(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			QCanvasItemList *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QCanvasItemList(sipCpp -> QCanvas::allItems());
			Py_END_ALLOW_THREADS

			PyObject *resobj = sipConvertFrom_QCanvasItemList(res);
			delete res;

			return resobj;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_allItems);

	return NULL;
}

static PyObject *sipDo_QCanvas_collisions(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QPoint * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPoint,&a0))
		{
			QCanvasItemList *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QCanvasItemList(sipCpp -> QCanvas::collisions(*a0));
			Py_END_ALLOW_THREADS

			PyObject *resobj = sipConvertFrom_QCanvasItemList(res);
			delete res;

			return resobj;
		}
	}

	{
		QRect * a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QRect,&a0))
		{
			QCanvasItemList *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QCanvasItemList(sipCpp -> QCanvas::collisions(*a0));
			Py_END_ALLOW_THREADS

			PyObject *resobj = sipConvertFrom_QCanvasItemList(res);
			delete res;

			return resobj;
		}
	}

	{
		QPointArray * a0;
		QCanvasItem * a1;
		long a2;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1J0l",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPointArray,&a0,sipClass_QCanvasItem,&a1,&a2))
		{
			QCanvasItemList *res;

			Py_BEGIN_ALLOW_THREADS
			res = new QCanvasItemList(sipCpp -> QCanvas::collisions(*a0,a1,(bool)a2));
			Py_END_ALLOW_THREADS

			PyObject *resobj = sipConvertFrom_QCanvasItemList(res);
			delete res;

			return resobj;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_collisions);

	return NULL;
}

static PyObject *sipDo_QCanvas_drawArea(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QRect * a0;
		QPainter * a1;
		long a2 = 0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1J0|l",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QRect,&a0,sipClass_QPainter,&a1,&a2))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::drawArea(*a0,a1,(bool)a2);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_drawArea);

	return NULL;
}

static PyObject *sipDo_QCanvas_setAdvancePeriod(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mi",sipThisObj,sipClass_QCanvas,&sipCpp,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setAdvancePeriod(a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setAdvancePeriod);

	return NULL;
}

static PyObject *sipDo_QCanvas_setUpdatePeriod(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		int a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mi",sipThisObj,sipClass_QCanvas,&sipCpp,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setUpdatePeriod(a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setUpdatePeriod);

	return NULL;
}

static PyObject *sipDo_QCanvas_setDoubleBuffering(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		long a0;
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"ml",sipThisObj,sipClass_QCanvas,&sipCpp,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::setDoubleBuffering((bool)a0);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_setDoubleBuffering);

	return NULL;
}

static PyObject *sipDo_QCanvas_advance(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::advance();
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_advance);

	return NULL;
}

static PyObject *sipDo_QCanvas_update(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipThisObj,sipClass_QCanvas,&sipCpp))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvas::update();
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_update);

	return NULL;
}

static PyObject *sipDo_QCanvas_drawBackground(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QPainter * a0;
		QRect * a1;
		sipQCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ1J1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPainter,&a0,sipClass_QRect,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_drawBackground(*a0,*a1);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_drawBackground);

	return NULL;
}

static PyObject *sipDo_QCanvas_drawForeground(PyObject *sipThisObj,PyObject *sipArgs)
{
	int sipArgsParsed = 0;

	{
		QPainter * a0;
		QRect * a1;
		sipQCanvas *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ1J1",sipThisObj,sipClass_QCanvas,&sipCpp,sipClass_QPainter,&a0,sipClass_QRect,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_drawForeground(*a0,*a1);
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

	// Report an error if the arguments couldn't be parsed.

	sipNoMethod(sipArgsParsed,sipName_QCanvas,sipName_drawForeground);

	return NULL;
}

// Cast a pointer to a type somewhere in its superclass hierarchy.

const void *sipCast_QCanvas(const void *ptr,PyObject *targetClass)
{
	const void *res;

	if (targetClass == sipClass_QCanvas)
		return ptr;

	if ((res = sipCast_QObject((QObject *)(QCanvas *)ptr,targetClass)) != NULL)
		return res;

	return NULL;
}

static void sipDealloc_QCanvas(sipThisType *sipThis)
{
	if (sipThis -> u.cppPtr != NULL)
	{
		if (!sipIsSimple(sipThis))
			((sipQCanvas *)sipThis -> u.cppPtr) -> sipPyThis = NULL;

		if (sipIsPyOwned(sipThis))
		{
			Py_BEGIN_ALLOW_THREADS

			if (!sipIsSimple(sipThis))
				delete (sipQCanvas *)sipThis -> u.cppPtr;
			else
				delete (QCanvas *)sipThis -> u.cppPtr;

			Py_END_ALLOW_THREADS
		}
	}

	sipDeleteThis(sipThis);
}

PyObject *sipNew_QCanvas(PyObject *sipSelf,PyObject *sipArgs)
{
	static sipExtraType et = {
		sipCast_QCanvas,
		(void *)sipNewProxy_qtcanvas,
		sipSignals_QCanvas
	};

	sipThisType *sipThis = NULL;
	const void *sipNew = NULL;
	int sipFlags = SIP_PY_OWNED;
	int sipArgsParsed = 0;

	// See if there is something pending.

	sipNew = sipGetPending(&sipFlags);

	if (sipNew == NULL)
	{
		QObject * a0 = NULL;
		const char * a1 = 0;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"|J0s",sipClass_QObject,&a0,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipNew = new sipQCanvas(a0,a1);
			Py_END_ALLOW_THREADS

			if (a0)
				sipFlags |= SIP_XTRA_REF;
		}
	}

	if (sipNew == NULL)
	{
		int a0;
		int a1;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"ii",&a0,&a1))
		{
			Py_BEGIN_ALLOW_THREADS
			sipNew = new sipQCanvas(a0,a1);
			Py_END_ALLOW_THREADS
		}
	}

	if (sipNew == NULL)
	{
		QPixmap * a0;
		int a1;
		int a2;
		int a3;
		int a4;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"J1iiii",sipClass_QPixmap,&a0,&a1,&a2,&a3,&a4))
		{
			Py_BEGIN_ALLOW_THREADS
			sipNew = new sipQCanvas(*a0,a1,a2,a3,a4);
			Py_END_ALLOW_THREADS
		}
	}

	if (sipNew == NULL)
	{
		sipNoCtor(sipArgsParsed,sipName_QCanvas);
		return NULL;
	}

	// Wrap the object.

	if ((sipThis = sipCreateThis(sipSelf,sipNew,&sipType_QCanvas,sipFlags,&et)) == NULL)
	{
		if (sipFlags & SIP_PY_OWNED)
		{
			Py_BEGIN_ALLOW_THREADS

			if (!(sipFlags & SIP_SIMPLE))
				delete (sipQCanvas *)sipNew;
			else
				delete (QCanvas *)sipNew;

			Py_END_ALLOW_THREADS
		}

		return NULL;
	}

	if (!(sipFlags & SIP_SIMPLE))
		((sipQCanvas *)sipNew) -> sipPyThis = sipThis;

	Py_INCREF(Py_None);
	return Py_None;
}

static PyMethodDef lazyMethods_QCanvas[] = {
	{sipName_advance, sipDo_QCanvas_advance, METH_VARARGS, NULL},
	{sipName_allItems, sipDo_QCanvas_allItems, METH_VARARGS, NULL},
	{sipName_backgroundColor, sipDo_QCanvas_backgroundColor, METH_VARARGS, NULL},
	{sipName_backgroundPixmap, sipDo_QCanvas_backgroundPixmap, METH_VARARGS, NULL},
	{sipName_childEvent, sipDo_QCanvas_childEvent, METH_VARARGS, NULL},
	{sipName_chunkSize, sipDo_QCanvas_chunkSize, METH_VARARGS, NULL},
	{sipName_collisions, sipDo_QCanvas_collisions, METH_VARARGS, NULL},
	{sipName_customEvent, sipDo_QCanvas_customEvent, METH_VARARGS, NULL},
	{sipName_drawArea, sipDo_QCanvas_drawArea, METH_VARARGS, NULL},
	{sipName_drawBackground, sipDo_QCanvas_drawBackground, METH_VARARGS, NULL},
	{sipName_drawForeground, sipDo_QCanvas_drawForeground, METH_VARARGS, NULL},
	{sipName_height, sipDo_QCanvas_height, METH_VARARGS, NULL},
	{sipName_onCanvas, sipDo_QCanvas_onCanvas, METH_VARARGS, NULL},
	{sipName_rect, sipDo_QCanvas_rect, METH_VARARGS, NULL},
	{sipName_resize, sipDo_QCanvas_resize, METH_VARARGS, NULL},
	{sipName_retune, sipDo_QCanvas_retune, METH_VARARGS, NULL},
	{sipName_sender, sipDo_QCanvas_sender, METH_VARARGS, NULL},
	{sipName_setAdvancePeriod, sipDo_QCanvas_setAdvancePeriod, METH_VARARGS, NULL},
	{sipName_setAllChanged, sipDo_QCanvas_setAllChanged, METH_VARARGS, NULL},
	{sipName_setBackgroundColor, sipDo_QCanvas_setBackgroundColor, METH_VARARGS, NULL},
	{sipName_setBackgroundPixmap, sipDo_QCanvas_setBackgroundPixmap, METH_VARARGS, NULL},
	{sipName_setChanged, sipDo_QCanvas_setChanged, METH_VARARGS, NULL},
	{sipName_setDoubleBuffering, sipDo_QCanvas_setDoubleBuffering, METH_VARARGS, NULL},
	{sipName_setTile, sipDo_QCanvas_setTile, METH_VARARGS, NULL},
	{sipName_setTiles, sipDo_QCanvas_setTiles, METH_VARARGS, NULL},
	{sipName_setUnchanged, sipDo_QCanvas_setUnchanged, METH_VARARGS, NULL},
	{sipName_setUpdatePeriod, sipDo_QCanvas_setUpdatePeriod, METH_VARARGS, NULL},
	{sipName_size, sipDo_QCanvas_size, METH_VARARGS, NULL},
	{sipName_tile, sipDo_QCanvas_tile, METH_VARARGS, NULL},
	{sipName_tileHeight, sipDo_QCanvas_tileHeight, METH_VARARGS, NULL},
	{sipName_tileWidth, sipDo_QCanvas_tileWidth, METH_VARARGS, NULL},
	{sipName_tilesHorizontally, sipDo_QCanvas_tilesHorizontally, METH_VARARGS, NULL},
	{sipName_tilesVertically, sipDo_QCanvas_tilesVertically, METH_VARARGS, NULL},
	{sipName_timerEvent, sipDo_QCanvas_timerEvent, METH_VARARGS, NULL},
	{sipName_update, sipDo_QCanvas_update, METH_VARARGS, NULL},
	{sipName_validChunk, sipDo_QCanvas_validChunk, METH_VARARGS, NULL},
	{sipName_width, sipDo_QCanvas_width, METH_VARARGS, NULL}
};

sipLazyAttrDef sipClassAttrTab_QCanvas = {
	0, NULL,
	sizeof (lazyMethods_QCanvas) / sizeof (PyMethodDef), lazyMethods_QCanvas,
	0, NULL
};

QCanvas *sipForceConvertTo_QCanvas(PyObject *valobj,int *iserrp)
{
	if (*iserrp || valobj == NULL)
		return NULL;

	if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_QCanvas))
		return (QCanvas *)sipConvertToCpp(valobj,sipClass_QCanvas,iserrp);

	sipBadClass(sipName_QCanvas);

	*iserrp = 1;

	return NULL;
}
