/*
 * Interface wrapper code.
 *
 * Generated by SIP 4.19.6
 */

#include "sipAPIKWidgetsAddons.h"

#include <keditlistwidget.h>
#include <keditlistwidget.h>

#include <qwidget.h>
#include <qlineedit.h>
#include <qcombobox.h>


class sipKEditListWidget_CustomEditor : public  ::KEditListWidget::CustomEditor
{
public:
    sipKEditListWidget_CustomEditor();
    sipKEditListWidget_CustomEditor( ::QWidget*, ::QLineEdit*);
    sipKEditListWidget_CustomEditor( ::QComboBox*);
    virtual ~sipKEditListWidget_CustomEditor();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QLineEdit* lineEdit() const;
     ::QWidget* representationWidget() const;

public:
    sipSimpleWrapper *sipPySelf;

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

    char sipPyMethods[2];
};

sipKEditListWidget_CustomEditor::sipKEditListWidget_CustomEditor():  ::KEditListWidget::CustomEditor(), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKEditListWidget_CustomEditor::sipKEditListWidget_CustomEditor( ::QWidget*a0, ::QLineEdit*a1):  ::KEditListWidget::CustomEditor(a0,a1), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKEditListWidget_CustomEditor::sipKEditListWidget_CustomEditor( ::QComboBox*a0):  ::KEditListWidget::CustomEditor(a0), sipPySelf(0)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipKEditListWidget_CustomEditor::~sipKEditListWidget_CustomEditor()
{
    sipInstanceDestroyed(sipPySelf);
}

 ::QLineEdit* sipKEditListWidget_CustomEditor::lineEdit() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[0]),sipPySelf,NULL,sipName_lineEdit);

    if (!sipMeth)
        return  ::KEditListWidget::CustomEditor::lineEdit();

    extern  ::QLineEdit* sipVH_KWidgetsAddons_58(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_KWidgetsAddons_58(sipGILState, sipImportedVirtErrorHandlers_KWidgetsAddons_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}

 ::QWidget* sipKEditListWidget_CustomEditor::representationWidget() const
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState,const_cast<char *>(&sipPyMethods[1]),sipPySelf,NULL,sipName_representationWidget);

    if (!sipMeth)
        return  ::KEditListWidget::CustomEditor::representationWidget();

    extern  ::QWidget* sipVH_KWidgetsAddons_57(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *);

    return sipVH_KWidgetsAddons_57(sipGILState, sipImportedVirtErrorHandlers_KWidgetsAddons_QtCore[0].iveh_handler, sipPySelf, sipMeth);
}


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

    {
         ::QWidget* a0;
         ::KEditListWidget::CustomEditor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KEditListWidget_CustomEditor, &sipCpp, sipType_QWidget, &a0))
        {
            sipCpp->setRepresentationWidget(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_CustomEditor, sipName_setRepresentationWidget, NULL);

    return NULL;
}


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

    {
         ::QLineEdit* a0;
         ::KEditListWidget::CustomEditor *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_KEditListWidget_CustomEditor, &sipCpp, sipType_QLineEdit, &a0))
        {
            sipCpp->setLineEdit(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_CustomEditor, sipName_setLineEdit, NULL);

    return NULL;
}


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

    {
        const  ::KEditListWidget::CustomEditor *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::KEditListWidget::CustomEditor::representationWidget() : sipCpp->representationWidget());

            return sipConvertFromType(sipRes,sipType_QWidget,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_CustomEditor, sipName_representationWidget, NULL);

    return NULL;
}


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

    {
        const  ::KEditListWidget::CustomEditor *sipCpp;

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

            sipRes = (sipSelfWasArg ? sipCpp-> ::KEditListWidget::CustomEditor::lineEdit() : sipCpp->lineEdit());

            return sipConvertFromType(sipRes,sipType_QLineEdit,NULL);
        }
    }

    /* Raise an exception if the arguments couldn't be parsed. */
    sipNoMethod(sipParseErr, sipName_CustomEditor, sipName_lineEdit, NULL);

    return NULL;
}


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


extern "C" {static void dealloc_KEditListWidget_CustomEditor(sipSimpleWrapper *);}
static void dealloc_KEditListWidget_CustomEditor(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipKEditListWidget_CustomEditor *>(sipGetAddress(sipSelf))->sipPySelf = NULL;

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


extern "C" {static void *init_type_KEditListWidget_CustomEditor(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_KEditListWidget_CustomEditor(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipKEditListWidget_CustomEditor *sipCpp = 0;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, ""))
        {
            sipCpp = new sipKEditListWidget_CustomEditor();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QWidget* a0;
         ::QLineEdit* a1;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8J8", sipType_QWidget, &a0, sipType_QLineEdit, &a1))
        {
            sipCpp = new sipKEditListWidget_CustomEditor(a0,a1);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
         ::QComboBox* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J8", sipType_QComboBox, &a0))
        {
            sipCpp = new sipKEditListWidget_CustomEditor(a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return NULL;
}


static PyMethodDef methods_KEditListWidget_CustomEditor[] = {
    {SIP_MLNAME_CAST(sipName_lineEdit), meth_KEditListWidget_CustomEditor_lineEdit, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_representationWidget), meth_KEditListWidget_CustomEditor_representationWidget, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setLineEdit), meth_KEditListWidget_CustomEditor_setLineEdit, METH_VARARGS, NULL},
    {SIP_MLNAME_CAST(sipName_setRepresentationWidget), meth_KEditListWidget_CustomEditor_setRepresentationWidget, METH_VARARGS, NULL}
};


static pyqt5ClassPluginDef plugin_KEditListWidget_CustomEditor = {
    0,
    0,
    0,
    0
};


sipClassTypeDef sipTypeDef_KWidgetsAddons_KEditListWidget_CustomEditor = {
    {
        -1,
        0,
        0,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_CLASS,
        sipNameNr_KEditListWidget__CustomEditor,
        {0},
        &plugin_KEditListWidget_CustomEditor
    },
    {
        sipNameNr_CustomEditor,
        {25, 255, 0},
        4, methods_KEditListWidget_CustomEditor,
        0, 0,
        0, 0,
        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
    },
    0,
    -1,
    -1,
    0,
    0,
    init_type_KEditListWidget_CustomEditor,
    0,
    0,
#if PY_MAJOR_VERSION >= 3
    0,
    0,
#else
    0,
    0,
    0,
    0,
#endif
    dealloc_KEditListWidget_CustomEditor,
    0,
    0,
    0,
    release_KEditListWidget_CustomEditor,
    0,
    0,
    0,
    0,
    0,
    0,
    0
};
