// 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 "sipqtcanvasQCanvasPolygonalItem.h"


PyObject *sipClass_QCanvasPolygonalItem;

static void sipDealloc_QCanvasPolygonalItem(sipThisType *);

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

sipQCanvasPolygonalItem::sipQCanvasPolygonalItem(QCanvas * a0) : QCanvasPolygonalItem(a0), sipPyThis(0)
{
	sipCommonCtor(sipPyMethods,19);
}

sipQCanvasPolygonalItem::sipQCanvasPolygonalItem(const QCanvasPolygonalItem& a0) : QCanvasPolygonalItem(a0), sipPyThis(0)
{
	sipCommonCtor(sipPyMethods,19);
}

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

QRect sipQCanvasPolygonalItem::boundingRectAdvanced() const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[0],sipPyThis,NULL,sipName_boundingRectAdvanced) ?
		sipQCanvasItem::sipVH_boundingRectAdvanced(&sipPyMethods[0],sipPyThis) :
		QCanvasItem::boundingRectAdvanced();
}

QRect sipQCanvasPolygonalItem::boundingRect() const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[1],sipPyThis,NULL,sipName_boundingRect) ?
		sipQCanvasItem::sipVH_boundingRect(&sipPyMethods[1],sipPyThis) :
		QCanvasPolygonalItem::boundingRect();
}

int sipQCanvasPolygonalItem::rtti() const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[2],sipPyThis,NULL,sipName_rtti) ?
		sipQCanvasItem::sipVH_rtti(&sipPyMethods[2],sipPyThis) :
		QCanvasPolygonalItem::rtti();
}

void sipQCanvasPolygonalItem::setActive(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[3],sipPyThis,NULL,sipName_setActive))
		sipQCanvasItem::sipVH_setActive(&sipPyMethods[3],sipPyThis,a0);
	else
		QCanvasItem::setActive(a0);
}

void sipQCanvasPolygonalItem::setEnabled(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[4],sipPyThis,NULL,sipName_setEnabled))
		sipQCanvasItem::sipVH_setEnabled(&sipPyMethods[4],sipPyThis,a0);
	else
		QCanvasItem::setEnabled(a0);
}

void sipQCanvasPolygonalItem::setSelected(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[5],sipPyThis,NULL,sipName_setSelected))
		sipQCanvasItem::sipVH_setSelected(&sipPyMethods[5],sipPyThis,a0);
	else
		QCanvasItem::setSelected(a0);
}

void sipQCanvasPolygonalItem::setVisible(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[6],sipPyThis,NULL,sipName_setVisible))
		sipQCanvasItem::sipVH_setVisible(&sipPyMethods[6],sipPyThis,a0);
	else
		QCanvasItem::setVisible(a0);
}

void sipQCanvasPolygonalItem::draw(QPainter& a0)
{
	if (sipIsPyMethod(&sipPyMethods[7],sipPyThis,NULL,sipName_draw))
		sipQCanvasItem::sipVH_draw(&sipPyMethods[7],sipPyThis,a0);
	else
		QCanvasPolygonalItem::draw(a0);
}

void sipQCanvasPolygonalItem::setCanvas(QCanvas * a0)
{
	if (sipIsPyMethod(&sipPyMethods[8],sipPyThis,NULL,sipName_setCanvas))
		sipQCanvasItem::sipVH_setCanvas(&sipPyMethods[8],sipPyThis,a0);
	else
		QCanvasItem::setCanvas(a0);
}

bool sipQCanvasPolygonalItem::collidesWith(const QCanvasItem * a0) const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[9],sipPyThis,NULL,sipName_collidesWith) ?
		sipQCanvasItem::sipVH_collidesWith(&sipPyMethods[9],sipPyThis,a0) :
		QCanvasPolygonalItem::collidesWith(a0);
}

void sipQCanvasPolygonalItem::advance(int a0)
{
	if (sipIsPyMethod(&sipPyMethods[10],sipPyThis,NULL,sipName_advance))
		sipQCanvasItem::sipVH_advance(&sipPyMethods[10],sipPyThis,a0);
	else
		QCanvasItem::advance(a0);
}

void sipQCanvasPolygonalItem::setVelocity(double a0,double a1)
{
	if (sipIsPyMethod(&sipPyMethods[11],sipPyThis,NULL,sipName_setVelocity))
		sipQCanvasItem::sipVH_setVelocity(&sipPyMethods[11],sipPyThis,a0,a1);
	else
		QCanvasItem::setVelocity(a0,a1);
}

void sipQCanvasPolygonalItem::setAnimated(bool a0)
{
	if (sipIsPyMethod(&sipPyMethods[12],sipPyThis,NULL,sipName_setAnimated))
		sipQCanvasItem::sipVH_setAnimated(&sipPyMethods[12],sipPyThis,a0);
	else
		QCanvasItem::setAnimated(a0);
}

void sipQCanvasPolygonalItem::moveBy(double a0,double a1)
{
	if (sipIsPyMethod(&sipPyMethods[13],sipPyThis,NULL,sipName_moveBy))
		sipQCanvasItem::sipVH_moveBy(&sipPyMethods[13],sipPyThis,a0,a1);
	else
		QCanvasItem::moveBy(a0,a1);
}

void sipQCanvasPolygonalItem::drawShape(QPainter& a0)
{
	if (sipIsPyMethod(&sipPyMethods[14],sipPyThis,sipName_QCanvasPolygonalItem,sipName_drawShape))
		sipQCanvasPolygonalItem::sipVH_drawShape(&sipPyMethods[14],sipPyThis,a0);
}

QPointArray sipQCanvasPolygonalItem::areaPointsAdvanced() const
{
	return sipIsPyMethod((sipMethodCache *)&sipPyMethods[15],sipPyThis,NULL,sipName_areaPointsAdvanced) ?
		sipQCanvasPolygonalItem::sipVH_areaPointsAdvanced(&sipPyMethods[15],sipPyThis) :
		QCanvasPolygonalItem::areaPointsAdvanced();
}

QPointArray sipQCanvasPolygonalItem::areaPoints() const
{
	if (sipIsPyMethod((sipMethodCache *)&sipPyMethods[16],sipPyThis,sipName_QCanvasPolygonalItem,sipName_areaPoints))
		return sipQCanvasPolygonalItem::sipVH_areaPoints(&sipPyMethods[16],sipPyThis);
}

void sipQCanvasPolygonalItem::setBrush(QBrush a0)
{
	if (sipIsPyMethod(&sipPyMethods[17],sipPyThis,NULL,sipName_setBrush))
		sipQCanvasPolygonalItem::sipVH_setBrush(&sipPyMethods[17],sipPyThis,a0);
	else
		QCanvasPolygonalItem::setBrush(a0);
}

void sipQCanvasPolygonalItem::setPen(QPen a0)
{
	if (sipIsPyMethod(&sipPyMethods[18],sipPyThis,NULL,sipName_setPen))
		sipQCanvasPolygonalItem::sipVH_setPen(&sipPyMethods[18],sipPyThis,a0);
	else
		QCanvasPolygonalItem::setPen(a0);
}

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

void sipQCanvasPolygonalItem::sipVH_drawShape(const sipMethodCache *pymc,sipThisType *sipThis,QPainter& a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPainter);

	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_QCanvasPolygonalItem,sipName_drawShape);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

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

QPointArray sipQCanvasPolygonalItem::sipVH_areaPointsAdvanced(const sipMethodCache *pymc,sipThisType *sipThis)
{
	QPointArray *res;
	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)
	{
		int iserr = 0;

		res = sipForceConvertTo_QPointArray(resobj,&iserr);
		sipTransferSelf(resobj,1);

		Py_DECREF(resobj);

		if (!iserr)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvasPolygonalItem,sipName_areaPointsAdvanced);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS

	return *res;
}

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

QPointArray sipQCanvasPolygonalItem::sipVH_areaPoints(const sipMethodCache *pymc,sipThisType *sipThis)
{
	QPointArray *res;
	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)
	{
		int iserr = 0;

		res = sipForceConvertTo_QPointArray(resobj,&iserr);
		sipTransferSelf(resobj,1);

		Py_DECREF(resobj);

		if (!iserr)
			goto releaseLock;

		sipBadVirtualResultType(sipName_QCanvasPolygonalItem,sipName_areaPoints);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS

	return *res;
}

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

void sipQCanvasPolygonalItem::sipVH_setBrush(const sipMethodCache *pymc,sipThisType *sipThis,QBrush a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QBrush);

	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_QCanvasPolygonalItem,sipName_setBrush);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

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

void sipQCanvasPolygonalItem::sipVH_setPen(const sipMethodCache *pymc,sipThisType *sipThis,QPen a0)
{
	PyObject *resobj;
	PyObject *sipArgs;
	PyObject *a0obj;

	a0obj = sipMapCppToSelf(&a0,sipClass_QPen);

	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_QCanvasPolygonalItem,sipName_setPen);
	}

reportError:
	PyErr_Print();

releaseLock:
	SIP_UNBLOCK_THREADS
}

void sipQCanvasPolygonalItem::sipProtect_update()
{
	QCanvasItem::update();
}

void sipQCanvasPolygonalItem::sipProtect_draw(QPainter& a0)
{
	QCanvasPolygonalItem::draw(a0);
}

bool sipQCanvasPolygonalItem::sipProtect_winding()
{
	return QCanvasPolygonalItem::winding();
}

void sipQCanvasPolygonalItem::sipProtect_setWinding(bool a0)
{
	QCanvasPolygonalItem::setWinding(a0);
}

void sipQCanvasPolygonalItem::sipProtect_invalidate()
{
	QCanvasPolygonalItem::invalidate();
}

bool sipQCanvasPolygonalItem::sipProtect_isValid()
{
	return QCanvasPolygonalItem::isValid();
}

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

	{
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_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_QCanvasPolygonalItem,sipName_update);

	return NULL;
}

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

	{
		QCanvasItem * a0;
		QCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ0",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,sipClass_QCanvasItem,&a0))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvasPolygonalItem::collidesWith(a0);
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_collidesWith);

	return NULL;
}

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

	{
		QPen * a0;
		QCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,sipClass_QPen,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvasPolygonalItem::setPen(*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_QCanvasPolygonalItem,sipName_setPen);

	return NULL;
}

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

	{
		QBrush * a0;
		QCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"mJ1",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,sipClass_QBrush,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> QCanvasPolygonalItem::setBrush(*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_QCanvasPolygonalItem,sipName_setBrush);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = new QPen(sipCpp -> QCanvasPolygonalItem::pen());
			Py_END_ALLOW_THREADS

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

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_pen);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = new QBrush(sipCpp -> QCanvasPolygonalItem::brush());
			Py_END_ALLOW_THREADS

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

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_brush);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = new QPointArray(sipCpp -> areaPoints());
			Py_END_ALLOW_THREADS

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

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_areaPoints);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = new QPointArray(sipCpp -> QCanvasPolygonalItem::areaPointsAdvanced());
			Py_END_ALLOW_THREADS

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

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_areaPointsAdvanced);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = new QRect(sipCpp -> QCanvasPolygonalItem::boundingRect());
			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_QCanvasPolygonalItem,sipName_boundingRect);

	return NULL;
}

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

	{
		QCanvasPolygonalItem *sipCpp;

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

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> QCanvasPolygonalItem::rtti();
			Py_END_ALLOW_THREADS

			return PyInt_FromLong((long)res);
		}
	}

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_rtti);

	return NULL;
}

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

	{
		QPainter * a0;
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ1",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,sipClass_QPainter,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_draw(*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_QCanvasPolygonalItem,sipName_draw);

	return NULL;
}

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

	{
		QPainter * a0;
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pJ1",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,sipClass_QPainter,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> drawShape(*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_QCanvasPolygonalItem,sipName_drawShape);

	return NULL;
}

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

	{
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> sipProtect_winding();
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_winding);

	return NULL;
}

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

	{
		long a0;
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"pl",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_setWinding((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_QCanvasPolygonalItem,sipName_setWinding);

	return NULL;
}

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

	{
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp))
		{
			Py_BEGIN_ALLOW_THREADS
			sipCpp -> sipProtect_invalidate();
			Py_END_ALLOW_THREADS

			Py_INCREF(Py_None);
			return Py_None;
		}
	}

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_invalidate);

	return NULL;
}

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

	{
		sipQCanvasPolygonalItem *sipCpp;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QCanvasPolygonalItem,&sipCpp))
		{
			bool res;

			Py_BEGIN_ALLOW_THREADS
			res = sipCpp -> sipProtect_isValid();
			Py_END_ALLOW_THREADS

			return sipConvertFromBool((int)res);
		}
	}

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

	sipNoMethod(sipArgsParsed,sipName_QCanvasPolygonalItem,sipName_isValid);

	return NULL;
}

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

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

	if (targetClass == sipClass_QCanvasPolygonalItem)
		return ptr;

	if ((res = sipCast_QCanvasItem((QCanvasItem *)(QCanvasPolygonalItem *)ptr,targetClass)) != NULL)
		return res;

	return NULL;
}

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

		if (sipIsPyOwned(sipThis))
		{
			Py_BEGIN_ALLOW_THREADS

			if (!sipIsSimple(sipThis))
				delete (sipQCanvasPolygonalItem *)sipThis -> u.cppPtr;
			else
				delete (QCanvasPolygonalItem *)sipThis -> u.cppPtr;

			Py_END_ALLOW_THREADS
		}
	}

	sipDeleteThis(sipThis);
}

PyObject *sipNew_QCanvasPolygonalItem(PyObject *sipSelf,PyObject *sipArgs)
{
	static sipExtraType et = {
		sipCast_QCanvasPolygonalItem,
		(void *)sipNewProxy_qtcanvas,
		NULL
	};

	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)
	{
		QCanvas * a0;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"J0",sipClass_QCanvas,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipNew = new sipQCanvasPolygonalItem(a0);
			Py_END_ALLOW_THREADS

			if (a0)
				sipFlags |= SIP_XTRA_REF;
		}
	}

	if (sipNew == NULL)
	{
		QCanvasPolygonalItem * a0;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"J1",sipClass_QCanvasPolygonalItem,&a0))
		{
			Py_BEGIN_ALLOW_THREADS
			sipNew = new sipQCanvasPolygonalItem(*a0);
			Py_END_ALLOW_THREADS
		}
	}

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

	// Wrap the object.

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

			if (!(sipFlags & SIP_SIMPLE))
				delete (sipQCanvasPolygonalItem *)sipNew;
			else
				delete (QCanvasPolygonalItem *)sipNew;

			Py_END_ALLOW_THREADS
		}

		return NULL;
	}

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

	Py_INCREF(Py_None);
	return Py_None;
}

static PyMethodDef lazyMethods_QCanvasPolygonalItem[] = {
	{sipName_areaPoints, sipDo_QCanvasPolygonalItem_areaPoints, METH_VARARGS, NULL},
	{sipName_areaPointsAdvanced, sipDo_QCanvasPolygonalItem_areaPointsAdvanced, METH_VARARGS, NULL},
	{sipName_boundingRect, sipDo_QCanvasPolygonalItem_boundingRect, METH_VARARGS, NULL},
	{sipName_brush, sipDo_QCanvasPolygonalItem_brush, METH_VARARGS, NULL},
	{sipName_collidesWith, sipDo_QCanvasPolygonalItem_collidesWith, METH_VARARGS, NULL},
	{sipName_draw, sipDo_QCanvasPolygonalItem_draw, METH_VARARGS, NULL},
	{sipName_drawShape, sipDo_QCanvasPolygonalItem_drawShape, METH_VARARGS, NULL},
	{sipName_invalidate, sipDo_QCanvasPolygonalItem_invalidate, METH_VARARGS, NULL},
	{sipName_isValid, sipDo_QCanvasPolygonalItem_isValid, METH_VARARGS, NULL},
	{sipName_pen, sipDo_QCanvasPolygonalItem_pen, METH_VARARGS, NULL},
	{sipName_rtti, sipDo_QCanvasPolygonalItem_rtti, METH_VARARGS, NULL},
	{sipName_setBrush, sipDo_QCanvasPolygonalItem_setBrush, METH_VARARGS, NULL},
	{sipName_setPen, sipDo_QCanvasPolygonalItem_setPen, METH_VARARGS, NULL},
	{sipName_setWinding, sipDo_QCanvasPolygonalItem_setWinding, METH_VARARGS, NULL},
	{sipName_update, sipDo_QCanvasPolygonalItem_update, METH_VARARGS, NULL},
	{sipName_winding, sipDo_QCanvasPolygonalItem_winding, METH_VARARGS, NULL}
};

sipLazyAttrDef sipClassAttrTab_QCanvasPolygonalItem = {
	0, NULL,
	sizeof (lazyMethods_QCanvasPolygonalItem) / sizeof (PyMethodDef), lazyMethods_QCanvasPolygonalItem,
	0, NULL
};

QCanvasPolygonalItem *sipForceConvertTo_QCanvasPolygonalItem(PyObject *valobj,int *iserrp)
{
	if (*iserrp || valobj == NULL)
		return NULL;

	if (valobj == Py_None || sipIsSubClassInstance(valobj,sipClass_QCanvasPolygonalItem))
		return (QCanvasPolygonalItem *)sipConvertToCpp(valobj,sipClass_QCanvasPolygonalItem,iserrp);

	sipBadClass(sipName_QCanvasPolygonalItem);

	*iserrp = 1;

	return NULL;
}
