
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2026 Matthias Koefferlein

  This program 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 of the License, or
  (at your option) any later version.

  This program is distributed 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 this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

/**
*  @file gsiDeclQChildEvent.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include <QChildEvent>
#include <QObject>
#include "gsiQt.h"
#include "gsiQtCoreCommon.h"
#include <memory>

// -----------------------------------------------------------------------
// class QChildEvent

// bool QChildEvent::added()


static void _init_f_added_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_added_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QChildEvent *)cls)->added ());
}


// QObject *QChildEvent::child()


static void _init_f_child_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QObject * > ();
}

static void _call_f_child_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QObject * > ((QObject *)((QChildEvent *)cls)->child ());
}


// QChildEvent *QChildEvent::clone()


static void _init_f_clone_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QChildEvent * > ();
}

static void _call_f_clone_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QChildEvent * > ((QChildEvent *)((QChildEvent *)cls)->clone ());
}


// bool QChildEvent::polished()


static void _init_f_polished_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_polished_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QChildEvent *)cls)->polished ());
}


// bool QChildEvent::removed()


static void _init_f_removed_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<bool > ();
}

static void _call_f_removed_c0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<bool > ((bool)((QChildEvent *)cls)->removed ());
}


namespace gsi
{

static gsi::Methods methods_QChildEvent () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericMethod ("added", "@brief Method bool QChildEvent::added()\n", true, &_init_f_added_c0, &_call_f_added_c0);
  methods += new qt_gsi::GenericMethod ("child", "@brief Method QObject *QChildEvent::child()\n", true, &_init_f_child_c0, &_call_f_child_c0);
  methods += new qt_gsi::GenericMethod ("clone", "@brief Method QChildEvent *QChildEvent::clone()\nThis is a reimplementation of QEvent::clone", true, &_init_f_clone_c0, &_call_f_clone_c0);
  methods += new qt_gsi::GenericMethod ("polished", "@brief Method bool QChildEvent::polished()\n", true, &_init_f_polished_c0, &_call_f_polished_c0);
  methods += new qt_gsi::GenericMethod ("removed", "@brief Method bool QChildEvent::removed()\n", true, &_init_f_removed_c0, &_call_f_removed_c0);
  return methods;
}

gsi::Class<QEvent> &qtdecl_QEvent ();

gsi::Class<QChildEvent> decl_QChildEvent (qtdecl_QEvent (), "QtCore", "QChildEvent_Native",
  methods_QChildEvent (),
  "@hide\n@alias QChildEvent");

GSI_QTCORE_PUBLIC gsi::Class<QChildEvent> &qtdecl_QChildEvent () { return decl_QChildEvent; }

}


class QChildEvent_Adaptor : public QChildEvent, public qt_gsi::QtObjectBase
{
public:

  virtual ~QChildEvent_Adaptor();

  //  [adaptor ctor] QChildEvent::QChildEvent(QEvent::Type type, QObject *child)
  QChildEvent_Adaptor(QEvent::Type type, QObject *child) : QChildEvent(type, child)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor impl] QChildEvent *QChildEvent::clone()
  QChildEvent * cbs_clone_c0_0() const
  {
    return QChildEvent::clone();
  }

  virtual QChildEvent * clone() const
  {
    if (cb_clone_c0_0.can_issue()) {
      return cb_clone_c0_0.issue<QChildEvent_Adaptor, QChildEvent *>(&QChildEvent_Adaptor::cbs_clone_c0_0);
    } else {
      return QChildEvent::clone();
    }
  }

  //  [adaptor impl] void QChildEvent::setAccepted(bool accepted)
  void cbs_setAccepted_864_0(bool accepted)
  {
    QChildEvent::setAccepted(accepted);
  }

  virtual void setAccepted(bool accepted)
  {
    if (cb_setAccepted_864_0.can_issue()) {
      cb_setAccepted_864_0.issue<QChildEvent_Adaptor, bool>(&QChildEvent_Adaptor::cbs_setAccepted_864_0, accepted);
    } else {
      QChildEvent::setAccepted(accepted);
    }
  }

  gsi::Callback cb_clone_c0_0;
  gsi::Callback cb_setAccepted_864_0;
};

QChildEvent_Adaptor::~QChildEvent_Adaptor() { }

//  Constructor QChildEvent::QChildEvent(QEvent::Type type, QObject *child) (adaptor class)

static void _init_ctor_QChildEvent_Adaptor_2759 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("type");
  decl->add_arg<const qt_gsi::Converter<QEvent::Type>::target_type & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("child");
  decl->add_arg<QObject * > (argspec_1);
  decl->set_return_new<QChildEvent_Adaptor> ();
}

static void _call_ctor_QChildEvent_Adaptor_2759 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  const qt_gsi::Converter<QEvent::Type>::target_type & arg1 = gsi::arg_reader<const qt_gsi::Converter<QEvent::Type>::target_type & >() (args, heap);
  QObject *arg2 = gsi::arg_reader<QObject * >() (args, heap);
  ret.write<QChildEvent_Adaptor *> (new QChildEvent_Adaptor (qt_gsi::QtToCppAdaptor<QEvent::Type>(arg1).cref(), arg2));
}


// QChildEvent *QChildEvent::clone()

static void _init_cbs_clone_c0_0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<QChildEvent * > ();
}

static void _call_cbs_clone_c0_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  ret.write<QChildEvent * > ((QChildEvent *)((QChildEvent_Adaptor *)cls)->cbs_clone_c0_0 ());
}

static void _set_callback_cbs_clone_c0_0 (void *cls, const gsi::Callback &cb)
{
  ((QChildEvent_Adaptor *)cls)->cb_clone_c0_0 = cb;
}


// void QChildEvent::setAccepted(bool accepted)

static void _init_cbs_setAccepted_864_0 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("accepted");
  decl->add_arg<bool > (argspec_0);
  decl->set_return<void > ();
}

static void _call_cbs_setAccepted_864_0 (const qt_gsi::GenericMethod * /*decl*/, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  __SUPPRESS_UNUSED_WARNING(args);
  tl::Heap heap;
  bool arg1 = gsi::arg_reader<bool >() (args, heap);
  __SUPPRESS_UNUSED_WARNING(ret);
  ((QChildEvent_Adaptor *)cls)->cbs_setAccepted_864_0 (arg1);
}

static void _set_callback_cbs_setAccepted_864_0 (void *cls, const gsi::Callback &cb)
{
  ((QChildEvent_Adaptor *)cls)->cb_setAccepted_864_0 = cb;
}


namespace gsi
{

gsi::Class<QChildEvent> &qtdecl_QChildEvent ();

static gsi::Methods methods_QChildEvent_Adaptor () {
  gsi::Methods methods;
  methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QChildEvent::QChildEvent(QEvent::Type type, QObject *child)\nThis method creates an object of class QChildEvent.", &_init_ctor_QChildEvent_Adaptor_2759, &_call_ctor_QChildEvent_Adaptor_2759);
  methods += new qt_gsi::GenericMethod ("clone", "@brief Virtual method QChildEvent *QChildEvent::clone()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_clone_c0_0, &_call_cbs_clone_c0_0);
  methods += new qt_gsi::GenericMethod ("clone", "@hide", true, &_init_cbs_clone_c0_0, &_call_cbs_clone_c0_0, &_set_callback_cbs_clone_c0_0);
  methods += new qt_gsi::GenericMethod ("setAccepted", "@brief Virtual method void QChildEvent::setAccepted(bool accepted)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_setAccepted_864_0, &_call_cbs_setAccepted_864_0);
  methods += new qt_gsi::GenericMethod ("setAccepted", "@hide", false, &_init_cbs_setAccepted_864_0, &_call_cbs_setAccepted_864_0, &_set_callback_cbs_setAccepted_864_0);
  return methods;
}

gsi::Class<QChildEvent_Adaptor> decl_QChildEvent_Adaptor (qtdecl_QChildEvent (), "QtCore", "QChildEvent",
  methods_QChildEvent_Adaptor (),
  "@qt\n@brief Binding of QChildEvent");

}

