// This file is generated by kconfig_compiler_kf5 from formatssettings.kcfg.
// All changes you do to this file will be lost.

#include "formatssettings.h"

FormatsSettings::FormatsSettings( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "plasma-localerc" ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&FormatsSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "Formats" ) );

  KConfigCompilerSignallingItem  *itemUseDetailed;
  KConfigSkeleton::ItemBool  *innerItemUseDetailed;
  innerItemUseDetailed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "useDetailed" ), mUseDetailed, false );
  itemUseDetailed = new KConfigCompilerSignallingItem(innerItemUseDetailed, this, notifyFunction, signalUseDetailedChanged);
  addItem( itemUseDetailed, QStringLiteral( "useDetailed" ) );
  KConfigCompilerSignallingItem  *itemLang;
  KConfigSkeleton::ItemString  *innerItemLang;
  innerItemLang = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LANG" ), mLang, QString::fromLocal8Bit(qgetenv("LANG")) );
  itemLang = new KConfigCompilerSignallingItem(innerItemLang, this, notifyFunction, signalLangChanged);
  addItem( itemLang, QStringLiteral( "lang" ) );

            auto lc_numeric {QString::fromLocal8Bit(qgetenv("LC_NUMERIC"))};
            lc_numeric = lc_numeric.isEmpty() ? i18n("Default") : lc_numeric;
        
  KConfigCompilerSignallingItem  *itemNumeric;
  KConfigSkeleton::ItemString  *innerItemNumeric;
  innerItemNumeric = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LC_NUMERIC" ), mNumeric, 
            lc_numeric
         );
  itemNumeric = new KConfigCompilerSignallingItem(innerItemNumeric, this, notifyFunction, signalNumericChanged);
  addItem( itemNumeric, QStringLiteral( "numeric" ) );

            auto lc_time {QString::fromLocal8Bit(qgetenv("LC_TIME"))};
            lc_time = lc_time.isEmpty() ? i18n("Default") : lc_time;
        
  KConfigCompilerSignallingItem  *itemTime;
  KConfigSkeleton::ItemString  *innerItemTime;
  innerItemTime = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LC_TIME" ), mTime, lc_time );
  itemTime = new KConfigCompilerSignallingItem(innerItemTime, this, notifyFunction, signalTimeChanged);
  addItem( itemTime, QStringLiteral( "time" ) );

            auto lc_monetary {QString::fromLocal8Bit(qgetenv("LC_MONETARY"))};
            lc_monetary = lc_monetary.isEmpty() ? i18n("Default") : lc_monetary;
        
  KConfigCompilerSignallingItem  *itemMonetary;
  KConfigSkeleton::ItemString  *innerItemMonetary;
  innerItemMonetary = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LC_MONETARY" ), mMonetary, lc_monetary );
  itemMonetary = new KConfigCompilerSignallingItem(innerItemMonetary, this, notifyFunction, signalMonetaryChanged);
  addItem( itemMonetary, QStringLiteral( "monetary" ) );

            auto lc_measurement {QString::fromLocal8Bit(qgetenv("LC_MEASUREMENT"))};
            lc_measurement = lc_measurement.isEmpty() ? i18n("Default") : lc_measurement;
        
  KConfigCompilerSignallingItem  *itemMeasurement;
  KConfigSkeleton::ItemString  *innerItemMeasurement;
  innerItemMeasurement = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LC_MEASUREMENT" ), mMeasurement, lc_measurement );
  itemMeasurement = new KConfigCompilerSignallingItem(innerItemMeasurement, this, notifyFunction, signalMeasurementChanged);
  addItem( itemMeasurement, QStringLiteral( "measurement" ) );

            auto lc_ctype {QString::fromLocal8Bit(qgetenv("LC_CTYPE"))};
            lc_ctype = lc_ctype.isEmpty() ? i18n("Default") : lc_ctype;
        
  KConfigCompilerSignallingItem  *itemCtype;
  KConfigSkeleton::ItemString  *innerItemCtype;
  innerItemCtype = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LC_CTYPE" ), mCtype, lc_ctype );
  itemCtype = new KConfigCompilerSignallingItem(innerItemCtype, this, notifyFunction, signalCtypeChanged);
  addItem( itemCtype, QStringLiteral( "ctype" ) );

            auto language {QString::fromLocal8Bit(qgetenv("LANGUAGE"))};
            language = language.isEmpty() ? i18n("Default") : language;
        
  KConfigCompilerSignallingItem  *itemLanguage;
  KConfigSkeleton::ItemString  *innerItemLanguage;
  innerItemLanguage = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "LANGUAGE" ), mLanguage, language );
  itemLanguage = new KConfigCompilerSignallingItem(innerItemLanguage, this, notifyFunction, signalLanguageChanged);
  addItem( itemLanguage, QStringLiteral( "language" ) );
}

bool FormatsSettings::defaultUseDetailedValue_helper() const
{

  return false;
}

QString FormatsSettings::defaultLangValue_helper() const
{

  return QString::fromLocal8Bit(qgetenv("LANG"));
}

QString FormatsSettings::defaultNumericValue_helper() const
{

            auto lc_numeric {QString::fromLocal8Bit(qgetenv("LC_NUMERIC"))};
            lc_numeric = lc_numeric.isEmpty() ? i18n("Default") : lc_numeric;
        
  return 
            lc_numeric
        ;
}

QString FormatsSettings::defaultTimeValue_helper() const
{

            auto lc_time {QString::fromLocal8Bit(qgetenv("LC_TIME"))};
            lc_time = lc_time.isEmpty() ? i18n("Default") : lc_time;
        
  return lc_time;
}

QString FormatsSettings::defaultMonetaryValue_helper() const
{

            auto lc_monetary {QString::fromLocal8Bit(qgetenv("LC_MONETARY"))};
            lc_monetary = lc_monetary.isEmpty() ? i18n("Default") : lc_monetary;
        
  return lc_monetary;
}

QString FormatsSettings::defaultMeasurementValue_helper() const
{

            auto lc_measurement {QString::fromLocal8Bit(qgetenv("LC_MEASUREMENT"))};
            lc_measurement = lc_measurement.isEmpty() ? i18n("Default") : lc_measurement;
        
  return lc_measurement;
}

QString FormatsSettings::defaultCtypeValue_helper() const
{

            auto lc_ctype {QString::fromLocal8Bit(qgetenv("LC_CTYPE"))};
            lc_ctype = lc_ctype.isEmpty() ? i18n("Default") : lc_ctype;
        
  return lc_ctype;
}

QString FormatsSettings::defaultLanguageValue_helper() const
{

            auto language {QString::fromLocal8Bit(qgetenv("LANGUAGE"))};
            language = language.isEmpty() ? i18n("Default") : language;
        
  return language;
}

FormatsSettings::~FormatsSettings()
{
}


void FormatsSettings::itemChanged(quint64 flags) {

  if ( flags & signalUseDetailedChanged ) {
    Q_EMIT useDetailedChanged();
  }
  if ( flags & signalLangChanged ) {
    Q_EMIT langChanged();
  }
  if ( flags & signalNumericChanged ) {
    Q_EMIT numericChanged();
  }
  if ( flags & signalTimeChanged ) {
    Q_EMIT timeChanged();
  }
  if ( flags & signalMonetaryChanged ) {
    Q_EMIT monetaryChanged();
  }
  if ( flags & signalMeasurementChanged ) {
    Q_EMIT measurementChanged();
  }
  if ( flags & signalCtypeChanged ) {
    Q_EMIT ctypeChanged();
  }
  if ( flags & signalLanguageChanged ) {
    Q_EMIT languageChanged();
  }
}

#include "formatssettings.moc"

