
/*

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

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

// -----------------------------------------------------------------------
// class QGradient

//  Constructor QGradient::QGradient()


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

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

static qt_gsi::GenericStaticMethod *_create_ctor_QGradient_0 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QGradient::QGradient()\nThis method creates an object of class QGradient.", &_init_ctor_QGradient_0, &_call_ctor_QGradient_0);
}

// QGradient::CoordinateMode QGradient::coordinateMode()


static void _init_f_coordinateMode_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QGradient::CoordinateMode>::target_type > ();
}

static void _call_f_coordinateMode_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QGradient::CoordinateMode>::target_type > ((qt_gsi::Converter<QGradient::CoordinateMode>::target_type)qt_gsi::CppToQtAdaptor<QGradient::CoordinateMode>(((QGradient *)cls)->coordinateMode ()));
}

static qt_gsi::GenericMethod *_create_f_coordinateMode_c0 ()
{
  return new qt_gsi::GenericMethod (":coordinateMode", "@brief Method QGradient::CoordinateMode QGradient::coordinateMode()\n", true, &_init_f_coordinateMode_c0, &_call_f_coordinateMode_c0);
}

// QGradient::InterpolationMode QGradient::interpolationMode()


static void _init_f_interpolationMode_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QGradient::InterpolationMode>::target_type > ();
}

static void _call_f_interpolationMode_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QGradient::InterpolationMode>::target_type > ((qt_gsi::Converter<QGradient::InterpolationMode>::target_type)qt_gsi::CppToQtAdaptor<QGradient::InterpolationMode>(((QGradient *)cls)->interpolationMode ()));
}

static qt_gsi::GenericMethod *_create_f_interpolationMode_c0 ()
{
  return new qt_gsi::GenericMethod (":interpolationMode", "@brief Method QGradient::InterpolationMode QGradient::interpolationMode()\n", true, &_init_f_interpolationMode_c0, &_call_f_interpolationMode_c0);
}

// bool QGradient::operator!=(const QGradient &other)


static void _init_f_operator_excl__eq__c2208 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("other");
  decl->add_arg<const QGradient & > (argspec_0);
  decl->set_return<bool > ();
}

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

static qt_gsi::GenericMethod *_create_f_operator_excl__eq__c2208 ()
{
  return new qt_gsi::GenericMethod ("!=", "@brief Method bool QGradient::operator!=(const QGradient &other)\n", true, &_init_f_operator_excl__eq__c2208, &_call_f_operator_excl__eq__c2208);
}

// bool QGradient::operator==(const QGradient &gradient)


static void _init_f_operator_eq__eq__c2208 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("gradient");
  decl->add_arg<const QGradient & > (argspec_0);
  decl->set_return<bool > ();
}

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

static qt_gsi::GenericMethod *_create_f_operator_eq__eq__c2208 ()
{
  return new qt_gsi::GenericMethod ("==", "@brief Method bool QGradient::operator==(const QGradient &gradient)\n", true, &_init_f_operator_eq__eq__c2208, &_call_f_operator_eq__eq__c2208);
}

// bool QGradient::operator==(const QGradient &gradient)


static void _init_f_operator_eq__eq__2208 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("gradient");
  decl->add_arg<const QGradient & > (argspec_0);
  decl->set_return<bool > ();
}

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

static qt_gsi::GenericMethod *_create_f_operator_eq__eq__2208 ()
{
  return new qt_gsi::GenericMethod ("==", "@brief Method bool QGradient::operator==(const QGradient &gradient)\n", false, &_init_f_operator_eq__eq__2208, &_call_f_operator_eq__eq__2208);
}

// void QGradient::setColorAt(double pos, const QColor &color)


static void _init_f_setColorAt_2868 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("pos");
  decl->add_arg<double > (argspec_0);
  static gsi::ArgSpecBase argspec_1 ("color");
  decl->add_arg<const QColor & > (argspec_1);
  decl->set_return<void > ();
}

static void _call_f_setColorAt_2868 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  double arg1 = args.read<double > ();
  const QColor &arg2 = args.read<const QColor & > ();
  ((QGradient *)cls)->setColorAt (arg1, arg2);
}

static qt_gsi::GenericMethod *_create_f_setColorAt_2868 ()
{
  return new qt_gsi::GenericMethod ("setColorAt", "@brief Method void QGradient::setColorAt(double pos, const QColor &color)\n", false, &_init_f_setColorAt_2868, &_call_f_setColorAt_2868);
}

// void QGradient::setCoordinateMode(QGradient::CoordinateMode mode)


static void _init_f_setCoordinateMode_2868 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("mode");
  decl->add_arg<const qt_gsi::Converter<QGradient::CoordinateMode>::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setCoordinateMode_2868 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QGradient::CoordinateMode>::target_type & arg1 = args.read<const qt_gsi::Converter<QGradient::CoordinateMode>::target_type & > ();
  ((QGradient *)cls)->setCoordinateMode (qt_gsi::QtToCppAdaptor<QGradient::CoordinateMode>(arg1).cref());
}

static qt_gsi::GenericMethod *_create_f_setCoordinateMode_2868 ()
{
  return new qt_gsi::GenericMethod ("setCoordinateMode|coordinateMode=", "@brief Method void QGradient::setCoordinateMode(QGradient::CoordinateMode mode)\n", false, &_init_f_setCoordinateMode_2868, &_call_f_setCoordinateMode_2868);
}

// void QGradient::setInterpolationMode(QGradient::InterpolationMode mode)


static void _init_f_setInterpolationMode_3220 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("mode");
  decl->add_arg<const qt_gsi::Converter<QGradient::InterpolationMode>::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setInterpolationMode_3220 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QGradient::InterpolationMode>::target_type & arg1 = args.read<const qt_gsi::Converter<QGradient::InterpolationMode>::target_type & > ();
  ((QGradient *)cls)->setInterpolationMode (qt_gsi::QtToCppAdaptor<QGradient::InterpolationMode>(arg1).cref());
}

static qt_gsi::GenericMethod *_create_f_setInterpolationMode_3220 ()
{
  return new qt_gsi::GenericMethod ("setInterpolationMode|interpolationMode=", "@brief Method void QGradient::setInterpolationMode(QGradient::InterpolationMode mode)\n", false, &_init_f_setInterpolationMode_3220, &_call_f_setInterpolationMode_3220);
}

// void QGradient::setSpread(QGradient::Spread spread)


static void _init_f_setSpread_2054 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("spread");
  decl->add_arg<const qt_gsi::Converter<QGradient::Spread>::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setSpread_2054 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QGradient::Spread>::target_type & arg1 = args.read<const qt_gsi::Converter<QGradient::Spread>::target_type & > ();
  ((QGradient *)cls)->setSpread (qt_gsi::QtToCppAdaptor<QGradient::Spread>(arg1).cref());
}

static qt_gsi::GenericMethod *_create_f_setSpread_2054 ()
{
  return new qt_gsi::GenericMethod ("setSpread|spread=", "@brief Method void QGradient::setSpread(QGradient::Spread spread)\n", false, &_init_f_setSpread_2054, &_call_f_setSpread_2054);
}

// void QGradient::setStops(const QVector<QPair<double, QColor> > &stops)


static void _init_f_setStops_4301 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("stops");
  decl->add_arg<const qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setStops_4301 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type & arg1 = args.read<const qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type & > ();
  ((QGradient *)cls)->setStops (qt_gsi::QtToCppAdaptor<QVector<QPair<double, QColor> > >(arg1).cref());
}

static qt_gsi::GenericMethod *_create_f_setStops_4301 ()
{
  return new qt_gsi::GenericMethod ("setStops|stops=", "@brief Method void QGradient::setStops(const QVector<QPair<double, QColor> > &stops)\n", false, &_init_f_setStops_4301, &_call_f_setStops_4301);
}

// QGradient::Spread QGradient::spread()


static void _init_f_spread_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QGradient::Spread>::target_type > ();
}

static void _call_f_spread_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QGradient::Spread>::target_type > ((qt_gsi::Converter<QGradient::Spread>::target_type)qt_gsi::CppToQtAdaptor<QGradient::Spread>(((QGradient *)cls)->spread ()));
}

static qt_gsi::GenericMethod *_create_f_spread_c0 ()
{
  return new qt_gsi::GenericMethod (":spread", "@brief Method QGradient::Spread QGradient::spread()\n", true, &_init_f_spread_c0, &_call_f_spread_c0);
}

// QVector<QPair<double, QColor> > QGradient::stops()


static void _init_f_stops_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type > ();
}

static void _call_f_stops_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type > ((qt_gsi::Converter<QVector<QPair<double, QColor> > >::target_type)qt_gsi::CppToQtAdaptor<QVector<QPair<double, QColor> > >(((QGradient *)cls)->stops ()));
}

static qt_gsi::GenericMethod *_create_f_stops_c0 ()
{
  return new qt_gsi::GenericMethod (":stops", "@brief Method QVector<QPair<double, QColor> > QGradient::stops()\n", true, &_init_f_stops_c0, &_call_f_stops_c0);
}

// QGradient::Type QGradient::type()


static void _init_f_type_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QGradient::Type>::target_type > ();
}

static void _call_f_type_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QGradient::Type>::target_type > ((qt_gsi::Converter<QGradient::Type>::target_type)qt_gsi::CppToQtAdaptor<QGradient::Type>(((QGradient *)cls)->type ()));
}

static qt_gsi::GenericMethod *_create_f_type_c0 ()
{
  return new qt_gsi::GenericMethod ("type", "@brief Method QGradient::Type QGradient::type()\n", true, &_init_f_type_c0, &_call_f_type_c0);
}


namespace gsi
{
gsi::Class<QGradient> decl_QGradient ("QGradient",
  gsi::Methods(_create_ctor_QGradient_0 ()) +
  gsi::Methods(_create_f_coordinateMode_c0 ()) +
  gsi::Methods(_create_f_interpolationMode_c0 ()) +
  gsi::Methods(_create_f_operator_excl__eq__c2208 ()) +
  gsi::Methods(_create_f_operator_eq__eq__c2208 ()) +
  gsi::Methods(_create_f_operator_eq__eq__2208 ()) +
  gsi::Methods(_create_f_setColorAt_2868 ()) +
  gsi::Methods(_create_f_setCoordinateMode_2868 ()) +
  gsi::Methods(_create_f_setInterpolationMode_3220 ()) +
  gsi::Methods(_create_f_setSpread_2054 ()) +
  gsi::Methods(_create_f_setStops_4301 ()) +
  gsi::Methods(_create_f_spread_c0 ()) +
  gsi::Methods(_create_f_stops_c0 ()) +
  gsi::Methods(_create_f_type_c0 ()),
  "@qt\n@brief Binding of QGradient");

}


//  Implementation of the enum wrapper class for QGradient::CoordinateMode
namespace qt_gsi
{

static QGradient_CoordinateMode_Enum *c_1_QGradient_CoordinateMode_Enum () { return new QGradient_CoordinateMode_Enum (QGradient::LogicalMode); }
static QGradient_CoordinateMode_Enum *c_2_QGradient_CoordinateMode_Enum () { return new QGradient_CoordinateMode_Enum (QGradient::StretchToDeviceMode); }
static QGradient_CoordinateMode_Enum *c_3_QGradient_CoordinateMode_Enum () { return new QGradient_CoordinateMode_Enum (QGradient::ObjectBoundingMode); }

static gsi::Methods mkdefs_QGradient_CoordinateMode () {
  return
    gsi::constant ("LogicalMode", &qt_gsi::c_1_QGradient_CoordinateMode_Enum, "@brief Enum constant QGradient::LogicalMode") +
    gsi::constant ("StretchToDeviceMode", &qt_gsi::c_2_QGradient_CoordinateMode_Enum, "@brief Enum constant QGradient::StretchToDeviceMode") +
    gsi::constant ("ObjectBoundingMode", &qt_gsi::c_3_QGradient_CoordinateMode_Enum, "@brief Enum constant QGradient::ObjectBoundingMode");
}

static std::string to_s_QGradient_CoordinateMode_Enum (const QGradient_CoordinateMode_Enum *e)
{
  if (e->value () == QGradient::LogicalMode) { return tl::sprintf ("LogicalMode (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::StretchToDeviceMode) { return tl::sprintf ("StretchToDeviceMode (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::ObjectBoundingMode) { return tl::sprintf ("ObjectBoundingMode (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QGradient_CoordinateMode_Enum (const QGradient_CoordinateMode_Enum *e)
{
  return (unsigned int) e->value ();
}

static QGradient_CoordinateMode_Enum *from_i_QGradient_CoordinateMode_Enum (unsigned int i)
{
  return new QGradient_CoordinateMode_Enum ((QGradient::CoordinateMode) i);
}

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

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

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

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

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

static std::string to_s_QGradient_CoordinateMode_Enums (const QGradient_CoordinateMode_Enums *e)
{
  std::string l;
  if (e->testFlag (QGradient::LogicalMode)) { if (!l.empty ()) l += "|"; l += "LogicalMode"; }
  if (e->testFlag (QGradient::StretchToDeviceMode)) { if (!l.empty ()) l += "|"; l += "StretchToDeviceMode"; }
  if (e->testFlag (QGradient::ObjectBoundingMode)) { if (!l.empty ()) l += "|"; l += "ObjectBoundingMode"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QGradient_CoordinateMode_Enums (const QGradient_CoordinateMode_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QGradient_CoordinateMode_Enums (const QGradient_CoordinateMode_Enums *e, const QGradient_CoordinateMode_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QGradient_CoordinateMode_Enums> decl_QGradient_CoordinateMode_Enums ("QGradient_QFlags_CoordinateMode",
  gsi::method_ext ("|", &qt_gsi::oropQGradient_CoordinateMode_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQGradient_CoordinateMode_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQGradient_CoordinateMode_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_CoordinateMode_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_CoordinateMode_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QGradient_CoordinateMode_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QGradient::CoordinateMode> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QGradient_CoordinateMode_Enum> decl_QGradient_CoordinateMode_Enum (decl_QGradient_CoordinateMode_Enums, "QGradient_CoordinateMode",
  qt_gsi::mkdefs_QGradient_CoordinateMode () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_CoordinateMode_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_CoordinateMode_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQGradient_CoordinateMode_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QGradient_CoordinateMode_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QGradient_CoordinateMode_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QGradient::CoordinateMode enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QGradient> inject_QGradient_CoordinateMode_Enum_in_parent (qt_gsi::mkdefs_QGradient_CoordinateMode ());
static gsi::ClassExt<QGradient> decl_QGradient_CoordinateMode_Enum_as_child (decl_QGradient_CoordinateMode_Enum, "CoordinateMode");

}


//  Implementation of the enum wrapper class for QGradient::InterpolationMode
namespace qt_gsi
{

static QGradient_InterpolationMode_Enum *c_1_QGradient_InterpolationMode_Enum () { return new QGradient_InterpolationMode_Enum (QGradient::ColorInterpolation); }
static QGradient_InterpolationMode_Enum *c_2_QGradient_InterpolationMode_Enum () { return new QGradient_InterpolationMode_Enum (QGradient::ComponentInterpolation); }

static gsi::Methods mkdefs_QGradient_InterpolationMode () {
  return
    gsi::constant ("ColorInterpolation", &qt_gsi::c_1_QGradient_InterpolationMode_Enum, "@brief Enum constant QGradient::ColorInterpolation") +
    gsi::constant ("ComponentInterpolation", &qt_gsi::c_2_QGradient_InterpolationMode_Enum, "@brief Enum constant QGradient::ComponentInterpolation");
}

static std::string to_s_QGradient_InterpolationMode_Enum (const QGradient_InterpolationMode_Enum *e)
{
  if (e->value () == QGradient::ColorInterpolation) { return tl::sprintf ("ColorInterpolation (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::ComponentInterpolation) { return tl::sprintf ("ComponentInterpolation (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QGradient_InterpolationMode_Enum (const QGradient_InterpolationMode_Enum *e)
{
  return (unsigned int) e->value ();
}

static QGradient_InterpolationMode_Enum *from_i_QGradient_InterpolationMode_Enum (unsigned int i)
{
  return new QGradient_InterpolationMode_Enum ((QGradient::InterpolationMode) i);
}

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

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

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

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

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

static std::string to_s_QGradient_InterpolationMode_Enums (const QGradient_InterpolationMode_Enums *e)
{
  std::string l;
  if (e->testFlag (QGradient::ColorInterpolation)) { if (!l.empty ()) l += "|"; l += "ColorInterpolation"; }
  if (e->testFlag (QGradient::ComponentInterpolation)) { if (!l.empty ()) l += "|"; l += "ComponentInterpolation"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QGradient_InterpolationMode_Enums (const QGradient_InterpolationMode_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QGradient_InterpolationMode_Enums (const QGradient_InterpolationMode_Enums *e, const QGradient_InterpolationMode_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QGradient_InterpolationMode_Enums> decl_QGradient_InterpolationMode_Enums ("QGradient_QFlags_InterpolationMode",
  gsi::method_ext ("|", &qt_gsi::oropQGradient_InterpolationMode_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQGradient_InterpolationMode_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQGradient_InterpolationMode_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_InterpolationMode_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_InterpolationMode_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QGradient_InterpolationMode_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QGradient::InterpolationMode> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QGradient_InterpolationMode_Enum> decl_QGradient_InterpolationMode_Enum (decl_QGradient_InterpolationMode_Enums, "QGradient_InterpolationMode",
  qt_gsi::mkdefs_QGradient_InterpolationMode () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_InterpolationMode_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_InterpolationMode_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQGradient_InterpolationMode_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QGradient_InterpolationMode_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QGradient_InterpolationMode_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QGradient::InterpolationMode enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QGradient> inject_QGradient_InterpolationMode_Enum_in_parent (qt_gsi::mkdefs_QGradient_InterpolationMode ());
static gsi::ClassExt<QGradient> decl_QGradient_InterpolationMode_Enum_as_child (decl_QGradient_InterpolationMode_Enum, "InterpolationMode");

}


//  Implementation of the enum wrapper class for QGradient::Spread
namespace qt_gsi
{

static QGradient_Spread_Enum *c_1_QGradient_Spread_Enum () { return new QGradient_Spread_Enum (QGradient::PadSpread); }
static QGradient_Spread_Enum *c_2_QGradient_Spread_Enum () { return new QGradient_Spread_Enum (QGradient::ReflectSpread); }
static QGradient_Spread_Enum *c_3_QGradient_Spread_Enum () { return new QGradient_Spread_Enum (QGradient::RepeatSpread); }

static gsi::Methods mkdefs_QGradient_Spread () {
  return
    gsi::constant ("PadSpread", &qt_gsi::c_1_QGradient_Spread_Enum, "@brief Enum constant QGradient::PadSpread") +
    gsi::constant ("ReflectSpread", &qt_gsi::c_2_QGradient_Spread_Enum, "@brief Enum constant QGradient::ReflectSpread") +
    gsi::constant ("RepeatSpread", &qt_gsi::c_3_QGradient_Spread_Enum, "@brief Enum constant QGradient::RepeatSpread");
}

static std::string to_s_QGradient_Spread_Enum (const QGradient_Spread_Enum *e)
{
  if (e->value () == QGradient::PadSpread) { return tl::sprintf ("PadSpread (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::ReflectSpread) { return tl::sprintf ("ReflectSpread (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::RepeatSpread) { return tl::sprintf ("RepeatSpread (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QGradient_Spread_Enum (const QGradient_Spread_Enum *e)
{
  return (unsigned int) e->value ();
}

static QGradient_Spread_Enum *from_i_QGradient_Spread_Enum (unsigned int i)
{
  return new QGradient_Spread_Enum ((QGradient::Spread) i);
}

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

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

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

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

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

static std::string to_s_QGradient_Spread_Enums (const QGradient_Spread_Enums *e)
{
  std::string l;
  if (e->testFlag (QGradient::PadSpread)) { if (!l.empty ()) l += "|"; l += "PadSpread"; }
  if (e->testFlag (QGradient::ReflectSpread)) { if (!l.empty ()) l += "|"; l += "ReflectSpread"; }
  if (e->testFlag (QGradient::RepeatSpread)) { if (!l.empty ()) l += "|"; l += "RepeatSpread"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QGradient_Spread_Enums (const QGradient_Spread_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QGradient_Spread_Enums (const QGradient_Spread_Enums *e, const QGradient_Spread_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QGradient_Spread_Enums> decl_QGradient_Spread_Enums ("QGradient_QFlags_Spread",
  gsi::method_ext ("|", &qt_gsi::oropQGradient_Spread_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQGradient_Spread_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQGradient_Spread_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_Spread_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_Spread_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QGradient_Spread_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QGradient::Spread> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QGradient_Spread_Enum> decl_QGradient_Spread_Enum (decl_QGradient_Spread_Enums, "QGradient_Spread",
  qt_gsi::mkdefs_QGradient_Spread () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_Spread_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_Spread_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQGradient_Spread_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QGradient_Spread_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QGradient_Spread_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QGradient::Spread enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QGradient> inject_QGradient_Spread_Enum_in_parent (qt_gsi::mkdefs_QGradient_Spread ());
static gsi::ClassExt<QGradient> decl_QGradient_Spread_Enum_as_child (decl_QGradient_Spread_Enum, "Spread");

}


//  Implementation of the enum wrapper class for QGradient::Type
namespace qt_gsi
{

static QGradient_Type_Enum *c_1_QGradient_Type_Enum () { return new QGradient_Type_Enum (QGradient::LinearGradient); }
static QGradient_Type_Enum *c_2_QGradient_Type_Enum () { return new QGradient_Type_Enum (QGradient::RadialGradient); }
static QGradient_Type_Enum *c_3_QGradient_Type_Enum () { return new QGradient_Type_Enum (QGradient::ConicalGradient); }
static QGradient_Type_Enum *c_4_QGradient_Type_Enum () { return new QGradient_Type_Enum (QGradient::NoGradient); }

static gsi::Methods mkdefs_QGradient_Type () {
  return
    gsi::constant ("LinearGradient", &qt_gsi::c_1_QGradient_Type_Enum, "@brief Enum constant QGradient::LinearGradient") +
    gsi::constant ("RadialGradient", &qt_gsi::c_2_QGradient_Type_Enum, "@brief Enum constant QGradient::RadialGradient") +
    gsi::constant ("ConicalGradient", &qt_gsi::c_3_QGradient_Type_Enum, "@brief Enum constant QGradient::ConicalGradient") +
    gsi::constant ("NoGradient", &qt_gsi::c_4_QGradient_Type_Enum, "@brief Enum constant QGradient::NoGradient");
}

static std::string to_s_QGradient_Type_Enum (const QGradient_Type_Enum *e)
{
  if (e->value () == QGradient::LinearGradient) { return tl::sprintf ("LinearGradient (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::RadialGradient) { return tl::sprintf ("RadialGradient (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::ConicalGradient) { return tl::sprintf ("ConicalGradient (%u)", (unsigned int) e->value ()); }
  if (e->value () == QGradient::NoGradient) { return tl::sprintf ("NoGradient (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QGradient_Type_Enum (const QGradient_Type_Enum *e)
{
  return (unsigned int) e->value ();
}

static QGradient_Type_Enum *from_i_QGradient_Type_Enum (unsigned int i)
{
  return new QGradient_Type_Enum ((QGradient::Type) i);
}

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

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

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

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

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

static std::string to_s_QGradient_Type_Enums (const QGradient_Type_Enums *e)
{
  std::string l;
  if (e->testFlag (QGradient::LinearGradient)) { if (!l.empty ()) l += "|"; l += "LinearGradient"; }
  if (e->testFlag (QGradient::RadialGradient)) { if (!l.empty ()) l += "|"; l += "RadialGradient"; }
  if (e->testFlag (QGradient::ConicalGradient)) { if (!l.empty ()) l += "|"; l += "ConicalGradient"; }
  if (e->testFlag (QGradient::NoGradient)) { if (!l.empty ()) l += "|"; l += "NoGradient"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QGradient_Type_Enums (const QGradient_Type_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QGradient_Type_Enums (const QGradient_Type_Enums *e, const QGradient_Type_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QGradient_Type_Enums> decl_QGradient_Type_Enums ("QGradient_QFlags_Type",
  gsi::method_ext ("|", &qt_gsi::oropQGradient_Type_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQGradient_Type_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQGradient_Type_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_Type_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_Type_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QGradient_Type_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QGradient::Type> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QGradient_Type_Enum> decl_QGradient_Type_Enum (decl_QGradient_Type_Enums, "QGradient_Type",
  qt_gsi::mkdefs_QGradient_Type () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QGradient_Type_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QGradient_Type_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQGradient_Type_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QGradient_Type_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QGradient_Type_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QGradient::Type enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QGradient> inject_QGradient_Type_Enum_in_parent (qt_gsi::mkdefs_QGradient_Type ());
static gsi::ClassExt<QGradient> decl_QGradient_Type_Enum_as_child (decl_QGradient_Type_Enum, "Type");

}

