
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2016 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 gsiDeclQFocusEvent.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include "gsiQtGui.h"
#include "gsiDeclQtTypeTraits.h"
#include "gsiDeclQFocusEvent_Enums.h"
#include <memory>

// -----------------------------------------------------------------------
// class QFocusEvent

// bool QFocusEvent::gotFocus()


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

static void _call_f_gotFocus_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<bool > ((bool)((QFocusEvent *)cls)->gotFocus ());
}

static qt_gsi::GenericMethod *_create_f_gotFocus_c0 ()
{
  return new qt_gsi::GenericMethod ("gotFocus", "@brief Method bool QFocusEvent::gotFocus()\n", true, &_init_f_gotFocus_c0, &_call_f_gotFocus_c0);
}

// bool QFocusEvent::lostFocus()


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

static void _call_f_lostFocus_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<bool > ((bool)((QFocusEvent *)cls)->lostFocus ());
}

static qt_gsi::GenericMethod *_create_f_lostFocus_c0 ()
{
  return new qt_gsi::GenericMethod ("lostFocus", "@brief Method bool QFocusEvent::lostFocus()\n", true, &_init_f_lostFocus_c0, &_call_f_lostFocus_c0);
}

// Qt::FocusReason QFocusEvent::reason()


static void _init_f_reason_0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<Qt::FocusReason>::target_type > ();
}

static void _call_f_reason_0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<Qt::FocusReason>::target_type > ((qt_gsi::Converter<Qt::FocusReason>::target_type)qt_gsi::CppToQtAdaptor<Qt::FocusReason>(((QFocusEvent *)cls)->reason ()));
}

static qt_gsi::GenericMethod *_create_f_reason_0 ()
{
  return new qt_gsi::GenericMethod ("reason", "@brief Method Qt::FocusReason QFocusEvent::reason()\n", false, &_init_f_reason_0, &_call_f_reason_0);
}

// Qt::FocusReason QFocusEvent::reason()


static void _init_f_reason_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<Qt::FocusReason>::target_type > ();
}

static void _call_f_reason_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<Qt::FocusReason>::target_type > ((qt_gsi::Converter<Qt::FocusReason>::target_type)qt_gsi::CppToQtAdaptor<Qt::FocusReason>(((QFocusEvent *)cls)->reason ()));
}

static qt_gsi::GenericMethod *_create_f_reason_c0 ()
{
  return new qt_gsi::GenericMethod ("reason", "@brief Method Qt::FocusReason QFocusEvent::reason()\n", true, &_init_f_reason_c0, &_call_f_reason_c0);
}

namespace gsi
{
extern gsi::Class<QEvent> decl_QEvent;

gsi::Class<QFocusEvent> decl_QFocusEvent (decl_QEvent, "QFocusEvent_Native",
  gsi::Methods(_create_f_gotFocus_c0 ()) +
  gsi::Methods(_create_f_lostFocus_c0 ()) +
  gsi::Methods(_create_f_reason_0 ()) +
  gsi::Methods(_create_f_reason_c0 ()),
  "@hide\n@alias QFocusEvent");
}


class QFocusEvent_Adaptor : public QFocusEvent, public qt_gsi::QtObjectBase
{
public:

  virtual ~QFocusEvent_Adaptor();

  //  [adaptor ctor] QFocusEvent::QFocusEvent(QEvent::Type type, Qt::FocusReason reason)
  QFocusEvent_Adaptor(QEvent::Type type) : QFocusEvent(type)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QFocusEvent::QFocusEvent(QEvent::Type type, Qt::FocusReason reason)
  QFocusEvent_Adaptor(QEvent::Type type, Qt::FocusReason reason) : QFocusEvent(type, reason)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  
};

QFocusEvent_Adaptor::~QFocusEvent_Adaptor() { }

//  Constructor QFocusEvent::QFocusEvent(QEvent::Type type, Qt::FocusReason reason) (adaptor class)

static void _init_ctor_QFocusEvent_Adaptor_3334 (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 ("reason", true, "Qt::OtherFocusReason");
  decl->add_arg<const qt_gsi::Converter<Qt::FocusReason>::target_type & > (argspec_1);
  decl->set_return_new<QFocusEvent_Adaptor *> ();
}

static void _call_ctor_QFocusEvent_Adaptor_3334 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QEvent::Type>::target_type & arg1 = args.read<const qt_gsi::Converter<QEvent::Type>::target_type & > ();
  tl::Heap heap;
  const qt_gsi::Converter<Qt::FocusReason>::target_type & arg2 = args ? args.read<const qt_gsi::Converter<Qt::FocusReason>::target_type & > () : (const qt_gsi::Converter<Qt::FocusReason>::target_type &)(qt_gsi::CppToQtReadAdaptor<Qt::FocusReason>(heap, Qt::OtherFocusReason));
  ret.write<QFocusEvent_Adaptor *> (new QFocusEvent_Adaptor (qt_gsi::QtToCppAdaptor<QEvent::Type>(arg1).cref(), qt_gsi::QtToCppAdaptor<Qt::FocusReason>(arg2).cref()));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QFocusEvent_Adaptor_3334 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QFocusEvent::QFocusEvent(QEvent::Type type, Qt::FocusReason reason)\nThis method creates an object of class QFocusEvent.", &_init_ctor_QFocusEvent_Adaptor_3334, &_call_ctor_QFocusEvent_Adaptor_3334);
}

namespace gsi
{

extern gsi::Class<QFocusEvent> decl_QFocusEvent;

gsi::Class<QFocusEvent_Adaptor> decl_QFocusEvent_Adaptor (decl_QFocusEvent, "QFocusEvent",
  gsi::Methods(_create_ctor_QFocusEvent_Adaptor_3334 ()),
  "@qt\n@brief Binding of QFocusEvent");

}

