
/*

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

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

// -----------------------------------------------------------------------
// class QPaintDevice

// int QPaintDevice::colorCount()


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

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

static qt_gsi::GenericMethod *_create_f_colorCount_c0 ()
{
  return new qt_gsi::GenericMethod ("colorCount", "@brief Method int QPaintDevice::colorCount()\n", true, &_init_f_colorCount_c0, &_call_f_colorCount_c0);
}

// int QPaintDevice::depth()


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

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

static qt_gsi::GenericMethod *_create_f_depth_c0 ()
{
  return new qt_gsi::GenericMethod ("depth", "@brief Method int QPaintDevice::depth()\n", true, &_init_f_depth_c0, &_call_f_depth_c0);
}

// int QPaintDevice::height()


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

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

static qt_gsi::GenericMethod *_create_f_height_c0 ()
{
  return new qt_gsi::GenericMethod ("height", "@brief Method int QPaintDevice::height()\n", true, &_init_f_height_c0, &_call_f_height_c0);
}

// int QPaintDevice::heightMM()


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

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

static qt_gsi::GenericMethod *_create_f_heightMM_c0 ()
{
  return new qt_gsi::GenericMethod ("heightMM", "@brief Method int QPaintDevice::heightMM()\n", true, &_init_f_heightMM_c0, &_call_f_heightMM_c0);
}

// int QPaintDevice::logicalDpiX()


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

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

static qt_gsi::GenericMethod *_create_f_logicalDpiX_c0 ()
{
  return new qt_gsi::GenericMethod ("logicalDpiX", "@brief Method int QPaintDevice::logicalDpiX()\n", true, &_init_f_logicalDpiX_c0, &_call_f_logicalDpiX_c0);
}

// int QPaintDevice::logicalDpiY()


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

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

static qt_gsi::GenericMethod *_create_f_logicalDpiY_c0 ()
{
  return new qt_gsi::GenericMethod ("logicalDpiY", "@brief Method int QPaintDevice::logicalDpiY()\n", true, &_init_f_logicalDpiY_c0, &_call_f_logicalDpiY_c0);
}

// int QPaintDevice::numColors()


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

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

static qt_gsi::GenericMethod *_create_f_numColors_c0 ()
{
  return new qt_gsi::GenericMethod ("numColors", "@brief Method int QPaintDevice::numColors()\n", true, &_init_f_numColors_c0, &_call_f_numColors_c0);
}

// QPaintEngine *QPaintDevice::paintEngine()


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

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

static qt_gsi::GenericMethod *_create_f_paintEngine_c0 ()
{
  return new qt_gsi::GenericMethod ("paintEngine", "@brief Method QPaintEngine *QPaintDevice::paintEngine()\n", true, &_init_f_paintEngine_c0, &_call_f_paintEngine_c0);
}

// bool QPaintDevice::paintingActive()


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

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

static qt_gsi::GenericMethod *_create_f_paintingActive_c0 ()
{
  return new qt_gsi::GenericMethod ("paintingActive", "@brief Method bool QPaintDevice::paintingActive()\n", true, &_init_f_paintingActive_c0, &_call_f_paintingActive_c0);
}

// int QPaintDevice::physicalDpiX()


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

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

static qt_gsi::GenericMethod *_create_f_physicalDpiX_c0 ()
{
  return new qt_gsi::GenericMethod ("physicalDpiX", "@brief Method int QPaintDevice::physicalDpiX()\n", true, &_init_f_physicalDpiX_c0, &_call_f_physicalDpiX_c0);
}

// int QPaintDevice::physicalDpiY()


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

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

static qt_gsi::GenericMethod *_create_f_physicalDpiY_c0 ()
{
  return new qt_gsi::GenericMethod ("physicalDpiY", "@brief Method int QPaintDevice::physicalDpiY()\n", true, &_init_f_physicalDpiY_c0, &_call_f_physicalDpiY_c0);
}

// int QPaintDevice::width()


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

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

static qt_gsi::GenericMethod *_create_f_width_c0 ()
{
  return new qt_gsi::GenericMethod ("width", "@brief Method int QPaintDevice::width()\n", true, &_init_f_width_c0, &_call_f_width_c0);
}

// int QPaintDevice::widthMM()


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

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

static qt_gsi::GenericMethod *_create_f_widthMM_c0 ()
{
  return new qt_gsi::GenericMethod ("widthMM", "@brief Method int QPaintDevice::widthMM()\n", true, &_init_f_widthMM_c0, &_call_f_widthMM_c0);
}

namespace gsi
{
gsi::Class<QPaintDevice> decl_QPaintDevice ("QPaintDevice_Native",
  gsi::Methods(_create_f_colorCount_c0 ()) +
  gsi::Methods(_create_f_depth_c0 ()) +
  gsi::Methods(_create_f_height_c0 ()) +
  gsi::Methods(_create_f_heightMM_c0 ()) +
  gsi::Methods(_create_f_logicalDpiX_c0 ()) +
  gsi::Methods(_create_f_logicalDpiY_c0 ()) +
  gsi::Methods(_create_f_numColors_c0 ()) +
  gsi::Methods(_create_f_paintEngine_c0 ()) +
  gsi::Methods(_create_f_paintingActive_c0 ()) +
  gsi::Methods(_create_f_physicalDpiX_c0 ()) +
  gsi::Methods(_create_f_physicalDpiY_c0 ()) +
  gsi::Methods(_create_f_width_c0 ()) +
  gsi::Methods(_create_f_widthMM_c0 ()),
  "@hide\n@alias QPaintDevice");
}


class QPaintDevice_Adaptor : public QPaintDevice, public qt_gsi::QtObjectBase
{
public:

  virtual ~QPaintDevice_Adaptor();

  //  [adaptor impl] QPaintEngine *QPaintDevice::paintEngine()
  QPaintEngine * cbs_paintEngine_c0_0() const
  {
    throw qt_gsi::AbstractMethodCalledException("paintEngine");
  }

  virtual QPaintEngine * paintEngine() const
  {
    if (cb_paintEngine_c0_0.can_issue()) {
      return cb_paintEngine_c0_0.issue<QPaintDevice_Adaptor, QPaintEngine *>(&QPaintDevice_Adaptor::cbs_paintEngine_c0_0);
    } else {
      throw qt_gsi::AbstractMethodCalledException("paintEngine");
    }
  }

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

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

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

QPaintDevice_Adaptor::~QPaintDevice_Adaptor() { }

// QPaintEngine *QPaintDevice::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 *)((QPaintDevice_Adaptor *)cls)->cbs_paintEngine_c0_0 ());
}

static void _set_callback_cbs_paintEngine_c0_0 (void *cls, const gsi::Callback &cb)
{
  ((QPaintDevice_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 *QPaintDevice::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 QPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric)

static void _init_cbs_metric_c3445_0 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("metric");
  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)((QPaintDevice_Adaptor *)cls)->cbs_metric_c3445_0 (arg1));
}

static void _set_callback_cbs_metric_c3445_0 (void *cls, const gsi::Callback &cb)
{
  ((QPaintDevice_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 QPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric)\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<QPaintDevice> decl_QPaintDevice;

gsi::Class<QPaintDevice_Adaptor> decl_QPaintDevice_Adaptor (decl_QPaintDevice, "QPaintDevice",
  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 ()),
  "@qt\n@brief Binding of QPaintDevice");

}


//  Implementation of the enum wrapper class for QPaintDevice::PaintDeviceMetric
namespace qt_gsi
{

static QPaintDevice_PaintDeviceMetric_Enum *c_1_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmWidth); }
static QPaintDevice_PaintDeviceMetric_Enum *c_2_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmHeight); }
static QPaintDevice_PaintDeviceMetric_Enum *c_3_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmWidthMM); }
static QPaintDevice_PaintDeviceMetric_Enum *c_4_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmHeightMM); }
static QPaintDevice_PaintDeviceMetric_Enum *c_5_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmNumColors); }
static QPaintDevice_PaintDeviceMetric_Enum *c_6_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmDepth); }
static QPaintDevice_PaintDeviceMetric_Enum *c_7_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmDpiX); }
static QPaintDevice_PaintDeviceMetric_Enum *c_8_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmDpiY); }
static QPaintDevice_PaintDeviceMetric_Enum *c_9_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmPhysicalDpiX); }
static QPaintDevice_PaintDeviceMetric_Enum *c_10_QPaintDevice_PaintDeviceMetric_Enum () { return new QPaintDevice_PaintDeviceMetric_Enum (QPaintDevice::PdmPhysicalDpiY); }

static gsi::Methods mkdefs_QPaintDevice_PaintDeviceMetric () {
  return
    gsi::constant ("PdmWidth", &qt_gsi::c_1_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmWidth") +
    gsi::constant ("PdmHeight", &qt_gsi::c_2_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmHeight") +
    gsi::constant ("PdmWidthMM", &qt_gsi::c_3_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmWidthMM") +
    gsi::constant ("PdmHeightMM", &qt_gsi::c_4_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmHeightMM") +
    gsi::constant ("PdmNumColors", &qt_gsi::c_5_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmNumColors") +
    gsi::constant ("PdmDepth", &qt_gsi::c_6_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmDepth") +
    gsi::constant ("PdmDpiX", &qt_gsi::c_7_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmDpiX") +
    gsi::constant ("PdmDpiY", &qt_gsi::c_8_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmDpiY") +
    gsi::constant ("PdmPhysicalDpiX", &qt_gsi::c_9_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmPhysicalDpiX") +
    gsi::constant ("PdmPhysicalDpiY", &qt_gsi::c_10_QPaintDevice_PaintDeviceMetric_Enum, "@brief Enum constant QPaintDevice::PdmPhysicalDpiY");
}

static std::string to_s_QPaintDevice_PaintDeviceMetric_Enum (const QPaintDevice_PaintDeviceMetric_Enum *e)
{
  if (e->value () == QPaintDevice::PdmWidth) { return tl::sprintf ("PdmWidth (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmHeight) { return tl::sprintf ("PdmHeight (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmWidthMM) { return tl::sprintf ("PdmWidthMM (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmHeightMM) { return tl::sprintf ("PdmHeightMM (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmNumColors) { return tl::sprintf ("PdmNumColors (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmDepth) { return tl::sprintf ("PdmDepth (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmDpiX) { return tl::sprintf ("PdmDpiX (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmDpiY) { return tl::sprintf ("PdmDpiY (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmPhysicalDpiX) { return tl::sprintf ("PdmPhysicalDpiX (%u)", (unsigned int) e->value ()); }
  if (e->value () == QPaintDevice::PdmPhysicalDpiY) { return tl::sprintf ("PdmPhysicalDpiY (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QPaintDevice_PaintDeviceMetric_Enum (const QPaintDevice_PaintDeviceMetric_Enum *e)
{
  return (unsigned int) e->value ();
}

static QPaintDevice_PaintDeviceMetric_Enum *from_i_QPaintDevice_PaintDeviceMetric_Enum (unsigned int i)
{
  return new QPaintDevice_PaintDeviceMetric_Enum ((QPaintDevice::PaintDeviceMetric) i);
}

static bool equalQPaintDevice_PaintDeviceMetric_Enum (const QPaintDevice_PaintDeviceMetric_Enum *e, QPaintDevice_PaintDeviceMetric_Enum d)
{
  return e->value () == d.value ();
}

static bool equal2QPaintDevice_PaintDeviceMetric_Enum (const QPaintDevice_PaintDeviceMetric_Enum *e, unsigned int i)
{
  return (unsigned int) e->value () == i;
}

static QPaintDevice_PaintDeviceMetric_Enums oropQPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e, const QPaintDevice_PaintDeviceMetric_Enums &d)
{
  return e->flags () | d.flags ();
}

static QPaintDevice_PaintDeviceMetric_Enums andopQPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e, const QPaintDevice_PaintDeviceMetric_Enums &d)
{
  return e->flags () & d.flags ();
}

static QPaintDevice_PaintDeviceMetric_Enums xoropQPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e, const QPaintDevice_PaintDeviceMetric_Enums &d)
{
  return e->flags () ^ d.flags ();
}

static std::string to_s_QPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e)
{
  std::string l;
  if (e->testFlag (QPaintDevice::PdmWidth)) { if (!l.empty ()) l += "|"; l += "PdmWidth"; }
  if (e->testFlag (QPaintDevice::PdmHeight)) { if (!l.empty ()) l += "|"; l += "PdmHeight"; }
  if (e->testFlag (QPaintDevice::PdmWidthMM)) { if (!l.empty ()) l += "|"; l += "PdmWidthMM"; }
  if (e->testFlag (QPaintDevice::PdmHeightMM)) { if (!l.empty ()) l += "|"; l += "PdmHeightMM"; }
  if (e->testFlag (QPaintDevice::PdmNumColors)) { if (!l.empty ()) l += "|"; l += "PdmNumColors"; }
  if (e->testFlag (QPaintDevice::PdmDepth)) { if (!l.empty ()) l += "|"; l += "PdmDepth"; }
  if (e->testFlag (QPaintDevice::PdmDpiX)) { if (!l.empty ()) l += "|"; l += "PdmDpiX"; }
  if (e->testFlag (QPaintDevice::PdmDpiY)) { if (!l.empty ()) l += "|"; l += "PdmDpiY"; }
  if (e->testFlag (QPaintDevice::PdmPhysicalDpiX)) { if (!l.empty ()) l += "|"; l += "PdmPhysicalDpiX"; }
  if (e->testFlag (QPaintDevice::PdmPhysicalDpiY)) { if (!l.empty ()) l += "|"; l += "PdmPhysicalDpiY"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QPaintDevice_PaintDeviceMetric_Enums (const QPaintDevice_PaintDeviceMetric_Enums *e, const QPaintDevice_PaintDeviceMetric_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QPaintDevice_PaintDeviceMetric_Enums> decl_QPaintDevice_PaintDeviceMetric_Enums ("QPaintDevice_QFlags_PaintDeviceMetric",
  gsi::method_ext ("|", &qt_gsi::oropQPaintDevice_PaintDeviceMetric_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQPaintDevice_PaintDeviceMetric_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQPaintDevice_PaintDeviceMetric_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QPaintDevice_PaintDeviceMetric_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QPaintDevice_PaintDeviceMetric_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QPaintDevice_PaintDeviceMetric_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QPaintDevice::PaintDeviceMetric> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QPaintDevice_PaintDeviceMetric_Enum> decl_QPaintDevice_PaintDeviceMetric_Enum (decl_QPaintDevice_PaintDeviceMetric_Enums, "QPaintDevice_PaintDeviceMetric",
  qt_gsi::mkdefs_QPaintDevice_PaintDeviceMetric () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QPaintDevice_PaintDeviceMetric_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QPaintDevice_PaintDeviceMetric_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQPaintDevice_PaintDeviceMetric_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QPaintDevice_PaintDeviceMetric_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QPaintDevice_PaintDeviceMetric_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QPaintDevice::PaintDeviceMetric enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QPaintDevice> inject_QPaintDevice_PaintDeviceMetric_Enum_in_parent (qt_gsi::mkdefs_QPaintDevice_PaintDeviceMetric ());
static gsi::ClassExt<QPaintDevice> decl_QPaintDevice_PaintDeviceMetric_Enum_as_child (decl_QPaintDevice_PaintDeviceMetric_Enum, "PaintDeviceMetric");

}

