//Auto-generated by /usr/bin/smokegen. DO NOT EDIT.
#include <kparts_includes.h>
#include <typeinfo>

#include <smoke.h>
#include <kparts_smoke.h>

class __internal_SmokeClass {};

namespace __smokekparts {

class x_KParts__Event : public KParts::Event, public __internal_SmokeClass {
    SmokeBinding* _binding;
public:
    void x_0(Smoke::Stack x) {
        // set the smoke binding
        _binding = (SmokeBinding*)x[1].s_class;
    }
    static void x_1(Smoke::Stack x) {
        // KParts::Event* Event(const char*)
        x_KParts__Event* xret = new x_KParts__Event((const char*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KParts__Event(const char* x1) : Event(x1) {}
    void x_2(Smoke::Stack x) {
        // virtual const char* eventName() const
        if (dynamic_cast<__internal_SmokeClass*>(static_cast<KParts::Event*>(this))) {
            const char* xret = ((const x_KParts__Event*)this)->KParts::Event::eventName();
            x[0].s_class = (void*)xret;
        } else {
            const char* xret = ((const x_KParts__Event*)this)->eventName();
            x[0].s_class = (void*)xret;
        }
    }
    static void x_3(Smoke::Stack x) {
        // static bool test(const QEvent*)
        bool xret = KParts::Event::test((const QEvent*)x[1].s_class);
        x[0].s_bool = xret;
    }
    static void x_4(Smoke::Stack x) {
        // static bool test(const QEvent*, const char*)
        bool xret = KParts::Event::test((const QEvent*)x[1].s_class,(const char*)x[2].s_class);
        x[0].s_bool = xret;
    }
    static void x_5(Smoke::Stack x) {
        // KParts::Event* Event(const KParts::Event&)
        x_KParts__Event* xret = new x_KParts__Event(*(const KParts::Event*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KParts__Event(const KParts::Event& x1) : Event(x1) {}
    virtual const char* eventName() const {
        Smoke::StackItem x[1];
        if (this->_binding->callMethod(196, (void*)this, x)) return (const char*)x[0].s_class;
        return this->KParts::Event::eventName();
    }
    ~x_KParts__Event() { this->_binding->deleted(17, (void*)this); }
};
void xcall_KParts__Event(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_KParts__Event *xself = (x_KParts__Event*)obj;
    switch(xi) {
        case 0: xself->x_0(args);	break;
        case 1: x_KParts__Event::x_1(args);	break;
        case 2: xself->x_2(args);	break;
        case 3: x_KParts__Event::x_3(args);	break;
        case 4: x_KParts__Event::x_4(args);	break;
        case 5: x_KParts__Event::x_5(args);	break;
        case 6: delete (KParts::Event*)xself;	break;
    }
}

}
