
/*

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

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

// -----------------------------------------------------------------------
// class QBitmap

// void QBitmap::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) 
{
  ((QBitmap *)cls)->clear ();
}

static qt_gsi::GenericMethod *_create_f_clear_0 ()
{
  return new qt_gsi::GenericMethod ("clear", "@brief Method void QBitmap::clear()\n", false, &_init_f_clear_0, &_call_f_clear_0);
}

// QBitmap &QBitmap::operator=(const QPixmap &)


static void _init_f_operator_eq__2017 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QPixmap & > (argspec_0);
  decl->set_return<QBitmap & > ();
}

static void _call_f_operator_eq__2017 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QPixmap &arg1 = args.read<const QPixmap & > ();
  ret.write<QBitmap & > ((QBitmap &)((QBitmap *)cls)->operator= (arg1));
}

static qt_gsi::GenericMethod *_create_f_operator_eq__2017 ()
{
  return new qt_gsi::GenericMethod ("assign", "@brief Method QBitmap &QBitmap::operator=(const QPixmap &)\n", false, &_init_f_operator_eq__2017, &_call_f_operator_eq__2017);
}

// QBitmap QBitmap::transformed(const QMatrix &)


static void _init_f_transformed_c2023 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QMatrix & > (argspec_0);
  decl->set_return<QBitmap > ();
}

static void _call_f_transformed_c2023 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QMatrix &arg1 = args.read<const QMatrix & > ();
  ret.write<QBitmap > ((QBitmap)((QBitmap *)cls)->transformed (arg1));
}

static qt_gsi::GenericMethod *_create_f_transformed_c2023 ()
{
  return new qt_gsi::GenericMethod ("transformed", "@brief Method QBitmap QBitmap::transformed(const QMatrix &)\n", true, &_init_f_transformed_c2023, &_call_f_transformed_c2023);
}

// QBitmap QBitmap::transformed(const QTransform &matrix)


static void _init_f_transformed_c2350 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("matrix");
  decl->add_arg<const QTransform & > (argspec_0);
  decl->set_return<QBitmap > ();
}

static void _call_f_transformed_c2350 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QTransform &arg1 = args.read<const QTransform & > ();
  ret.write<QBitmap > ((QBitmap)((QBitmap *)cls)->transformed (arg1));
}

static qt_gsi::GenericMethod *_create_f_transformed_c2350 ()
{
  return new qt_gsi::GenericMethod ("transformed", "@brief Method QBitmap QBitmap::transformed(const QTransform &matrix)\n", true, &_init_f_transformed_c2350, &_call_f_transformed_c2350);
}

// static QBitmap QBitmap::fromData(const QSize &size, const unsigned char *bits, QImage::Format monoFormat)


static void _init_f_fromData_6058 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("size");
  decl->add_arg<const QSize & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("bits");
  decl->add_arg<const unsigned char * > (argspec_1);
  static gsi::ArgSpecBase argspec_2 ("monoFormat", true, "QImage::Format_MonoLSB");
  decl->add_arg<const qt_gsi::Converter<QImage::Format>::target_type & > (argspec_2);
  decl->set_return<QBitmap > ();
}

static void _call_f_fromData_6058 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QSize &arg1 = args.read<const QSize & > ();
  const unsigned char *arg2 = args.read<const unsigned char * > ();
  tl::Heap heap;
  const qt_gsi::Converter<QImage::Format>::target_type & arg3 = args ? args.read<const qt_gsi::Converter<QImage::Format>::target_type & > () : (const qt_gsi::Converter<QImage::Format>::target_type &)(qt_gsi::CppToQtReadAdaptor<QImage::Format>(heap, QImage::Format_MonoLSB));
  ret.write<QBitmap > ((QBitmap)QBitmap::fromData (arg1, arg2, qt_gsi::QtToCppAdaptor<QImage::Format>(arg3).cref()));
}

static qt_gsi::GenericStaticMethod *_create_f_fromData_6058 ()
{
  return new qt_gsi::GenericStaticMethod ("fromData", "@brief Static method QBitmap QBitmap::fromData(const QSize &size, const unsigned char *bits, QImage::Format monoFormat)\nThis method is static and can be called without an instance.", &_init_f_fromData_6058, &_call_f_fromData_6058);
}

// static QBitmap QBitmap::fromImage(const QImage &image, QFlags<Qt::ImageConversionFlag> flags)


static void _init_f_fromImage_5137 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("image");
  decl->add_arg<const QImage & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("flags", true, "Qt::AutoColor");
  decl->add_arg<const qt_gsi::Converter<QFlags<Qt::ImageConversionFlag> >::target_type & > (argspec_1);
  decl->set_return<QBitmap > ();
}

static void _call_f_fromImage_5137 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QImage &arg1 = args.read<const QImage & > ();
  tl::Heap heap;
  const qt_gsi::Converter<QFlags<Qt::ImageConversionFlag> >::target_type & arg2 = args ? args.read<const qt_gsi::Converter<QFlags<Qt::ImageConversionFlag> >::target_type & > () : (const qt_gsi::Converter<QFlags<Qt::ImageConversionFlag> >::target_type &)(qt_gsi::CppToQtReadAdaptor<QFlags<Qt::ImageConversionFlag> >(heap, Qt::AutoColor));
  ret.write<QBitmap > ((QBitmap)QBitmap::fromImage (arg1, qt_gsi::QtToCppAdaptor<QFlags<Qt::ImageConversionFlag> >(arg2).cref()));
}

static qt_gsi::GenericStaticMethod *_create_f_fromImage_5137 ()
{
  return new qt_gsi::GenericStaticMethod ("fromImage", "@brief Static method QBitmap QBitmap::fromImage(const QImage &image, QFlags<Qt::ImageConversionFlag> flags)\nThis method is static and can be called without an instance.", &_init_f_fromImage_5137, &_call_f_fromImage_5137);
}

namespace gsi
{
extern gsi::Class<QPixmap> decl_QPixmap;

gsi::Class<QBitmap> decl_QBitmap (decl_QPixmap, "QBitmap_Native",
  gsi::Methods(_create_f_clear_0 ()) +
  gsi::Methods(_create_f_operator_eq__2017 ()) +
  gsi::Methods(_create_f_transformed_c2023 ()) +
  gsi::Methods(_create_f_transformed_c2350 ()) +
  gsi::Methods(_create_f_fromData_6058 ()) +
  gsi::Methods(_create_f_fromImage_5137 ()),
  "@hide\n@alias QBitmap");
}


class QBitmap_Adaptor : public QBitmap, public qt_gsi::QtObjectBase
{
public:

  virtual ~QBitmap_Adaptor();

  //  [adaptor ctor] QBitmap::QBitmap()
  QBitmap_Adaptor() : QBitmap()
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QBitmap::QBitmap(const QPixmap &)
  QBitmap_Adaptor(const QPixmap &arg1) : QBitmap(arg1)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QBitmap::QBitmap(int w, int h)
  QBitmap_Adaptor(int w, int h) : QBitmap(w, h)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QBitmap::QBitmap(const QSize &)
  QBitmap_Adaptor(const QSize &arg1) : QBitmap(arg1)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QBitmap::QBitmap(const QString &fileName, const char *format)
  QBitmap_Adaptor(const QString &fileName) : QBitmap(fileName)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor ctor] QBitmap::QBitmap(const QString &fileName, const char *format)
  QBitmap_Adaptor(const QString &fileName, const char *format) : QBitmap(fileName, format)
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor impl] QPaintEngine *QBitmap::paintEngine()
  QPaintEngine * cbs_paintEngine_c0_0() const
  {
    return QBitmap::paintEngine();
  }

  virtual QPaintEngine * paintEngine() const
  {
    if (cb_paintEngine_c0_0.can_issue()) {
      return cb_paintEngine_c0_0.issue<QBitmap_Adaptor, QPaintEngine *>(&QBitmap_Adaptor::cbs_paintEngine_c0_0);
    } else {
      return QBitmap::paintEngine();
    }
  }

  //  [adaptor impl] int QBitmap::metric(QPaintDevice::PaintDeviceMetric)
  int cbs_metric_c3445_0(const qt_gsi::Converter<QPaintDevice::PaintDeviceMetric>::target_type & arg1) const
  {
    return QBitmap::metric(qt_gsi::QtToCppAdaptor<QPaintDevice::PaintDeviceMetric>(arg1).cref());
  }

  virtual int metric(QPaintDevice::PaintDeviceMetric arg1) const
  {
    if (cb_metric_c3445_0.can_issue()) {
      return cb_metric_c3445_0.issue<QBitmap_Adaptor, int, const qt_gsi::Converter<QPaintDevice::PaintDeviceMetric>::target_type &>(&QBitmap_Adaptor::cbs_metric_c3445_0, qt_gsi::CppToQtAdaptor<QPaintDevice::PaintDeviceMetric>(arg1));
    } else {
      return QBitmap::metric(arg1);
    }
  }

  gsi::Callback cb_paintEngine_c0_0;
  gsi::Callback cb_metric_c3445_0;
};

QBitmap_Adaptor::~QBitmap_Adaptor() { }

//  Constructor QBitmap::QBitmap() (adaptor class)

static void _init_ctor_QBitmap_Adaptor_0 (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return_new<QBitmap_Adaptor *> ();
}

static void _call_ctor_QBitmap_Adaptor_0 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<QBitmap_Adaptor *> (new QBitmap_Adaptor ());
}

static qt_gsi::GenericStaticMethod *_create_ctor_QBitmap_Adaptor_0 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QBitmap::QBitmap()\nThis method creates an object of class QBitmap.", &_init_ctor_QBitmap_Adaptor_0, &_call_ctor_QBitmap_Adaptor_0);
}

//  Constructor QBitmap::QBitmap(const QPixmap &) (adaptor class)

static void _init_ctor_QBitmap_Adaptor_2017 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QPixmap & > (argspec_0);
  decl->set_return_new<QBitmap_Adaptor *> ();
}

static void _call_ctor_QBitmap_Adaptor_2017 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QPixmap &arg1 = args.read<const QPixmap & > ();
  ret.write<QBitmap_Adaptor *> (new QBitmap_Adaptor (arg1));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QBitmap_Adaptor_2017 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QBitmap::QBitmap(const QPixmap &)\nThis method creates an object of class QBitmap.", &_init_ctor_QBitmap_Adaptor_2017, &_call_ctor_QBitmap_Adaptor_2017);
}

//  Constructor QBitmap::QBitmap(int w, int h) (adaptor class)

static void _init_ctor_QBitmap_Adaptor_1426 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("w");
  decl->add_arg<int > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("h");
  decl->add_arg<int > (argspec_1);
  decl->set_return_new<QBitmap_Adaptor *> ();
}

static void _call_ctor_QBitmap_Adaptor_1426 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  int arg1 = args.read<int > ();
  int arg2 = args.read<int > ();
  ret.write<QBitmap_Adaptor *> (new QBitmap_Adaptor (arg1, arg2));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QBitmap_Adaptor_1426 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QBitmap::QBitmap(int w, int h)\nThis method creates an object of class QBitmap.", &_init_ctor_QBitmap_Adaptor_1426, &_call_ctor_QBitmap_Adaptor_1426);
}

//  Constructor QBitmap::QBitmap(const QSize &) (adaptor class)

static void _init_ctor_QBitmap_Adaptor_1805 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const QSize & > (argspec_0);
  decl->set_return_new<QBitmap_Adaptor *> ();
}

static void _call_ctor_QBitmap_Adaptor_1805 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QSize &arg1 = args.read<const QSize & > ();
  ret.write<QBitmap_Adaptor *> (new QBitmap_Adaptor (arg1));
}

static qt_gsi::GenericStaticMethod *_create_ctor_QBitmap_Adaptor_1805 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QBitmap::QBitmap(const QSize &)\nThis method creates an object of class QBitmap.", &_init_ctor_QBitmap_Adaptor_1805, &_call_ctor_QBitmap_Adaptor_1805);
}

//  Constructor QBitmap::QBitmap(const QString &fileName, const char *format) (adaptor class)

static void _init_ctor_QBitmap_Adaptor_3648 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("fileName");
  decl->add_arg<const QString & > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("format", true, "0");
  decl->add_arg<const char * > (argspec_1);
  decl->set_return_new<QBitmap_Adaptor *> ();
}

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

static qt_gsi::GenericStaticMethod *_create_ctor_QBitmap_Adaptor_3648 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QBitmap::QBitmap(const QString &fileName, const char *format)\nThis method creates an object of class QBitmap.", &_init_ctor_QBitmap_Adaptor_3648, &_call_ctor_QBitmap_Adaptor_3648);
}

// QPaintEngine *QBitmap::paintEngine()

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

static void _call_cbs_paintEngine_c0_0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<QPaintEngine * > ((QPaintEngine *)((QBitmap_Adaptor *)cls)->cbs_paintEngine_c0_0 ());
}

static void _set_callback_cbs_paintEngine_c0_0 (void *cls, const gsi::Callback &cb)
{
  ((QBitmap_Adaptor *)cls)->cb_paintEngine_c0_0 = cb;
}

static qt_gsi::GenericMethod *_create_cbs_paintEngine_c0_0 ()
{
  return new qt_gsi::GenericMethod ("paintEngine", "@hide", true, &_init_cbs_paintEngine_c0_0, &_call_cbs_paintEngine_c0_0);
}

static qt_gsi::GenericMethod *_create_callback_cbs_paintEngine_c0_0 ()
{
  return new qt_gsi::GenericMethod ("paintEngine", "@brief Virtual method QPaintEngine *QBitmap::paintEngine()\nThis method can be reimplemented in a derived class.", true, &_init_cbs_paintEngine_c0_0, &_call_cbs_paintEngine_c0_0, &_set_callback_cbs_paintEngine_c0_0);
}


// int QBitmap::metric(QPaintDevice::PaintDeviceMetric)

static void _init_cbs_metric_c3445_0 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("arg1");
  decl->add_arg<const qt_gsi::Converter<QPaintDevice::PaintDeviceMetric>::target_type & > (argspec_0);
  decl->set_return<int > ();
}

static void _call_cbs_metric_c3445_0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QPaintDevice::PaintDeviceMetric>::target_type & arg1 = args.read<const qt_gsi::Converter<QPaintDevice::PaintDeviceMetric>::target_type & > ();
  ret.write<int > ((int)((QBitmap_Adaptor *)cls)->cbs_metric_c3445_0 (arg1));
}

static void _set_callback_cbs_metric_c3445_0 (void *cls, const gsi::Callback &cb)
{
  ((QBitmap_Adaptor *)cls)->cb_metric_c3445_0 = cb;
}

static qt_gsi::GenericMethod *_create_cbs_metric_c3445_0 ()
{
  return new qt_gsi::GenericMethod ("*metric", "@hide", true, &_init_cbs_metric_c3445_0, &_call_cbs_metric_c3445_0);
}

static qt_gsi::GenericMethod *_create_callback_cbs_metric_c3445_0 ()
{
  return new qt_gsi::GenericMethod ("*metric", "@brief Virtual method int QBitmap::metric(QPaintDevice::PaintDeviceMetric)\nThis method can be reimplemented in a derived class.", true, &_init_cbs_metric_c3445_0, &_call_cbs_metric_c3445_0, &_set_callback_cbs_metric_c3445_0);
}


namespace gsi
{

extern gsi::Class<QBitmap> decl_QBitmap;

gsi::Class<QBitmap_Adaptor> decl_QBitmap_Adaptor (decl_QBitmap, "QBitmap",
  gsi::Methods(_create_cbs_paintEngine_c0_0 ()) +
  gsi::Methods(_create_callback_cbs_paintEngine_c0_0 ()) +
  gsi::Methods(_create_cbs_metric_c3445_0 ()) +
  gsi::Methods(_create_callback_cbs_metric_c3445_0 ()) +
  gsi::Methods(_create_ctor_QBitmap_Adaptor_0 ()) +
  gsi::Methods(_create_ctor_QBitmap_Adaptor_2017 ()) +
  gsi::Methods(_create_ctor_QBitmap_Adaptor_1426 ()) +
  gsi::Methods(_create_ctor_QBitmap_Adaptor_1805 ()) +
  gsi::Methods(_create_ctor_QBitmap_Adaptor_3648 ()),
  "@qt\n@brief Binding of QBitmap");

}

