
/*

  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 gsiDeclQKeyEvent.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

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

// -----------------------------------------------------------------------
// class QKeyEvent

// int QKeyEvent::count()


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

static void _call_f_count_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<int > ((int)((QKeyEvent *)cls)->count ());
}

static qt_gsi::GenericMethod *_create_f_count_c0 ()
{
  return new qt_gsi::GenericMethod ("count", "@brief Method int QKeyEvent::count()\n", true, &_init_f_count_c0, &_call_f_count_c0);
}

// bool QKeyEvent::hasExtendedInfo()


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

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

static qt_gsi::GenericMethod *_create_f_hasExtendedInfo_c0 ()
{
  return new qt_gsi::GenericMethod ("hasExtendedInfo", "@brief Method bool QKeyEvent::hasExtendedInfo()\n", true, &_init_f_hasExtendedInfo_c0, &_call_f_hasExtendedInfo_c0);
}

// bool QKeyEvent::isAutoRepeat()


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

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

static qt_gsi::GenericMethod *_create_f_isAutoRepeat_c0 ()
{
  return new qt_gsi::GenericMethod ("isAutoRepeat?", "@brief Method bool QKeyEvent::isAutoRepeat()\n", true, &_init_f_isAutoRepeat_c0, &_call_f_isAutoRepeat_c0);
}

// int QKeyEvent::key()


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

static void _call_f_key_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<int > ((int)((QKeyEvent *)cls)->key ());
}

static qt_gsi::GenericMethod *_create_f_key_c0 ()
{
  return new qt_gsi::GenericMethod ("key", "@brief Method int QKeyEvent::key()\n", true, &_init_f_key_c0, &_call_f_key_c0);
}

// bool QKeyEvent::matches(QKeySequence::StandardKey key)


static void _init_f_matches_c2869 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("key");
  decl->add_arg<const qt_gsi::Converter<QKeySequence::StandardKey>::target_type & > (argspec_0);
  decl->set_return<bool > ();
}

static void _call_f_matches_c2869 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QKeySequence::StandardKey>::target_type & arg1 = args.read<const qt_gsi::Converter<QKeySequence::StandardKey>::target_type & > ();
  ret.write<bool > ((bool)((QKeyEvent *)cls)->matches (qt_gsi::QtToCppAdaptor<QKeySequence::StandardKey>(arg1).cref()));
}

static qt_gsi::GenericMethod *_create_f_matches_c2869 ()
{
  return new qt_gsi::GenericMethod ("matches", "@brief Method bool QKeyEvent::matches(QKeySequence::StandardKey key)\n", true, &_init_f_matches_c2869, &_call_f_matches_c2869);
}

// QFlags<Qt::KeyboardModifier> QKeyEvent::modifiers()


static void _init_f_modifiers_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type > ();
}

static void _call_f_modifiers_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type > ((qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type)qt_gsi::CppToQtAdaptor<QFlags<Qt::KeyboardModifier> >(((QKeyEvent *)cls)->modifiers ()));
}

static qt_gsi::GenericMethod *_create_f_modifiers_c0 ()
{
  return new qt_gsi::GenericMethod (":modifiers", "@brief Method QFlags<Qt::KeyboardModifier> QKeyEvent::modifiers()\n", true, &_init_f_modifiers_c0, &_call_f_modifiers_c0);
}

// quint32 QKeyEvent::nativeModifiers()


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

static void _call_f_nativeModifiers_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<quint32 > ((quint32)((QKeyEvent *)cls)->nativeModifiers ());
}

static qt_gsi::GenericMethod *_create_f_nativeModifiers_c0 ()
{
  return new qt_gsi::GenericMethod ("nativeModifiers", "@brief Method quint32 QKeyEvent::nativeModifiers()\n", true, &_init_f_nativeModifiers_c0, &_call_f_nativeModifiers_c0);
}

// quint32 QKeyEvent::nativeScanCode()


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

static void _call_f_nativeScanCode_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<quint32 > ((quint32)((QKeyEvent *)cls)->nativeScanCode ());
}

static qt_gsi::GenericMethod *_create_f_nativeScanCode_c0 ()
{
  return new qt_gsi::GenericMethod ("nativeScanCode", "@brief Method quint32 QKeyEvent::nativeScanCode()\n", true, &_init_f_nativeScanCode_c0, &_call_f_nativeScanCode_c0);
}

// quint32 QKeyEvent::nativeVirtualKey()


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

static void _call_f_nativeVirtualKey_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<quint32 > ((quint32)((QKeyEvent *)cls)->nativeVirtualKey ());
}

static qt_gsi::GenericMethod *_create_f_nativeVirtualKey_c0 ()
{
  return new qt_gsi::GenericMethod ("nativeVirtualKey", "@brief Method quint32 QKeyEvent::nativeVirtualKey()\n", true, &_init_f_nativeVirtualKey_c0, &_call_f_nativeVirtualKey_c0);
}

// QString QKeyEvent::text()


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

static void _call_f_text_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<QString > ((QString)((QKeyEvent *)cls)->text ());
}

static qt_gsi::GenericMethod *_create_f_text_c0 ()
{
  return new qt_gsi::GenericMethod ("text", "@brief Method QString QKeyEvent::text()\n", true, &_init_f_text_c0, &_call_f_text_c0);
}

// static QKeyEvent *QKeyEvent::createExtendedKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorep, unsigned short int count)


static void _init_f_createExtendedKeyEvent_13204 (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 ("key");
  decl->add_arg<int > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("modifiers");
  decl->add_arg<const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & > (argspec_2);
  static gsi::ArgSpecBase argspec_3 ("nativeScanCode");
  decl->add_arg<quint32 > (argspec_3);
  static gsi::ArgSpecBase argspec_4 ("nativeVirtualKey");
  decl->add_arg<quint32 > (argspec_4);
  static gsi::ArgSpecBase argspec_5 ("nativeModifiers");
  decl->add_arg<quint32 > (argspec_5);
  static gsi::ArgSpecBase argspec_6 ("text", true, "QString()");
  decl->add_arg<const QString & > (argspec_6);
  static gsi::ArgSpecBase argspec_7 ("autorep", true, "false");
  decl->add_arg<bool > (argspec_7);
  static gsi::ArgSpecBase argspec_8 ("count", true, "1");
  decl->add_arg<unsigned short int > (argspec_8);
  decl->set_return<QKeyEvent * > ();
}

static void _call_f_createExtendedKeyEvent_13204 (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 & > ();
  int arg2 = args.read<int > ();
  const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & arg3 = args.read<const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & > ();
  quint32 arg4 = args.read<quint32 > ();
  quint32 arg5 = args.read<quint32 > ();
  quint32 arg6 = args.read<quint32 > ();
  const QString &arg7 = args ? args.read<const QString & > () : (const QString &)(QString());
  bool arg8 = args ? args.read<bool > () : (bool)(false);
  unsigned short int arg9 = args ? args.read<unsigned short int > () : (unsigned short int)(1);
  ret.write<QKeyEvent * > ((QKeyEvent *)QKeyEvent::createExtendedKeyEvent (qt_gsi::QtToCppAdaptor<QEvent::Type>(arg1).cref(), arg2, qt_gsi::QtToCppAdaptor<QFlags<Qt::KeyboardModifier> >(arg3).cref(), arg4, arg5, arg6, arg7, arg8, arg9));
}

static qt_gsi::GenericStaticMethod *_create_f_createExtendedKeyEvent_13204 ()
{
  return new qt_gsi::GenericStaticMethod ("createExtendedKeyEvent", "@brief Static method QKeyEvent *QKeyEvent::createExtendedKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorep, unsigned short int count)\nThis method is static and can be called without an instance.", &_init_f_createExtendedKeyEvent_13204, &_call_f_createExtendedKeyEvent_13204);
}

namespace gsi
{
extern gsi::Class<QInputEvent> decl_QInputEvent;

gsi::Class<QKeyEvent> decl_QKeyEvent (decl_QInputEvent, "QKeyEvent_Native",
  gsi::Methods(_create_f_count_c0 ()) +
  gsi::Methods(_create_f_hasExtendedInfo_c0 ()) +
  gsi::Methods(_create_f_isAutoRepeat_c0 ()) +
  gsi::Methods(_create_f_key_c0 ()) +
  gsi::Methods(_create_f_matches_c2869 ()) +
  gsi::Methods(_create_f_modifiers_c0 ()) +
  gsi::Methods(_create_f_nativeModifiers_c0 ()) +
  gsi::Methods(_create_f_nativeScanCode_c0 ()) +
  gsi::Methods(_create_f_nativeVirtualKey_c0 ()) +
  gsi::Methods(_create_f_text_c0 ()) +
  gsi::Methods(_create_f_createExtendedKeyEvent_13204 ()),
  "@hide\n@alias QKeyEvent");
}


class QKeyEvent_Adaptor : public QKeyEvent, public qt_gsi::QtObjectBase
{
public:

  virtual ~QKeyEvent_Adaptor();

  //  [adaptor ctor] QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)
  QKeyEvent_Adaptor(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers) : QKeyEvent(type, key, modifiers)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)
  QKeyEvent_Adaptor(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text) : QKeyEvent(type, key, modifiers, text)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)
  QKeyEvent_Adaptor(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep) : QKeyEvent(type, key, modifiers, text, autorep)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)
  QKeyEvent_Adaptor(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count) : QKeyEvent(type, key, modifiers, text, autorep, count)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  
};

QKeyEvent_Adaptor::~QKeyEvent_Adaptor() { }

//  Constructor QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count) (adaptor class)

static void _init_ctor_QKeyEvent_Adaptor_10234 (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 ("key");
  decl->add_arg<int > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("modifiers");
  decl->add_arg<const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & > (argspec_2);
  static gsi::ArgSpecBase argspec_3 ("text", true, "QString()");
  decl->add_arg<const QString & > (argspec_3);
  static gsi::ArgSpecBase argspec_4 ("autorep", true, "false");
  decl->add_arg<bool > (argspec_4);
  static gsi::ArgSpecBase argspec_5 ("count", true, "1");
  decl->add_arg<unsigned short int > (argspec_5);
  decl->set_return_new<QKeyEvent_Adaptor *> ();
}

static void _call_ctor_QKeyEvent_Adaptor_10234 (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 & > ();
  int arg2 = args.read<int > ();
  const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & arg3 = args.read<const qt_gsi::Converter<QFlags<Qt::KeyboardModifier> >::target_type & > ();
  const QString &arg4 = args ? args.read<const QString & > () : (const QString &)(QString());
  bool arg5 = args ? args.read<bool > () : (bool)(false);
  unsigned short int arg6 = args ? args.read<unsigned short int > () : (unsigned short int)(1);
  ret.write<QKeyEvent_Adaptor *> (new QKeyEvent_Adaptor (qt_gsi::QtToCppAdaptor<QEvent::Type>(arg1).cref(), arg2, qt_gsi::QtToCppAdaptor<QFlags<Qt::KeyboardModifier> >(arg3).cref(), arg4, arg5, arg6));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QKeyEvent_Adaptor_10234 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QKeyEvent::QKeyEvent(QEvent::Type type, int key, QFlags<Qt::KeyboardModifier> modifiers, const QString &text, bool autorep, unsigned short int count)\nThis method creates an object of class QKeyEvent.", &_init_ctor_QKeyEvent_Adaptor_10234, &_call_ctor_QKeyEvent_Adaptor_10234);
}

namespace gsi
{

extern gsi::Class<QKeyEvent> decl_QKeyEvent;

gsi::Class<QKeyEvent_Adaptor> decl_QKeyEvent_Adaptor (decl_QKeyEvent, "QKeyEvent",
  gsi::Methods(_create_ctor_QKeyEvent_Adaptor_10234 ()),
  "@qt\n@brief Binding of QKeyEvent");

}

