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

#line 688 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qevent.sip"
#include <qevent.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qfile.sip"
#include <qfile.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 109 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtGui/sipQtGuiQFileOpenEvent.cpp"


PyDoc_STRVAR(doc_QFileOpenEvent_file, "file(self) -> str");

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

    {
        const  ::QFileOpenEvent *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_file, doc_QFileOpenEvent_file);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFileOpenEvent_url, "url(self) -> QUrl");

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

    {
        const  ::QFileOpenEvent *sipCpp;

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

            sipRes = new  ::QUrl(sipCpp->url());

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

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_url, doc_QFileOpenEvent_url);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QFileOpenEvent_openFile, "openFile(self, QFile, Union[QIODevice.OpenMode, QIODevice.OpenModeFlag]) -> bool");

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

    {
         ::QFile* a0;
         ::QIODevice::OpenMode* a1;
        int a1State = 0;
        const  ::QFileOpenEvent *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9J1", &sipSelf, sipType_QFileOpenEvent, &sipCpp, sipType_QFile, &a0, sipType_QIODevice_OpenMode, &a1, &a1State))
        {
            bool sipRes;

            sipRes = sipCpp->openFile(*a0,*a1);
            sipReleaseType(a1, sipType_QIODevice_OpenMode, a1State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QFileOpenEvent, sipName_openFile, doc_QFileOpenEvent_openFile);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QFileOpenEvent)
        return sipCppV;

    if (targetType == sipType_QEvent)
        return static_cast< ::QEvent *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QFileOpenEvent(void *, int);}
static void release_QFileOpenEvent(void *sipCppV, int)
{
    delete reinterpret_cast< ::QFileOpenEvent *>(sipCppV);
}


extern "C" {static void dealloc_QFileOpenEvent(sipSimpleWrapper *);}
static void dealloc_QFileOpenEvent(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QFileOpenEvent(sipGetAddress(sipSelf), 0);
    }
}


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


static PyMethodDef methods_QFileOpenEvent[] = {
    {sipName_file, meth_QFileOpenEvent_file, METH_VARARGS, doc_QFileOpenEvent_file},
    {sipName_openFile, meth_QFileOpenEvent_openFile, METH_VARARGS, doc_QFileOpenEvent_openFile},
    {sipName_url, meth_QFileOpenEvent_url, METH_VARARGS, doc_QFileOpenEvent_url}
};


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


sipClassTypeDef sipTypeDef_QtGui_QFileOpenEvent = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QFileOpenEvent,
        SIP_NULLPTR,
        &plugin_QFileOpenEvent
    },
    {
        sipNameNr_QFileOpenEvent,
        {0, 0, 1},
        3, methods_QFileOpenEvent,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    -1,
    supers_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QFileOpenEvent,
    cast_QFileOpenEvent,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
