
/*

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

#include "gsiQtSql.h"
#include "gsiDeclQtTypeTraits.h"
#include "gsiDeclQSqlRelationalTableModel_EventAdaptor.h"
#include "gsiDeclQSqlRelationalTableModel_Enums.h"
#include <memory>

// -----------------------------------------------------------------------
// class QSqlRelationalTableModel

//  get static meta object

static void _init_smo (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return<const QMetaObject &> ();
}

static void _call_smo (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<const QMetaObject &> (QSqlRelationalTableModel::staticMetaObject);
}

static qt_gsi::GenericStaticMethod *_create_smo ()
{
  return new qt_gsi::GenericStaticMethod ("staticMetaObject", "@brief Obtains the static MetaObject for this class.", &_init_smo, &_call_smo);
}

//  Constructor QSqlRelationalTableModel::QSqlRelationalTableModel(QObject *parent, QSqlDatabase db)


static void _init_ctor_QSqlRelationalTableModel_2804 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("parent", true, "0");
  decl->add_arg<QObject * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("db", true, "QSqlDatabase()");
  decl->add_arg<QSqlDatabase > (argspec_1);
  decl->set_return_new<QSqlRelationalTableModel *> ();
}

static void _call_ctor_QSqlRelationalTableModel_2804 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  QObject *arg1 = args ? args.read<QObject * > () : (QObject *)(0);
  QSqlDatabase arg2 = args ? args.read<QSqlDatabase > () : (QSqlDatabase)(QSqlDatabase());
  ret.write<QSqlRelationalTableModel *> (new QSqlRelationalTableModel (arg1, arg2));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QSqlRelationalTableModel_2804 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QSqlRelationalTableModel::QSqlRelationalTableModel(QObject *parent, QSqlDatabase db)\nThis method creates an object of class QSqlRelationalTableModel.", &_init_ctor_QSqlRelationalTableModel_2804, &_call_ctor_QSqlRelationalTableModel_2804);
}

// void QSqlRelationalTableModel::clear()


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

static void _call_f_clear_0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ((QSqlRelationalTableModel *)cls)->clear ();
}

static qt_gsi::GenericMethod *_create_f_clear_0 ()
{
  return new qt_gsi::GenericMethod ("clear", "@brief Method void QSqlRelationalTableModel::clear()\nThis is a reimplementation of QSqlTableModel::clear", false, &_init_f_clear_0, &_call_f_clear_0);
}

// QVariant QSqlRelationalTableModel::data(const QModelIndex &item, int role)


static void _init_f_data_c3054 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("item");
  decl->add_arg<const QModelIndex & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("role", true, "Qt::DisplayRole");
  decl->add_arg<int > (argspec_1);
  decl->set_return<QVariant > ();
}

static void _call_f_data_c3054 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QModelIndex &arg1 = args.read<const QModelIndex & > ();
  int arg2 = args ? args.read<int > () : (int)(Qt::DisplayRole);
  ret.write<QVariant > ((QVariant)((QSqlRelationalTableModel *)cls)->data (arg1, arg2));
}

static qt_gsi::GenericMethod *_create_f_data_c3054 ()
{
  return new qt_gsi::GenericMethod ("data", "@brief Method QVariant QSqlRelationalTableModel::data(const QModelIndex &item, int role)\nThis is a reimplementation of QSqlTableModel::data", true, &_init_f_data_c3054, &_call_f_data_c3054);
}

// QSqlRelation QSqlRelationalTableModel::relation(int column)


static void _init_f_relation_c767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("column");
  decl->add_arg<int > (argspec_0);
  decl->set_return<QSqlRelation > ();
}

static void _call_f_relation_c767 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  ret.write<QSqlRelation > ((QSqlRelation)((QSqlRelationalTableModel *)cls)->relation (arg1));
}

static qt_gsi::GenericMethod *_create_f_relation_c767 ()
{
  return new qt_gsi::GenericMethod ("relation", "@brief Method QSqlRelation QSqlRelationalTableModel::relation(int column)\n", true, &_init_f_relation_c767, &_call_f_relation_c767);
}

// QSqlTableModel *QSqlRelationalTableModel::relationModel(int column)


static void _init_f_relationModel_c767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("column");
  decl->add_arg<int > (argspec_0);
  decl->set_return<QSqlTableModel * > ();
}

static void _call_f_relationModel_c767 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  ret.write<QSqlTableModel * > ((QSqlTableModel *)((QSqlRelationalTableModel *)cls)->relationModel (arg1));
}

static qt_gsi::GenericMethod *_create_f_relationModel_c767 ()
{
  return new qt_gsi::GenericMethod ("relationModel", "@brief Method QSqlTableModel *QSqlRelationalTableModel::relationModel(int column)\n", true, &_init_f_relationModel_c767, &_call_f_relationModel_c767);
}

// bool QSqlRelationalTableModel::removeColumns(int column, int count, const QModelIndex &parent)


static void _init_f_removeColumns_3713 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("column");
  decl->add_arg<int > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("count");
  decl->add_arg<int > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("parent", true, "QModelIndex()");
  decl->add_arg<const QModelIndex & > (argspec_2);
  decl->set_return<bool > ();
}

static void _call_f_removeColumns_3713 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  int arg2 = args.read<int > ();
  const QModelIndex &arg3 = args ? args.read<const QModelIndex & > () : (const QModelIndex &)(QModelIndex());
  ret.write<bool > ((bool)((QSqlRelationalTableModel *)cls)->removeColumns (arg1, arg2, arg3));
}

static qt_gsi::GenericMethod *_create_f_removeColumns_3713 ()
{
  return new qt_gsi::GenericMethod ("removeColumns", "@brief Method bool QSqlRelationalTableModel::removeColumns(int column, int count, const QModelIndex &parent)\nThis is a reimplementation of QSqlTableModel::removeColumns", false, &_init_f_removeColumns_3713, &_call_f_removeColumns_3713);
}

// void QSqlRelationalTableModel::revertRow(int row)


static void _init_f_revertRow_767 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("row");
  decl->add_arg<int > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_revertRow_767 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  ((QSqlRelationalTableModel *)cls)->revertRow (arg1);
}

static qt_gsi::GenericMethod *_create_f_revertRow_767 ()
{
  return new qt_gsi::GenericMethod ("revertRow", "@brief Method void QSqlRelationalTableModel::revertRow(int row)\nThis is a reimplementation of QSqlTableModel::revertRow", false, &_init_f_revertRow_767, &_call_f_revertRow_767);
}

// bool QSqlRelationalTableModel::select()


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

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

static qt_gsi::GenericMethod *_create_f_select_0 ()
{
  return new qt_gsi::GenericMethod ("select", "@brief Method bool QSqlRelationalTableModel::select()\nThis is a reimplementation of QSqlTableModel::select", false, &_init_f_select_0, &_call_f_select_0);
}

// bool QSqlRelationalTableModel::setData(const QModelIndex &item, const QVariant &value, int role)


static void _init_f_setData_5065 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("item");
  decl->add_arg<const QModelIndex & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("value");
  decl->add_arg<const QVariant & > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("role", true, "Qt::EditRole");
  decl->add_arg<int > (argspec_2);
  decl->set_return<bool > ();
}

static void _call_f_setData_5065 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QModelIndex &arg1 = args.read<const QModelIndex & > ();
  const QVariant &arg2 = args.read<const QVariant & > ();
  int arg3 = args ? args.read<int > () : (int)(Qt::EditRole);
  ret.write<bool > ((bool)((QSqlRelationalTableModel *)cls)->setData (arg1, arg2, arg3));
}

static qt_gsi::GenericMethod *_create_f_setData_5065 ()
{
  return new qt_gsi::GenericMethod ("setData", "@brief Method bool QSqlRelationalTableModel::setData(const QModelIndex &item, const QVariant &value, int role)\nThis is a reimplementation of QSqlTableModel::setData", false, &_init_f_setData_5065, &_call_f_setData_5065);
}

// void QSqlRelationalTableModel::setRelation(int column, const QSqlRelation &relation)


static void _init_f_setRelation_3187 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("column");
  decl->add_arg<int > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("relation");
  decl->add_arg<const QSqlRelation & > (argspec_1);
  decl->set_return<void > ();
}

static void _call_f_setRelation_3187 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  const QSqlRelation &arg2 = args.read<const QSqlRelation & > ();
  ((QSqlRelationalTableModel *)cls)->setRelation (arg1, arg2);
}

static qt_gsi::GenericMethod *_create_f_setRelation_3187 ()
{
  return new qt_gsi::GenericMethod ("setRelation", "@brief Method void QSqlRelationalTableModel::setRelation(int column, const QSqlRelation &relation)\n", false, &_init_f_setRelation_3187, &_call_f_setRelation_3187);
}

// void QSqlRelationalTableModel::setTable(const QString &tableName)


static void _init_f_setTable_2025 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("tableName");
  decl->add_arg<const QString & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setTable_2025 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QString &arg1 = args.read<const QString & > ();
  ((QSqlRelationalTableModel *)cls)->setTable (arg1);
}

static qt_gsi::GenericMethod *_create_f_setTable_2025 ()
{
  return new qt_gsi::GenericMethod ("setTable", "@brief Method void QSqlRelationalTableModel::setTable(const QString &tableName)\nThis is a reimplementation of QSqlTableModel::setTable", false, &_init_f_setTable_2025, &_call_f_setTable_2025);
}

// static QString QSqlRelationalTableModel::tr(const char *s, const char *c)


static void _init_f_tr_3354 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("s");
  decl->add_arg<const char * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("c", true, "0");
  decl->add_arg<const char * > (argspec_1);
  decl->set_return<QString > ();
}

static void _call_f_tr_3354 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const char *arg1 = args.read<const char * > ();
  const char *arg2 = args ? args.read<const char * > () : (const char *)(0);
  ret.write<QString > ((QString)QSqlRelationalTableModel::tr (arg1, arg2));
}

static qt_gsi::GenericStaticMethod *_create_f_tr_3354 ()
{
  return new qt_gsi::GenericStaticMethod ("tr", "@brief Static method QString QSqlRelationalTableModel::tr(const char *s, const char *c)\nThis method is static and can be called without an instance.", &_init_f_tr_3354, &_call_f_tr_3354);
}

// static QString QSqlRelationalTableModel::tr(const char *s, const char *c, int n)


static void _init_f_tr_4013 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("s");
  decl->add_arg<const char * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("c");
  decl->add_arg<const char * > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("n");
  decl->add_arg<int > (argspec_2);
  decl->set_return<QString > ();
}

static void _call_f_tr_4013 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const char *arg1 = args.read<const char * > ();
  const char *arg2 = args.read<const char * > ();
  int arg3 = args.read<int > ();
  ret.write<QString > ((QString)QSqlRelationalTableModel::tr (arg1, arg2, arg3));
}

static qt_gsi::GenericStaticMethod *_create_f_tr_4013 ()
{
  return new qt_gsi::GenericStaticMethod ("tr", "@brief Static method QString QSqlRelationalTableModel::tr(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_tr_4013, &_call_f_tr_4013);
}

// static QString QSqlRelationalTableModel::trUtf8(const char *s, const char *c)


static void _init_f_trUtf8_3354 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("s");
  decl->add_arg<const char * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("c", true, "0");
  decl->add_arg<const char * > (argspec_1);
  decl->set_return<QString > ();
}

static void _call_f_trUtf8_3354 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const char *arg1 = args.read<const char * > ();
  const char *arg2 = args ? args.read<const char * > () : (const char *)(0);
  ret.write<QString > ((QString)QSqlRelationalTableModel::trUtf8 (arg1, arg2));
}

static qt_gsi::GenericStaticMethod *_create_f_trUtf8_3354 ()
{
  return new qt_gsi::GenericStaticMethod ("trUtf8", "@brief Static method QString QSqlRelationalTableModel::trUtf8(const char *s, const char *c)\nThis method is static and can be called without an instance.", &_init_f_trUtf8_3354, &_call_f_trUtf8_3354);
}

// static QString QSqlRelationalTableModel::trUtf8(const char *s, const char *c, int n)


static void _init_f_trUtf8_4013 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("s");
  decl->add_arg<const char * > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("c");
  decl->add_arg<const char * > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("n");
  decl->add_arg<int > (argspec_2);
  decl->set_return<QString > ();
}

static void _call_f_trUtf8_4013 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const char *arg1 = args.read<const char * > ();
  const char *arg2 = args.read<const char * > ();
  int arg3 = args.read<int > ();
  ret.write<QString > ((QString)QSqlRelationalTableModel::trUtf8 (arg1, arg2, arg3));
}

static qt_gsi::GenericStaticMethod *_create_f_trUtf8_4013 ()
{
  return new qt_gsi::GenericStaticMethod ("trUtf8", "@brief Static method QString QSqlRelationalTableModel::trUtf8(const char *s, const char *c, int n)\nThis method is static and can be called without an instance.", &_init_f_trUtf8_4013, &_call_f_trUtf8_4013);
}

static qt_gsi::QObjectConnector<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor> ea_QSqlRelationalTableModel;


namespace gsi
{
extern gsi::Class<QSqlTableModel> decl_QSqlTableModel;

gsi::Class<QSqlRelationalTableModel> decl_QSqlRelationalTableModel (ea_QSqlRelationalTableModel, decl_QSqlTableModel, "QSqlRelationalTableModel",
  gsi::Methods(_create_ctor_QSqlRelationalTableModel_2804 ()) +
  gsi::Methods(_create_smo ()) +
  gsi::Methods(_create_f_clear_0 ()) +
  gsi::Methods(_create_f_data_c3054 ()) +
  gsi::Methods(_create_f_relation_c767 ()) +
  gsi::Methods(_create_f_relationModel_c767 ()) +
  gsi::Methods(_create_f_removeColumns_3713 ()) +
  gsi::Methods(_create_f_revertRow_767 ()) +
  gsi::Methods(_create_f_select_0 ()) +
  gsi::Methods(_create_f_setData_5065 ()) +
  gsi::Methods(_create_f_setRelation_3187 ()) +
  gsi::Methods(_create_f_setTable_2025 ()) +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, int> ("beforeDelete", &QSqlRelationalTableModel_EventAdaptor::beforeDelete_e_767, gsi::arg("row"), "@brief Signal declaration for QSqlRelationalTableModel::beforeDelete(int row)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, QSqlRecord &> ("beforeInsert", &QSqlRelationalTableModel_EventAdaptor::beforeInsert_e_1610, gsi::arg("record"), "@brief Signal declaration for QSqlRelationalTableModel::beforeInsert(QSqlRecord &record)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, int, QSqlRecord &> ("beforeUpdate", &QSqlRelationalTableModel_EventAdaptor::beforeUpdate_e_2269, gsi::arg("row"), gsi::arg("record"), "@brief Signal declaration for QSqlRelationalTableModel::beforeUpdate(int row, QSqlRecord &record)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, const QModelIndex &, const QModelIndex &> ("dataChanged", &QSqlRelationalTableModel_EventAdaptor::dataChanged_e_4682, gsi::arg("topLeft"), gsi::arg("bottomRight"), "@brief Signal declaration for QSqlRelationalTableModel::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, QObject *> ("destroyed", &QSqlRelationalTableModel_EventAdaptor::destroyed_e_1302, gsi::arg("arg1"), "@brief Signal declaration for QSqlRelationalTableModel::destroyed(QObject *)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, const qt_gsi::Converter<Qt::Orientation>::target_type &, int, int> ("headerDataChanged", &QSqlRelationalTableModel_EventAdaptor::headerDataChanged_e_3231, gsi::arg("orientation"), gsi::arg("first"), gsi::arg("last"), "@brief Signal declaration for QSqlRelationalTableModel::headerDataChanged(Qt::Orientation orientation, int first, int last)\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor> ("layoutAboutToBeChanged", &QSqlRelationalTableModel_EventAdaptor::layoutAboutToBeChanged_e_0, "@brief Signal declaration for QSqlRelationalTableModel::layoutAboutToBeChanged()\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor> ("layoutChanged", &QSqlRelationalTableModel_EventAdaptor::layoutChanged_e_0, "@brief Signal declaration for QSqlRelationalTableModel::layoutChanged()\nYou can bind a procedure to this signal.") +
  qt_gsi::qt_signal<QSqlRelationalTableModel, QSqlRelationalTableModel_EventAdaptor, int, QSqlRecord &> ("primeInsert", &QSqlRelationalTableModel_EventAdaptor::primeInsert_e_2269, gsi::arg("row"), gsi::arg("record"), "@brief Signal declaration for QSqlRelationalTableModel::primeInsert(int row, QSqlRecord &record)\nYou can bind a procedure to this signal.") +
  gsi::Methods(_create_f_tr_3354 ()) +
  gsi::Methods(_create_f_tr_4013 ()) +
  gsi::Methods(_create_f_trUtf8_3354 ()) +
  gsi::Methods(_create_f_trUtf8_4013 ()),
  "@qt\n@brief Binding of QSqlRelationalTableModel");

}

