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

#include "LayoutSettings.h"

#include <qglobal.h>
#include <QFile>

class LayoutSettingsHelper
{
  public:
    LayoutSettingsHelper() : q(nullptr) {}
    ~LayoutSettingsHelper() { delete q; q = nullptr; }
    LayoutSettingsHelper(const LayoutSettingsHelper&) = delete;
    LayoutSettingsHelper& operator=(const LayoutSettingsHelper&) = delete;
    LayoutSettings *q;
};
Q_GLOBAL_STATIC(LayoutSettingsHelper, s_globalLayoutSettings)
LayoutSettings *LayoutSettings::self()
{
  if (!s_globalLayoutSettings()->q) {
    new LayoutSettings;
    s_globalLayoutSettings()->q->read();
  }

  return s_globalLayoutSettings()->q;
}

LayoutSettings::LayoutSettings( )
  : KConfigSkeleton( QStringLiteral( "device_automounter_kcmrc" ) )
{
  Q_ASSERT(!s_globalLayoutSettings()->q);
  s_globalLayoutSettings()->q = this;
  setCurrentGroup( QStringLiteral( "Layout" ) );

  QList<int> defaultHeaderWidths;

  KConfigSkeleton::ItemIntList  *itemHeaderWidths;
  itemHeaderWidths = new KConfigSkeleton::ItemIntList( currentGroup(), QStringLiteral( "HeaderWidths" ), mHeaderWidths, defaultHeaderWidths );
  addItem( itemHeaderWidths, QStringLiteral( "HeaderWidths" ) );
  KConfigSkeleton::ItemBool  *itemAttachedExpanded;
  itemAttachedExpanded = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "AttachedExpanded" ), mAttachedExpanded, true );
  addItem( itemAttachedExpanded, QStringLiteral( "AttachedExpanded" ) );
  KConfigSkeleton::ItemBool  *itemDetachedExpanded;
  itemDetachedExpanded = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "DetachedExpanded" ), mDetachedExpanded, false );
  addItem( itemDetachedExpanded, QStringLiteral( "DetachedExpanded" ) );
}

LayoutSettings::~LayoutSettings()
{
  if (s_globalLayoutSettings.exists() && !s_globalLayoutSettings.isDestroyed()) {
    s_globalLayoutSettings()->q = nullptr;
  }
}

