
/*

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

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

// -----------------------------------------------------------------------
// class QTextListFormat

//  Constructor QTextListFormat::QTextListFormat()


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

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

static qt_gsi::GenericStaticMethod *_create_ctor_QTextListFormat_0 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QTextListFormat::QTextListFormat()\nThis method creates an object of class QTextListFormat.", &_init_ctor_QTextListFormat_0, &_call_ctor_QTextListFormat_0);
}

// int QTextListFormat::indent()


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

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

static qt_gsi::GenericMethod *_create_f_indent_c0 ()
{
  return new qt_gsi::GenericMethod (":indent", "@brief Method int QTextListFormat::indent()\n", true, &_init_f_indent_c0, &_call_f_indent_c0);
}

// bool QTextListFormat::isValid()


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

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

static qt_gsi::GenericMethod *_create_f_isValid_c0 ()
{
  return new qt_gsi::GenericMethod ("isValid?", "@brief Method bool QTextListFormat::isValid()\n", true, &_init_f_isValid_c0, &_call_f_isValid_c0);
}

// void QTextListFormat::setIndent(int indent)


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

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

static qt_gsi::GenericMethod *_create_f_setIndent_767 ()
{
  return new qt_gsi::GenericMethod ("setIndent|indent=", "@brief Method void QTextListFormat::setIndent(int indent)\n", false, &_init_f_setIndent_767, &_call_f_setIndent_767);
}

// void QTextListFormat::setStyle(QTextListFormat::Style style)


static void _init_f_setStyle_2612 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("style");
  decl->add_arg<const qt_gsi::Converter<QTextListFormat::Style>::target_type & > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setStyle_2612 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const qt_gsi::Converter<QTextListFormat::Style>::target_type & arg1 = args.read<const qt_gsi::Converter<QTextListFormat::Style>::target_type & > ();
  ((QTextListFormat *)cls)->setStyle (qt_gsi::QtToCppAdaptor<QTextListFormat::Style>(arg1).cref());
}

static qt_gsi::GenericMethod *_create_f_setStyle_2612 ()
{
  return new qt_gsi::GenericMethod ("setStyle|style=", "@brief Method void QTextListFormat::setStyle(QTextListFormat::Style style)\n", false, &_init_f_setStyle_2612, &_call_f_setStyle_2612);
}

// QTextListFormat::Style QTextListFormat::style()


static void _init_f_style_c0 (qt_gsi::GenericMethod *decl)
{
  decl->set_return<qt_gsi::Converter<QTextListFormat::Style>::target_type > ();
}

static void _call_f_style_c0 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<qt_gsi::Converter<QTextListFormat::Style>::target_type > ((qt_gsi::Converter<QTextListFormat::Style>::target_type)qt_gsi::CppToQtAdaptor<QTextListFormat::Style>(((QTextListFormat *)cls)->style ()));
}

static qt_gsi::GenericMethod *_create_f_style_c0 ()
{
  return new qt_gsi::GenericMethod (":style", "@brief Method QTextListFormat::Style QTextListFormat::style()\n", true, &_init_f_style_c0, &_call_f_style_c0);
}


namespace gsi
{
extern gsi::Class<QTextFormat> decl_QTextFormat;

gsi::Class<QTextListFormat> decl_QTextListFormat (decl_QTextFormat, "QTextListFormat",
  gsi::Methods(_create_ctor_QTextListFormat_0 ()) +
  gsi::Methods(_create_f_indent_c0 ()) +
  gsi::Methods(_create_f_isValid_c0 ()) +
  gsi::Methods(_create_f_setIndent_767 ()) +
  gsi::Methods(_create_f_setStyle_2612 ()) +
  gsi::Methods(_create_f_style_c0 ()),
  "@qt\n@brief Binding of QTextListFormat");

}


//  Implementation of the enum wrapper class for QTextListFormat::Style
namespace qt_gsi
{

static QTextListFormat_Style_Enum *c_1_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListDisc); }
static QTextListFormat_Style_Enum *c_2_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListCircle); }
static QTextListFormat_Style_Enum *c_3_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListSquare); }
static QTextListFormat_Style_Enum *c_4_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListDecimal); }
static QTextListFormat_Style_Enum *c_5_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListLowerAlpha); }
static QTextListFormat_Style_Enum *c_6_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListUpperAlpha); }
static QTextListFormat_Style_Enum *c_7_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListLowerRoman); }
static QTextListFormat_Style_Enum *c_8_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListUpperRoman); }
static QTextListFormat_Style_Enum *c_9_QTextListFormat_Style_Enum () { return new QTextListFormat_Style_Enum (QTextListFormat::ListStyleUndefined); }

static gsi::Methods mkdefs_QTextListFormat_Style () {
  return
    gsi::constant ("ListDisc", &qt_gsi::c_1_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListDisc") +
    gsi::constant ("ListCircle", &qt_gsi::c_2_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListCircle") +
    gsi::constant ("ListSquare", &qt_gsi::c_3_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListSquare") +
    gsi::constant ("ListDecimal", &qt_gsi::c_4_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListDecimal") +
    gsi::constant ("ListLowerAlpha", &qt_gsi::c_5_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListLowerAlpha") +
    gsi::constant ("ListUpperAlpha", &qt_gsi::c_6_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListUpperAlpha") +
    gsi::constant ("ListLowerRoman", &qt_gsi::c_7_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListLowerRoman") +
    gsi::constant ("ListUpperRoman", &qt_gsi::c_8_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListUpperRoman") +
    gsi::constant ("ListStyleUndefined", &qt_gsi::c_9_QTextListFormat_Style_Enum, "@brief Enum constant QTextListFormat::ListStyleUndefined");
}

static std::string to_s_QTextListFormat_Style_Enum (const QTextListFormat_Style_Enum *e)
{
  if (e->value () == QTextListFormat::ListDisc) { return tl::sprintf ("ListDisc (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListCircle) { return tl::sprintf ("ListCircle (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListSquare) { return tl::sprintf ("ListSquare (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListDecimal) { return tl::sprintf ("ListDecimal (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListLowerAlpha) { return tl::sprintf ("ListLowerAlpha (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListUpperAlpha) { return tl::sprintf ("ListUpperAlpha (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListLowerRoman) { return tl::sprintf ("ListLowerRoman (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListUpperRoman) { return tl::sprintf ("ListUpperRoman (%u)", (unsigned int) e->value ()); }
  if (e->value () == QTextListFormat::ListStyleUndefined) { return tl::sprintf ("ListStyleUndefined (%u)", (unsigned int) e->value ()); }
  return std::string ("(not a valid enum evalue)");
}

static unsigned int to_i_QTextListFormat_Style_Enum (const QTextListFormat_Style_Enum *e)
{
  return (unsigned int) e->value ();
}

static QTextListFormat_Style_Enum *from_i_QTextListFormat_Style_Enum (unsigned int i)
{
  return new QTextListFormat_Style_Enum ((QTextListFormat::Style) i);
}

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

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

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

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

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

static std::string to_s_QTextListFormat_Style_Enums (const QTextListFormat_Style_Enums *e)
{
  std::string l;
  if (e->testFlag (QTextListFormat::ListDisc)) { if (!l.empty ()) l += "|"; l += "ListDisc"; }
  if (e->testFlag (QTextListFormat::ListCircle)) { if (!l.empty ()) l += "|"; l += "ListCircle"; }
  if (e->testFlag (QTextListFormat::ListSquare)) { if (!l.empty ()) l += "|"; l += "ListSquare"; }
  if (e->testFlag (QTextListFormat::ListDecimal)) { if (!l.empty ()) l += "|"; l += "ListDecimal"; }
  if (e->testFlag (QTextListFormat::ListLowerAlpha)) { if (!l.empty ()) l += "|"; l += "ListLowerAlpha"; }
  if (e->testFlag (QTextListFormat::ListUpperAlpha)) { if (!l.empty ()) l += "|"; l += "ListUpperAlpha"; }
  if (e->testFlag (QTextListFormat::ListLowerRoman)) { if (!l.empty ()) l += "|"; l += "ListLowerRoman"; }
  if (e->testFlag (QTextListFormat::ListUpperRoman)) { if (!l.empty ()) l += "|"; l += "ListUpperRoman"; }
  if (e->testFlag (QTextListFormat::ListStyleUndefined)) { if (!l.empty ()) l += "|"; l += "ListStyleUndefined"; }
  return tl::sprintf ("%u (%s)", (unsigned int) (e->flags ()), l);
}

static int to_i_QTextListFormat_Style_Enums (const QTextListFormat_Style_Enums *e)
{
  return int (e->flags ());
}

static bool testFlag_QTextListFormat_Style_Enums (const QTextListFormat_Style_Enums *e, const QTextListFormat_Style_Enum &d)
{
  return e->flags ().testFlag (d.value ());
}

}

namespace gsi
{

//  Declarations for QFlags<enum> wrapper class
gsi::Class<qt_gsi::QTextListFormat_Style_Enums> decl_QTextListFormat_Style_Enums ("QTextListFormat_QFlags_Style",
  gsi::method_ext ("|", &qt_gsi::oropQTextListFormat_Style_Enums, gsi::arg ("other"), "@brief 'or' operator between two flag sets") +
  gsi::method_ext ("&", &qt_gsi::andopQTextListFormat_Style_Enums, gsi::arg ("other"), "@brief 'and' operator between two flag sets") +
  gsi::method_ext ("^", &qt_gsi::xoropQTextListFormat_Style_Enums, gsi::arg ("other"), "@brief 'xor' operator between two flag sets") +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QTextListFormat_Style_Enums, "@brief Converts the flag set to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QTextListFormat_Style_Enums, "@brief Returns the integer value encoding the flag set") +
  gsi::method_ext ("testFlag", &qt_gsi::testFlag_QTextListFormat_Style_Enums, gsi::arg ("flag"), "@brief Tests whether the flag is contained in the flag set"),
  "@qt\n@brief This class represents the QFlags<QTextListFormat::Style> flag set");

//  Declarations for enum wrapper class
gsi::Class<qt_gsi::QTextListFormat_Style_Enum> decl_QTextListFormat_Style_Enum (decl_QTextListFormat_Style_Enums, "QTextListFormat_Style",
  qt_gsi::mkdefs_QTextListFormat_Style () +
  gsi::method_ext ("to_s|inspect", &qt_gsi::to_s_QTextListFormat_Style_Enum, "@brief Converts the enum class to a string") +
  gsi::method_ext ("to_i", &qt_gsi::to_i_QTextListFormat_Style_Enum, "@brief Converts the enum class to an integer") +
  gsi::method_ext ("==", &qt_gsi::equalQTextListFormat_Style_Enum, gsi::arg ("other"), "@brief Compares the enum class against an enum of it's own type") +
  gsi::method_ext ("==", &qt_gsi::equal2QTextListFormat_Style_Enum, gsi::arg ("other"), "@brief Compares the enum class against an integer") +
  gsi::constructor ("new", &qt_gsi::from_i_QTextListFormat_Style_Enum, gsi::arg ("value"), "@brief Creates the enum object from an integer"),
  "@qt\n@brief This class represents the QTextListFormat::Style enum");

//  Inject the declarations into the parent
static gsi::ClassExt<QTextListFormat> inject_QTextListFormat_Style_Enum_in_parent (qt_gsi::mkdefs_QTextListFormat_Style ());
static gsi::ClassExt<QTextListFormat> decl_QTextListFormat_Style_Enum_as_child (decl_QTextListFormat_Style_Enum, "Style");

}

