// This file is generated by kconfig_compiler_kf5 from structviewpreferences.kcfg.
// All changes you do to this file will be lost.
#ifndef KASTEN_STRUCTVIEWPREFERENCES_H
#define KASTEN_STRUCTVIEWPREFERENCES_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

#include <QSysInfo>
#include <view/structures/datatypes/datainformationbase.h>
namespace Kasten {

class StructViewPreferences : public KConfigSkeleton
{
  public:

    static StructViewPreferences *self();
    ~StructViewPreferences();

    /**
      Set UnsignedDisplayBase
    */
    static
    void setUnsignedDisplayBase( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "UnsignedDisplayBase" ) ))
        self()->mUnsignedDisplayBase = v;
    }

    /**
      Get UnsignedDisplayBase
    */
    static
    int unsignedDisplayBase()
    {
      return self()->mUnsignedDisplayBase;
    }

    /**
      Get Item object corresponding to UnsignedDisplayBase()
    */
    ItemInt *unsignedDisplayBaseItem()
    {
      return mUnsignedDisplayBaseItem;
    }

    /**
      Set SignedDisplayBase
    */
    static
    void setSignedDisplayBase( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "SignedDisplayBase" ) ))
        self()->mSignedDisplayBase = v;
    }

    /**
      Get SignedDisplayBase
    */
    static
    int signedDisplayBase()
    {
      return self()->mSignedDisplayBase;
    }

    /**
      Get Item object corresponding to SignedDisplayBase()
    */
    ItemInt *signedDisplayBaseItem()
    {
      return mSignedDisplayBaseItem;
    }

    /**
      Set CharDisplayBase
    */
    static
    void setCharDisplayBase( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "CharDisplayBase" ) ))
        self()->mCharDisplayBase = v;
    }

    /**
      Get CharDisplayBase
    */
    static
    int charDisplayBase()
    {
      return self()->mCharDisplayBase;
    }

    /**
      Get Item object corresponding to CharDisplayBase()
    */
    ItemInt *charDisplayBaseItem()
    {
      return mCharDisplayBaseItem;
    }

    /**
      Set ShowCharNumericalValue
    */
    static
    void setShowCharNumericalValue( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowCharNumericalValue" ) ))
        self()->mShowCharNumericalValue = v;
    }

    /**
      Get ShowCharNumericalValue
    */
    static
    bool showCharNumericalValue()
    {
      return self()->mShowCharNumericalValue;
    }

    /**
      Get Item object corresponding to ShowCharNumericalValue()
    */
    ItemBool *showCharNumericalValueItem()
    {
      return mShowCharNumericalValueItem;
    }

    /**
      Set LocaleAwareFloatFormatting
    */
    static
    void setLocaleAwareFloatFormatting( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "LocaleAwareFloatFormatting" ) ))
        self()->mLocaleAwareFloatFormatting = v;
    }

    /**
      Get LocaleAwareFloatFormatting
    */
    static
    bool localeAwareFloatFormatting()
    {
      return self()->mLocaleAwareFloatFormatting;
    }

    /**
      Get Item object corresponding to LocaleAwareFloatFormatting()
    */
    ItemBool *localeAwareFloatFormattingItem()
    {
      return mLocaleAwareFloatFormattingItem;
    }

    /**
      Set ShortTypeNames
    */
    static
    void setShortTypeNames( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShortTypeNames" ) ))
        self()->mShortTypeNames = v;
    }

    /**
      Get ShortTypeNames
    */
    static
    bool shortTypeNames()
    {
      return self()->mShortTypeNames;
    }

    /**
      Get Item object corresponding to ShortTypeNames()
    */
    ItemBool *shortTypeNamesItem()
    {
      return mShortTypeNamesItem;
    }

    /**
      Set LocaleAwareDecimalFormatting
    */
    static
    void setLocaleAwareDecimalFormatting( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "LocaleAwareDecimalFormatting" ) ))
        self()->mLocaleAwareDecimalFormatting = v;
    }

    /**
      Get LocaleAwareDecimalFormatting
    */
    static
    bool localeAwareDecimalFormatting()
    {
      return self()->mLocaleAwareDecimalFormatting;
    }

    /**
      Get Item object corresponding to LocaleAwareDecimalFormatting()
    */
    ItemBool *localeAwareDecimalFormattingItem()
    {
      return mLocaleAwareDecimalFormattingItem;
    }

    /**
      Set FloatPrecision
    */
    static
    void setFloatPrecision( int v )
    {
      if (v < -1)
      {
        qDebug() << "setFloatPrecision: value " << v << " is less than the minimum value of -1";
        v = -1;
      }

      if (v > 100)
      {
        qDebug() << "setFloatPrecision: value " << v << " is greater than the maximum value of 100";
        v = 100;
      }

      if (!self()->isImmutable( QStringLiteral( "FloatPrecision" ) ))
        self()->mFloatPrecision = v;
    }

    /**
      Get FloatPrecision
    */
    static
    int floatPrecision()
    {
      return self()->mFloatPrecision;
    }

    /**
      Get Item object corresponding to FloatPrecision()
    */
    ItemInt *floatPrecisionItem()
    {
      return mFloatPrecisionItem;
    }

    /**
      Set Byte order
    */
    static
    void setByteOrder( QSysInfo::Endian v )
    {
      if (!self()->isImmutable( QStringLiteral( "ByteOrder" ) ))
        self()->mByteOrder = v;
    }

    /**
      Get Byte order
    */
    static
    QSysInfo::Endian byteOrder()
    {
      return static_cast<QSysInfo::Endian>(self()->mByteOrder);
    }

    /**
      Get Item object corresponding to ByteOrder()
    */
    ItemEnum *byteOrderItem()
    {
      return mByteOrderItem;
    }

    /**
      Set LoadedStructures
    */
    static
    void setLoadedStructures( const QStringList & v )
    {
      if (!self()->isImmutable( QStringLiteral( "LoadedStructures" ) ))
        self()->mLoadedStructures = v;
    }

    /**
      Get LoadedStructures
    */
    static
    QStringList loadedStructures()
    {
      return self()->mLoadedStructures;
    }

    /**
      Get Item object corresponding to LoadedStructures()
    */
    ItemStringList *loadedStructuresItem()
    {
      return mLoadedStructuresItem;
    }

  protected:
    StructViewPreferences();
    friend class StructViewPreferencesHelper;


    // ValueDisplay
    int mUnsignedDisplayBase;
    int mSignedDisplayBase;
    int mCharDisplayBase;
    bool mShowCharNumericalValue;
    bool mLocaleAwareFloatFormatting;
    bool mShortTypeNames;
    bool mLocaleAwareDecimalFormatting;
    int mFloatPrecision;

    // StructureSettings
    int mByteOrder;
    QStringList mLoadedStructures;

  private:
    ItemInt *mUnsignedDisplayBaseItem;
    ItemInt *mSignedDisplayBaseItem;
    ItemInt *mCharDisplayBaseItem;
    ItemBool *mShowCharNumericalValueItem;
    ItemBool *mLocaleAwareFloatFormattingItem;
    ItemBool *mShortTypeNamesItem;
    ItemBool *mLocaleAwareDecimalFormattingItem;
    ItemInt *mFloatPrecisionItem;
    ItemEnum *mByteOrderItem;
    ItemStringList *mLoadedStructuresItem;
};

}

#endif

