/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtPrintSupport.h"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtPrintSupport/qprinter.sip"
#include <qprinter.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtPrintSupport/qprinterinfo.sip"
#include <qprinterinfo.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtPrintSupport/qprintengine.sip"
#include <qprintengine.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 52 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpaintengine.sip"
#include <qpaintengine.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpaintdevice.sip"
#include <qpaintdevice.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 374 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpagedpaintdevice.sip"
#include <qpagedpaintdevice.h>
#line 53 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 56 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 164 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qrect.sip"
#include <qrect.h>
#line 59 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 646 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 62 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 103 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qsize.sip"
#include <qsize.h>
#line 65 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpagelayout.sip"
#include <qpagelayout.h>
#line 68 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qpagesize.sip"
#include <qpagesize.h>
#line 71 "/build/pyqt5/src/PyQt5-5.15.7/build/QtPrintSupport/sipQtPrintSupportQPrinter.cpp"


class sipQPrinter : public  ::QPrinter
{
public:
    sipQPrinter( ::QPrinter::PrinterMode);
    sipQPrinter(const  ::QPrinterInfo&, ::QPrinter::PrinterMode);
    virtual ~sipQPrinter();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    int metric( ::QPaintDevice::PaintDeviceMetric) const SIP_OVERRIDE;
     ::QPaintEngine* paintEngine() const SIP_OVERRIDE;
    bool newPage() SIP_OVERRIDE;
    void setPageSize( ::QPagedPaintDevice::PageSize) SIP_OVERRIDE;
    void setPageSizeMM(const  ::QSizeF&) SIP_OVERRIDE;
    void setMargins(const  ::QPagedPaintDevice::Margins&) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQPrinter(const sipQPrinter &);
    sipQPrinter &operator = (const sipQPrinter &);

    char sipPyMethods[6];
};

sipQPrinter::sipQPrinter( ::QPrinter::PrinterMode a0):  ::QPrinter(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQPrinter::sipQPrinter(const  ::QPrinterInfo& a0, ::QPrinter::PrinterMode a1):  ::QPrinter(a0,a1), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQPrinter::~sipQPrinter()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

int sipQPrinter::metric( ::QPaintDevice::PaintDeviceMetric a0) const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[0]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_metric);

    if (!sipMeth)
        return  ::QPrinter::metric(a0);

    extern int sipVH_QtPrintSupport_9(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QPaintDevice::PaintDeviceMetric);

    return sipVH_QtPrintSupport_9(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

 ::QPaintEngine* sipQPrinter::paintEngine() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, const_cast<char *>(&sipPyMethods[1]), const_cast<sipSimpleWrapper **>(&sipPySelf), SIP_NULLPTR, sipName_paintEngine);

    if (!sipMeth)
        return  ::QPrinter::paintEngine();

    extern  ::QPaintEngine* sipVH_QtPrintSupport_10(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtPrintSupport_10(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

bool sipQPrinter::newPage()
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_newPage);

    if (!sipMeth)
        return  ::QPrinter::newPage();

    extern bool sipVH_QtPrintSupport_34(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_QtPrintSupport_34(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

void sipQPrinter::setPageSize( ::QPagedPaintDevice::PageSize a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_setPageSize);

    if (!sipMeth)
    {
         ::QPrinter::setPageSize(a0);
        return;
    }

    extern void sipVH_QtPrintSupport_43(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QPagedPaintDevice::PageSize);

    sipVH_QtPrintSupport_43(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQPrinter::setPageSizeMM(const  ::QSizeF& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_setPageSizeMM);

    if (!sipMeth)
    {
         ::QPrinter::setPageSizeMM(a0);
        return;
    }

    extern void sipVH_QtPrintSupport_42(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QSizeF&);

    sipVH_QtPrintSupport_42(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQPrinter::setMargins(const  ::QPagedPaintDevice::Margins& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_setMargins);

    if (!sipMeth)
    {
         ::QPrinter::setMargins(a0);
        return;
    }

    extern void sipVH_QtPrintSupport_41(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QPagedPaintDevice::Margins&);

    sipVH_QtPrintSupport_41(sipGILState, sipImportedVirtErrorHandlers_QtPrintSupport_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QPrinter_setOutputFormat, "setOutputFormat(self, QPrinter.OutputFormat)");

extern "C" {static PyObject *meth_QPrinter_setOutputFormat(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setOutputFormat(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::OutputFormat a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_OutputFormat, &a0))
        {
            sipCpp->setOutputFormat(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setOutputFormat, doc_QPrinter_setOutputFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_outputFormat, "outputFormat(self) -> QPrinter.OutputFormat");

extern "C" {static PyObject *meth_QPrinter_outputFormat(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_outputFormat(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::OutputFormat sipRes;

            sipRes = sipCpp->outputFormat();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_OutputFormat);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_outputFormat, doc_QPrinter_outputFormat);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPrinterName, "setPrinterName(self, str)");

extern "C" {static PyObject *meth_QPrinter_setPrinterName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPrinterName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPrinterName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPrinterName, doc_QPrinter_setPrinterName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printerName, "printerName(self) -> str");

extern "C" {static PyObject *meth_QPrinter_printerName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printerName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->printerName());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printerName, doc_QPrinter_printerName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_isValid, "isValid(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_isValid(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_isValid(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_isValid, doc_QPrinter_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setOutputFileName, "setOutputFileName(self, str)");

extern "C" {static PyObject *meth_QPrinter_setOutputFileName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setOutputFileName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setOutputFileName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setOutputFileName, doc_QPrinter_setOutputFileName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_outputFileName, "outputFileName(self) -> str");

extern "C" {static PyObject *meth_QPrinter_outputFileName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_outputFileName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->outputFileName());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_outputFileName, doc_QPrinter_outputFileName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPrintProgram, "setPrintProgram(self, str)");

extern "C" {static PyObject *meth_QPrinter_setPrintProgram(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPrintProgram(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPrintProgram(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPrintProgram, doc_QPrinter_setPrintProgram);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printProgram, "printProgram(self) -> str");

extern "C" {static PyObject *meth_QPrinter_printProgram(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printProgram(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->printProgram());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printProgram, doc_QPrinter_printProgram);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setDocName, "setDocName(self, str)");

extern "C" {static PyObject *meth_QPrinter_setDocName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setDocName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setDocName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setDocName, doc_QPrinter_setDocName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_docName, "docName(self) -> str");

extern "C" {static PyObject *meth_QPrinter_docName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_docName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->docName());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_docName, doc_QPrinter_docName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setCreator, "setCreator(self, str)");

extern "C" {static PyObject *meth_QPrinter_setCreator(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setCreator(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setCreator(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setCreator, doc_QPrinter_setCreator);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_creator, "creator(self) -> str");

extern "C" {static PyObject *meth_QPrinter_creator(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_creator(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->creator());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_creator, doc_QPrinter_creator);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setOrientation, "setOrientation(self, QPrinter.Orientation)");

extern "C" {static PyObject *meth_QPrinter_setOrientation(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setOrientation(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::Orientation a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_Orientation, &a0))
        {
            sipCpp->setOrientation(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setOrientation, doc_QPrinter_setOrientation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_orientation, "orientation(self) -> QPrinter.Orientation");

extern "C" {static PyObject *meth_QPrinter_orientation(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_orientation(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::Orientation sipRes;

            sipRes = sipCpp->orientation();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_Orientation);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_orientation, doc_QPrinter_orientation);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPageSizeMM, "setPageSizeMM(self, QSizeF)");

extern "C" {static PyObject *meth_QPrinter_setPageSizeMM(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPageSizeMM(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QSizeF* a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QSizeF, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QPrinter::setPageSizeMM(*a0) : sipCpp->setPageSizeMM(*a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPageSizeMM, doc_QPrinter_setPageSizeMM);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPaperSize, "setPaperSize(self, QPagedPaintDevice.PageSize)\n"
"setPaperSize(self, QSizeF, QPrinter.Unit)");

extern "C" {static PyObject *meth_QPrinter_setPaperSize(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPaperSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::PaperSize a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPagedPaintDevice_PageSize, &a0))
        {
            sipCpp->setPaperSize(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    {
        const  ::QSizeF* a0;
         ::QPrinter::Unit a1;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9E", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QSizeF, &a0, sipType_QPrinter_Unit, &a1))
        {
            sipCpp->setPaperSize(*a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPaperSize, doc_QPrinter_setPaperSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_paperSize, "paperSize(self) -> QPagedPaintDevice.PageSize\n"
"paperSize(self, QPrinter.Unit) -> QSizeF");

extern "C" {static PyObject *meth_QPrinter_paperSize(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_paperSize(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::PaperSize sipRes;

            sipRes = sipCpp->paperSize();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPagedPaintDevice_PageSize);
        }
    }

    {
         ::QPrinter::Unit a0;
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_Unit, &a0))
        {
             ::QSizeF*sipRes;

            sipRes = new  ::QSizeF(sipCpp->paperSize(a0));

            return sipConvertFromNewType(sipRes,sipType_QSizeF,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_paperSize, doc_QPrinter_paperSize);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPageOrder, "setPageOrder(self, QPrinter.PageOrder)");

extern "C" {static PyObject *meth_QPrinter_setPageOrder(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPageOrder(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::PageOrder a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_PageOrder, &a0))
        {
            sipCpp->setPageOrder(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPageOrder, doc_QPrinter_setPageOrder);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_pageOrder, "pageOrder(self) -> QPrinter.PageOrder");

extern "C" {static PyObject *meth_QPrinter_pageOrder(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_pageOrder(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::PageOrder sipRes;

            sipRes = sipCpp->pageOrder();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_PageOrder);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_pageOrder, doc_QPrinter_pageOrder);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setResolution, "setResolution(self, int)");

extern "C" {static PyObject *meth_QPrinter_setResolution(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setResolution(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setResolution(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setResolution, doc_QPrinter_setResolution);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_resolution, "resolution(self) -> int");

extern "C" {static PyObject *meth_QPrinter_resolution(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_resolution(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->resolution();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_resolution, doc_QPrinter_resolution);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setColorMode, "setColorMode(self, QPrinter.ColorMode)");

extern "C" {static PyObject *meth_QPrinter_setColorMode(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setColorMode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::ColorMode a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_ColorMode, &a0))
        {
            sipCpp->setColorMode(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setColorMode, doc_QPrinter_setColorMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_colorMode, "colorMode(self) -> QPrinter.ColorMode");

extern "C" {static PyObject *meth_QPrinter_colorMode(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_colorMode(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::ColorMode sipRes;

            sipRes = sipCpp->colorMode();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_ColorMode);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_colorMode, doc_QPrinter_colorMode);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setCollateCopies, "setCollateCopies(self, bool)");

extern "C" {static PyObject *meth_QPrinter_setCollateCopies(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setCollateCopies(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setCollateCopies(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setCollateCopies, doc_QPrinter_setCollateCopies);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_collateCopies, "collateCopies(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_collateCopies(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_collateCopies(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->collateCopies();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_collateCopies, doc_QPrinter_collateCopies);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setFullPage, "setFullPage(self, bool)");

extern "C" {static PyObject *meth_QPrinter_setFullPage(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setFullPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setFullPage(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setFullPage, doc_QPrinter_setFullPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_fullPage, "fullPage(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_fullPage(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_fullPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->fullPage();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_fullPage, doc_QPrinter_fullPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setCopyCount, "setCopyCount(self, int)");

extern "C" {static PyObject *meth_QPrinter_setCopyCount(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setCopyCount(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setCopyCount(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setCopyCount, doc_QPrinter_setCopyCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_copyCount, "copyCount(self) -> int");

extern "C" {static PyObject *meth_QPrinter_copyCount(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_copyCount(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->copyCount();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_copyCount, doc_QPrinter_copyCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_supportsMultipleCopies, "supportsMultipleCopies(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_supportsMultipleCopies(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_supportsMultipleCopies(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->supportsMultipleCopies();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_supportsMultipleCopies, doc_QPrinter_supportsMultipleCopies);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPaperSource, "setPaperSource(self, QPrinter.PaperSource)");

extern "C" {static PyObject *meth_QPrinter_setPaperSource(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPaperSource(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::PaperSource a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_PaperSource, &a0))
        {
            sipCpp->setPaperSource(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPaperSource, doc_QPrinter_setPaperSource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_paperSource, "paperSource(self) -> QPrinter.PaperSource");

extern "C" {static PyObject *meth_QPrinter_paperSource(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_paperSource(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::PaperSource sipRes;

            sipRes = sipCpp->paperSource();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_PaperSource);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_paperSource, doc_QPrinter_paperSource);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setDuplex, "setDuplex(self, QPrinter.DuplexMode)");

extern "C" {static PyObject *meth_QPrinter_setDuplex(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setDuplex(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::DuplexMode a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_DuplexMode, &a0))
        {
            sipCpp->setDuplex(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setDuplex, doc_QPrinter_setDuplex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_duplex, "duplex(self) -> QPrinter.DuplexMode");

extern "C" {static PyObject *meth_QPrinter_duplex(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_duplex(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::DuplexMode sipRes;

            sipRes = sipCpp->duplex();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_DuplexMode);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_duplex, doc_QPrinter_duplex);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_supportedResolutions, "supportedResolutions(self) -> List[int]");

extern "C" {static PyObject *meth_QPrinter_supportedResolutions(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_supportedResolutions(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QList<int>*sipRes;

            sipRes = new  ::QList<int>(sipCpp->supportedResolutions());

            return sipConvertFromNewType(sipRes,sipType_QList_1800,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_supportedResolutions, doc_QPrinter_supportedResolutions);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setFontEmbeddingEnabled, "setFontEmbeddingEnabled(self, bool)");

extern "C" {static PyObject *meth_QPrinter_setFontEmbeddingEnabled(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setFontEmbeddingEnabled(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setFontEmbeddingEnabled(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setFontEmbeddingEnabled, doc_QPrinter_setFontEmbeddingEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_fontEmbeddingEnabled, "fontEmbeddingEnabled(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_fontEmbeddingEnabled(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_fontEmbeddingEnabled(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->fontEmbeddingEnabled();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_fontEmbeddingEnabled, doc_QPrinter_fontEmbeddingEnabled);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setDoubleSidedPrinting, "setDoubleSidedPrinting(self, bool)");

extern "C" {static PyObject *meth_QPrinter_setDoubleSidedPrinting(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setDoubleSidedPrinting(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        bool a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QPrinter, &sipCpp, &a0))
        {
            sipCpp->setDoubleSidedPrinting(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setDoubleSidedPrinting, doc_QPrinter_setDoubleSidedPrinting);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_doubleSidedPrinting, "doubleSidedPrinting(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_doubleSidedPrinting(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_doubleSidedPrinting(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->doubleSidedPrinting();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_doubleSidedPrinting, doc_QPrinter_doubleSidedPrinting);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_paperRect, "paperRect(self) -> QRect\n"
"paperRect(self, QPrinter.Unit) -> QRectF");

extern "C" {static PyObject *meth_QPrinter_paperRect(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_paperRect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QRect*sipRes;

            sipRes = new  ::QRect(sipCpp->paperRect());

            return sipConvertFromNewType(sipRes,sipType_QRect,SIP_NULLPTR);
        }
    }

    {
         ::QPrinter::Unit a0;
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_Unit, &a0))
        {
             ::QRectF*sipRes;

            sipRes = new  ::QRectF(sipCpp->paperRect(a0));

            return sipConvertFromNewType(sipRes,sipType_QRectF,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_paperRect, doc_QPrinter_paperRect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_pageRect, "pageRect(self) -> QRect\n"
"pageRect(self, QPrinter.Unit) -> QRectF");

extern "C" {static PyObject *meth_QPrinter_pageRect(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_pageRect(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QRect*sipRes;

            sipRes = new  ::QRect(sipCpp->pageRect());

            return sipConvertFromNewType(sipRes,sipType_QRect,SIP_NULLPTR);
        }
    }

    {
         ::QPrinter::Unit a0;
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_Unit, &a0))
        {
             ::QRectF*sipRes;

            sipRes = new  ::QRectF(sipCpp->pageRect(a0));

            return sipConvertFromNewType(sipRes,sipType_QRectF,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_pageRect, doc_QPrinter_pageRect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printerSelectionOption, "printerSelectionOption(self) -> str");

extern "C" {static PyObject *meth_QPrinter_printerSelectionOption(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printerSelectionOption(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->printerSelectionOption());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printerSelectionOption, doc_QPrinter_printerSelectionOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPrinterSelectionOption, "setPrinterSelectionOption(self, str)");

extern "C" {static PyObject *meth_QPrinter_setPrinterSelectionOption(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPrinterSelectionOption(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPrinterSelectionOption(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPrinterSelectionOption, doc_QPrinter_setPrinterSelectionOption);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_newPage, "newPage(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_newPage(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_newPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QPrinter::newPage() : sipCpp->newPage());

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_newPage, doc_QPrinter_newPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_abort, "abort(self) -> bool");

extern "C" {static PyObject *meth_QPrinter_abort(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_abort(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->abort();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_abort, doc_QPrinter_abort);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printerState, "printerState(self) -> QPrinter.PrinterState");

extern "C" {static PyObject *meth_QPrinter_printerState(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printerState(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::PrinterState sipRes;

            sipRes = sipCpp->printerState();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_PrinterState);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printerState, doc_QPrinter_printerState);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_paintEngine, "paintEngine(self) -> QPaintEngine");

extern "C" {static PyObject *meth_QPrinter_paintEngine(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_paintEngine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPaintEngine*sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QPrinter::paintEngine() : sipCpp->paintEngine());

            return sipConvertFromType(sipRes,sipType_QPaintEngine,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_paintEngine, doc_QPrinter_paintEngine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printEngine, "printEngine(self) -> QPrintEngine");

extern "C" {static PyObject *meth_QPrinter_printEngine(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printEngine(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrintEngine*sipRes;

            sipRes = sipCpp->printEngine();

            return sipConvertFromType(sipRes,sipType_QPrintEngine,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printEngine, doc_QPrinter_printEngine);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setFromTo, "setFromTo(self, int, int)");

extern "C" {static PyObject *meth_QPrinter_setFromTo(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setFromTo(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        int a1;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bii", &sipSelf, sipType_QPrinter, &sipCpp, &a0, &a1))
        {
            sipCpp->setFromTo(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setFromTo, doc_QPrinter_setFromTo);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_fromPage, "fromPage(self) -> int");

extern "C" {static PyObject *meth_QPrinter_fromPage(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_fromPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->fromPage();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_fromPage, doc_QPrinter_fromPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_toPage, "toPage(self) -> int");

extern "C" {static PyObject *meth_QPrinter_toPage(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_toPage(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->toPage();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_toPage, doc_QPrinter_toPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPrintRange, "setPrintRange(self, QPrinter.PrintRange)");

extern "C" {static PyObject *meth_QPrinter_setPrintRange(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPrintRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrinter::PrintRange a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_PrintRange, &a0))
        {
            sipCpp->setPrintRange(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPrintRange, doc_QPrinter_setPrintRange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_printRange, "printRange(self) -> QPrinter.PrintRange");

extern "C" {static PyObject *meth_QPrinter_printRange(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_printRange(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPrinter::PrintRange sipRes;

            sipRes = sipCpp->printRange();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPrinter_PrintRange);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_printRange, doc_QPrinter_printRange);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setMargins, "setMargins(self, QPagedPaintDevice.Margins)");

extern "C" {static PyObject *meth_QPrinter_setMargins(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setMargins(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
        const  ::QPagedPaintDevice::Margins* a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPagedPaintDevice_Margins, &a0))
        {
            (sipSelfWasArg ? sipCpp-> ::QPrinter::setMargins(*a0) : sipCpp->setMargins(*a0));

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setMargins, doc_QPrinter_setMargins);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPageMargins, "setPageMargins(self, float, float, float, float, QPrinter.Unit)");

extern "C" {static PyObject *meth_QPrinter_setPageMargins(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPageMargins(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::qreal a0;
         ::qreal a1;
         ::qreal a2;
         ::qreal a3;
         ::QPrinter::Unit a4;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BddddE", &sipSelf, sipType_QPrinter, &sipCpp, &a0, &a1, &a2, &a3, sipType_QPrinter_Unit, &a4))
        {
            sipCpp->setPageMargins(a0,a1,a2,a3,a4);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPageMargins, doc_QPrinter_setPageMargins);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_getPageMargins, "getPageMargins(self, QPrinter.Unit) -> Tuple[float, float, float, float]");

extern "C" {static PyObject *meth_QPrinter_getPageMargins(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_getPageMargins(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::qreal a0;
         ::qreal a1;
         ::qreal a2;
         ::qreal a3;
         ::QPrinter::Unit a4;
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrinter_Unit, &a4))
        {
            sipCpp->getPageMargins(&a0,&a1,&a2,&a3,a4);

            return sipBuildResult(0,"(dddd)",a0,a1,a2,a3);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_getPageMargins, doc_QPrinter_getPageMargins);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_metric, "metric(self, QPaintDevice.PaintDeviceMetric) -> int");

extern "C" {static PyObject *meth_QPrinter_metric(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_metric(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    bool sipSelfWasArg = (!sipSelf || sipIsDerivedClass((sipSimpleWrapper *)sipSelf));

    {
         ::QPaintDevice::PaintDeviceMetric a0;
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPaintDevice_PaintDeviceMetric, &a0))
        {
            int sipRes;

            sipRes = (sipSelfWasArg ? sipCpp-> ::QPrinter::metric(a0) : sipCpp->metric(a0));

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_metric, doc_QPrinter_metric);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setEngines, "setEngines(self, QPrintEngine, QPaintEngine)");

extern "C" {static PyObject *meth_QPrinter_setEngines(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setEngines(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPrintEngine* a0;
         ::QPaintEngine* a1;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "pJ8J8", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPrintEngine, &a0, sipType_QPaintEngine, &a1))
        {
            sipCpp->setEngines(a0,a1);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setEngines, doc_QPrinter_setEngines);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPaperName, "setPaperName(self, str)");

extern "C" {static PyObject *meth_QPrinter_setPaperName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPaperName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QString, &a0, &a0State))
        {
            sipCpp->setPaperName(*a0);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPaperName, doc_QPrinter_setPaperName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_paperName, "paperName(self) -> str");

extern "C" {static PyObject *meth_QPrinter_paperName(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_paperName(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QString*sipRes;

            sipRes = new  ::QString(sipCpp->paperName());

            return sipConvertFromNewType(sipRes,sipType_QString,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_paperName, doc_QPrinter_paperName);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_setPdfVersion, "setPdfVersion(self, QPagedPaintDevice.PdfVersion)");

extern "C" {static PyObject *meth_QPrinter_setPdfVersion(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_setPdfVersion(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QPagedPaintDevice::PdfVersion a0;
         ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QPrinter, &sipCpp, sipType_QPagedPaintDevice_PdfVersion, &a0))
        {
            sipCpp->setPdfVersion(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_setPdfVersion, doc_QPrinter_setPdfVersion);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPrinter_pdfVersion, "pdfVersion(self) -> QPagedPaintDevice.PdfVersion");

extern "C" {static PyObject *meth_QPrinter_pdfVersion(PyObject *, PyObject *);}
static PyObject *meth_QPrinter_pdfVersion(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QPrinter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPrinter, &sipCpp))
        {
             ::QPagedPaintDevice::PdfVersion sipRes;

            sipRes = sipCpp->pdfVersion();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QPagedPaintDevice_PdfVersion);
        }
    }

    sipNoMethod(sipParseErr, sipName_QPrinter, sipName_pdfVersion, doc_QPrinter_pdfVersion);

    return SIP_NULLPTR;
}


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QPrinter(void *, const sipTypeDef *);}
static void *cast_QPrinter(void *sipCppV, const sipTypeDef *targetType)
{
     ::QPrinter *sipCpp = reinterpret_cast< ::QPrinter *>(sipCppV);

    if (targetType == sipType_QPrinter)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QPagedPaintDevice)->ctd_cast(static_cast< ::QPagedPaintDevice *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QPrinter(void *, int);}
static void release_QPrinter(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQPrinter *>(sipCppV);
    else
        delete reinterpret_cast< ::QPrinter *>(sipCppV);
}


extern "C" {static void *array_QPrinter(Py_ssize_t);}
static void *array_QPrinter(Py_ssize_t sipNrElem)
{
    return new  ::QPrinter[sipNrElem];
}


extern "C" {static void array_delete_QPrinter(void *);}
static void array_delete_QPrinter(void *sipCpp)
{
    delete[] reinterpret_cast< ::QPrinter *>(sipCpp);
}


extern "C" {static void dealloc_QPrinter(sipSimpleWrapper *);}
static void dealloc_QPrinter(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQPrinter *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QPrinter(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QPrinter(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QPrinter(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQPrinter *sipCpp = SIP_NULLPTR;

    {
         ::QPrinter::PrinterMode a0 = QPrinter::ScreenResolution;

        static const char *sipKwdList[] = {
            sipName_mode,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "|E", sipType_QPrinter_PrinterMode, &a0))
        {
            sipCpp = new sipQPrinter(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QPrinterInfo* a0;
         ::QPrinter::PrinterMode a1 = QPrinter::ScreenResolution;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_mode,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J9|E", sipType_QPrinterInfo, &a0, sipType_QPrinter_PrinterMode, &a1))
        {
            sipCpp = new sipQPrinter(*a0,a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QPrinter[] = {{14, 1, 1}};


static PyMethodDef methods_QPrinter[] = {
    {sipName_abort, meth_QPrinter_abort, METH_VARARGS, doc_QPrinter_abort},
    {sipName_collateCopies, meth_QPrinter_collateCopies, METH_VARARGS, doc_QPrinter_collateCopies},
    {sipName_colorMode, meth_QPrinter_colorMode, METH_VARARGS, doc_QPrinter_colorMode},
    {sipName_copyCount, meth_QPrinter_copyCount, METH_VARARGS, doc_QPrinter_copyCount},
    {sipName_creator, meth_QPrinter_creator, METH_VARARGS, doc_QPrinter_creator},
    {sipName_docName, meth_QPrinter_docName, METH_VARARGS, doc_QPrinter_docName},
    {sipName_doubleSidedPrinting, meth_QPrinter_doubleSidedPrinting, METH_VARARGS, doc_QPrinter_doubleSidedPrinting},
    {sipName_duplex, meth_QPrinter_duplex, METH_VARARGS, doc_QPrinter_duplex},
    {sipName_fontEmbeddingEnabled, meth_QPrinter_fontEmbeddingEnabled, METH_VARARGS, doc_QPrinter_fontEmbeddingEnabled},
    {sipName_fromPage, meth_QPrinter_fromPage, METH_VARARGS, doc_QPrinter_fromPage},
    {sipName_fullPage, meth_QPrinter_fullPage, METH_VARARGS, doc_QPrinter_fullPage},
    {sipName_getPageMargins, meth_QPrinter_getPageMargins, METH_VARARGS, doc_QPrinter_getPageMargins},
    {sipName_isValid, meth_QPrinter_isValid, METH_VARARGS, doc_QPrinter_isValid},
    {sipName_metric, meth_QPrinter_metric, METH_VARARGS, doc_QPrinter_metric},
    {sipName_newPage, meth_QPrinter_newPage, METH_VARARGS, doc_QPrinter_newPage},
    {sipName_orientation, meth_QPrinter_orientation, METH_VARARGS, doc_QPrinter_orientation},
    {sipName_outputFileName, meth_QPrinter_outputFileName, METH_VARARGS, doc_QPrinter_outputFileName},
    {sipName_outputFormat, meth_QPrinter_outputFormat, METH_VARARGS, doc_QPrinter_outputFormat},
    {sipName_pageOrder, meth_QPrinter_pageOrder, METH_VARARGS, doc_QPrinter_pageOrder},
    {sipName_pageRect, meth_QPrinter_pageRect, METH_VARARGS, doc_QPrinter_pageRect},
    {sipName_paintEngine, meth_QPrinter_paintEngine, METH_VARARGS, doc_QPrinter_paintEngine},
    {sipName_paperName, meth_QPrinter_paperName, METH_VARARGS, doc_QPrinter_paperName},
    {sipName_paperRect, meth_QPrinter_paperRect, METH_VARARGS, doc_QPrinter_paperRect},
    {sipName_paperSize, meth_QPrinter_paperSize, METH_VARARGS, doc_QPrinter_paperSize},
    {sipName_paperSource, meth_QPrinter_paperSource, METH_VARARGS, doc_QPrinter_paperSource},
    {sipName_pdfVersion, meth_QPrinter_pdfVersion, METH_VARARGS, doc_QPrinter_pdfVersion},
    {sipName_printEngine, meth_QPrinter_printEngine, METH_VARARGS, doc_QPrinter_printEngine},
    {sipName_printProgram, meth_QPrinter_printProgram, METH_VARARGS, doc_QPrinter_printProgram},
    {sipName_printRange, meth_QPrinter_printRange, METH_VARARGS, doc_QPrinter_printRange},
    {sipName_printerName, meth_QPrinter_printerName, METH_VARARGS, doc_QPrinter_printerName},
    {sipName_printerSelectionOption, meth_QPrinter_printerSelectionOption, METH_VARARGS, doc_QPrinter_printerSelectionOption},
    {sipName_printerState, meth_QPrinter_printerState, METH_VARARGS, doc_QPrinter_printerState},
    {sipName_resolution, meth_QPrinter_resolution, METH_VARARGS, doc_QPrinter_resolution},
    {sipName_setCollateCopies, meth_QPrinter_setCollateCopies, METH_VARARGS, doc_QPrinter_setCollateCopies},
    {sipName_setColorMode, meth_QPrinter_setColorMode, METH_VARARGS, doc_QPrinter_setColorMode},
    {sipName_setCopyCount, meth_QPrinter_setCopyCount, METH_VARARGS, doc_QPrinter_setCopyCount},
    {sipName_setCreator, meth_QPrinter_setCreator, METH_VARARGS, doc_QPrinter_setCreator},
    {sipName_setDocName, meth_QPrinter_setDocName, METH_VARARGS, doc_QPrinter_setDocName},
    {sipName_setDoubleSidedPrinting, meth_QPrinter_setDoubleSidedPrinting, METH_VARARGS, doc_QPrinter_setDoubleSidedPrinting},
    {sipName_setDuplex, meth_QPrinter_setDuplex, METH_VARARGS, doc_QPrinter_setDuplex},
    {sipName_setEngines, meth_QPrinter_setEngines, METH_VARARGS, doc_QPrinter_setEngines},
    {sipName_setFontEmbeddingEnabled, meth_QPrinter_setFontEmbeddingEnabled, METH_VARARGS, doc_QPrinter_setFontEmbeddingEnabled},
    {sipName_setFromTo, meth_QPrinter_setFromTo, METH_VARARGS, doc_QPrinter_setFromTo},
    {sipName_setFullPage, meth_QPrinter_setFullPage, METH_VARARGS, doc_QPrinter_setFullPage},
    {sipName_setMargins, meth_QPrinter_setMargins, METH_VARARGS, doc_QPrinter_setMargins},
    {sipName_setOrientation, meth_QPrinter_setOrientation, METH_VARARGS, doc_QPrinter_setOrientation},
    {sipName_setOutputFileName, meth_QPrinter_setOutputFileName, METH_VARARGS, doc_QPrinter_setOutputFileName},
    {sipName_setOutputFormat, meth_QPrinter_setOutputFormat, METH_VARARGS, doc_QPrinter_setOutputFormat},
    {sipName_setPageMargins, meth_QPrinter_setPageMargins, METH_VARARGS, doc_QPrinter_setPageMargins},
    {sipName_setPageOrder, meth_QPrinter_setPageOrder, METH_VARARGS, doc_QPrinter_setPageOrder},
    {sipName_setPageSizeMM, meth_QPrinter_setPageSizeMM, METH_VARARGS, doc_QPrinter_setPageSizeMM},
    {sipName_setPaperName, meth_QPrinter_setPaperName, METH_VARARGS, doc_QPrinter_setPaperName},
    {sipName_setPaperSize, meth_QPrinter_setPaperSize, METH_VARARGS, doc_QPrinter_setPaperSize},
    {sipName_setPaperSource, meth_QPrinter_setPaperSource, METH_VARARGS, doc_QPrinter_setPaperSource},
    {sipName_setPdfVersion, meth_QPrinter_setPdfVersion, METH_VARARGS, doc_QPrinter_setPdfVersion},
    {sipName_setPrintProgram, meth_QPrinter_setPrintProgram, METH_VARARGS, doc_QPrinter_setPrintProgram},
    {sipName_setPrintRange, meth_QPrinter_setPrintRange, METH_VARARGS, doc_QPrinter_setPrintRange},
    {sipName_setPrinterName, meth_QPrinter_setPrinterName, METH_VARARGS, doc_QPrinter_setPrinterName},
    {sipName_setPrinterSelectionOption, meth_QPrinter_setPrinterSelectionOption, METH_VARARGS, doc_QPrinter_setPrinterSelectionOption},
    {sipName_setResolution, meth_QPrinter_setResolution, METH_VARARGS, doc_QPrinter_setResolution},
    {sipName_supportedResolutions, meth_QPrinter_supportedResolutions, METH_VARARGS, doc_QPrinter_supportedResolutions},
    {sipName_supportsMultipleCopies, meth_QPrinter_supportsMultipleCopies, METH_VARARGS, doc_QPrinter_supportsMultipleCopies},
    {sipName_toPage, meth_QPrinter_toPage, METH_VARARGS, doc_QPrinter_toPage}
};

static sipEnumMemberDef enummembers_QPrinter[] = {
    {sipName_Aborted, static_cast<int>( ::QPrinter::Aborted), 27},
    {sipName_Active, static_cast<int>( ::QPrinter::Active), 27},
    {sipName_AllPages, static_cast<int>( ::QPrinter::AllPages), 25},
    {sipName_Auto, static_cast<int>( ::QPrinter::Auto), 24},
    {sipName_Cassette, static_cast<int>( ::QPrinter::Cassette), 24},
    {sipName_Cicero, static_cast<int>( ::QPrinter::Cicero), 28},
    {sipName_Color, static_cast<int>( ::QPrinter::Color), 19},
    {sipName_CurrentPage, static_cast<int>( ::QPrinter::CurrentPage), 25},
    {sipName_CustomSource, static_cast<int>( ::QPrinter::CustomSource), 24},
    {sipName_DevicePixel, static_cast<int>( ::QPrinter::DevicePixel), 28},
    {sipName_Didot, static_cast<int>( ::QPrinter::Didot), 28},
    {sipName_DuplexAuto, static_cast<int>( ::QPrinter::DuplexAuto), 20},
    {sipName_DuplexLongSide, static_cast<int>( ::QPrinter::DuplexLongSide), 20},
    {sipName_DuplexNone, static_cast<int>( ::QPrinter::DuplexNone), 20},
    {sipName_DuplexShortSide, static_cast<int>( ::QPrinter::DuplexShortSide), 20},
    {sipName_Envelope, static_cast<int>( ::QPrinter::Envelope), 24},
    {sipName_EnvelopeManual, static_cast<int>( ::QPrinter::EnvelopeManual), 24},
    {sipName_Error, static_cast<int>( ::QPrinter::Error), 27},
    {sipName_FirstPageFirst, static_cast<int>( ::QPrinter::FirstPageFirst), 23},
    {sipName_FormSource, static_cast<int>( ::QPrinter::FormSource), 24},
    {sipName_GrayScale, static_cast<int>( ::QPrinter::GrayScale), 19},
    {sipName_HighResolution, static_cast<int>( ::QPrinter::HighResolution), 26},
    {sipName_Idle, static_cast<int>( ::QPrinter::Idle), 27},
    {sipName_Inch, static_cast<int>( ::QPrinter::Inch), 28},
    {sipName_Landscape, static_cast<int>( ::QPrinter::Landscape), 21},
    {sipName_LargeCapacity, static_cast<int>( ::QPrinter::LargeCapacity), 24},
    {sipName_LargeFormat, static_cast<int>( ::QPrinter::LargeFormat), 24},
    {sipName_LastPageFirst, static_cast<int>( ::QPrinter::LastPageFirst), 23},
    {sipName_LastPaperSource, static_cast<int>( ::QPrinter::LastPaperSource), 24},
    {sipName_Lower, static_cast<int>( ::QPrinter::Lower), 24},
    {sipName_Manual, static_cast<int>( ::QPrinter::Manual), 24},
    {sipName_MaxPageSource, static_cast<int>( ::QPrinter::MaxPageSource), 24},
    {sipName_Middle, static_cast<int>( ::QPrinter::Middle), 24},
    {sipName_Millimeter, static_cast<int>( ::QPrinter::Millimeter), 28},
    {sipName_NativeFormat, static_cast<int>( ::QPrinter::NativeFormat), 22},
    {sipName_OnlyOne, static_cast<int>( ::QPrinter::OnlyOne), 24},
    {sipName_PageRange, static_cast<int>( ::QPrinter::PageRange), 25},
    {sipName_PdfFormat, static_cast<int>( ::QPrinter::PdfFormat), 22},
    {sipName_Pica, static_cast<int>( ::QPrinter::Pica), 28},
    {sipName_Point, static_cast<int>( ::QPrinter::Point), 28},
    {sipName_Portrait, static_cast<int>( ::QPrinter::Portrait), 21},
    {sipName_PrinterResolution, static_cast<int>( ::QPrinter::PrinterResolution), 26},
    {sipName_ScreenResolution, static_cast<int>( ::QPrinter::ScreenResolution), 26},
    {sipName_Selection, static_cast<int>( ::QPrinter::Selection), 25},
    {sipName_SmallFormat, static_cast<int>( ::QPrinter::SmallFormat), 24},
    {sipName_Tractor, static_cast<int>( ::QPrinter::Tractor), 24},
    {sipName_Upper, static_cast<int>( ::QPrinter::Upper), 24},
};

PyDoc_STRVAR(doc_QPrinter, "\1QPrinter(mode: QPrinter.PrinterMode = QPrinter.ScreenResolution)\n"
"QPrinter(QPrinterInfo, mode: QPrinter.PrinterMode = QPrinter.ScreenResolution)");


static pyqt5ClassPluginDef plugin_QPrinter = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtPrintSupport_QPrinter = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPrinter,
        SIP_NULLPTR,
        &plugin_QPrinter
    },
    {
        sipNameNr_QPrinter,
        {0, 0, 1},
        63, methods_QPrinter,
        47, enummembers_QPrinter,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QPrinter,
    -1,
    -1,
    supers_QPrinter,
    SIP_NULLPTR,
    init_type_QPrinter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPrinter,
    SIP_NULLPTR,
    array_QPrinter,
    SIP_NULLPTR,
    release_QPrinter,
    cast_QPrinter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPrinter,
    sizeof ( ::QPrinter),
};
