
/*

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

#ifndef _HDR_gsiDeclQSqlField_Enums
#define _HDR_gsiDeclQSqlField_Enums

#include <QtCore/QFlags>

namespace qt_gsi
{

//  Wrapper class for QFlags<enum QSqlField::RequiredStatus>
class QSqlField_RequiredStatus_Enums : public QFlags<enum QSqlField::RequiredStatus> {
public:
  QSqlField_RequiredStatus_Enums () : m_flags () { }
  QSqlField_RequiredStatus_Enums (enum QSqlField::RequiredStatus v) : m_flags (v) { }
  QSqlField_RequiredStatus_Enums (const QFlags<enum QSqlField::RequiredStatus> &v) : m_flags (v) { }
  QFlags<enum QSqlField::RequiredStatus> flags () const { return m_flags; }
private:
  QFlags<QSqlField::RequiredStatus> m_flags;
};

//  Wrapper class for enum QSqlField::RequiredStatus
class QSqlField_RequiredStatus_Enum : public QSqlField_RequiredStatus_Enums {
public:
  QSqlField_RequiredStatus_Enum () { }
  QSqlField_RequiredStatus_Enum (enum QSqlField::RequiredStatus v) : QSqlField_RequiredStatus_Enums (v) { }
  enum QSqlField::RequiredStatus value () const { return (enum QSqlField::RequiredStatus) flags ().operator int (); }
};

//  Converter for QFlags<enum QSqlField::RequiredStatus>
template <>
struct Converter<QFlags<enum QSqlField::RequiredStatus> >
{
public:
  typedef QFlags<enum QSqlField::RequiredStatus> source_type;
  typedef QSqlField_RequiredStatus_Enums target_type;
  static source_type toq (const target_type &c) { return c.flags (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

//  Converter for enum QSqlField::RequiredStatus
template <>
struct Converter<enum QSqlField::RequiredStatus>
{
public:
  typedef enum QSqlField::RequiredStatus source_type;
  typedef QSqlField_RequiredStatus_Enum target_type;
  static source_type toq (const target_type &c) { return c.value (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

//  Wrapper class for QFlags<enum QVariant::Type>
class QVariant_Type_Enums : public QFlags<enum QVariant::Type> {
public:
  QVariant_Type_Enums () : m_flags () { }
  QVariant_Type_Enums (enum QVariant::Type v) : m_flags (v) { }
  QVariant_Type_Enums (const QFlags<enum QVariant::Type> &v) : m_flags (v) { }
  QFlags<enum QVariant::Type> flags () const { return m_flags; }
private:
  QFlags<QVariant::Type> m_flags;
};

//  Wrapper class for enum QVariant::Type
class QVariant_Type_Enum : public QVariant_Type_Enums {
public:
  QVariant_Type_Enum () { }
  QVariant_Type_Enum (enum QVariant::Type v) : QVariant_Type_Enums (v) { }
  enum QVariant::Type value () const { return (enum QVariant::Type) flags ().operator int (); }
};

//  Converter for QFlags<enum QVariant::Type>
template <>
struct Converter<QFlags<enum QVariant::Type> >
{
public:
  typedef QFlags<enum QVariant::Type> source_type;
  typedef QVariant_Type_Enums target_type;
  static source_type toq (const target_type &c) { return c.flags (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

//  Converter for enum QVariant::Type
template <>
struct Converter<enum QVariant::Type>
{
public:
  typedef enum QVariant::Type source_type;
  typedef QVariant_Type_Enum target_type;
  static source_type toq (const target_type &c) { return c.value (); }
  static target_type toc (const source_type &qc) { return target_type (qc); }
};

}

#endif
