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

#include "notesharedglobalconfig.h"

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

using namespace NoteShared;

namespace NoteShared {

class NoteSharedGlobalConfigHelper
{
  public:
    NoteSharedGlobalConfigHelper() : q(nullptr) {}
    ~NoteSharedGlobalConfigHelper() { delete q; q = nullptr; }
    NoteSharedGlobalConfigHelper(const NoteSharedGlobalConfigHelper&) = delete;
    NoteSharedGlobalConfigHelper& operator=(const NoteSharedGlobalConfigHelper&) = delete;
    NoteSharedGlobalConfig *q;
};

}
Q_GLOBAL_STATIC(NoteSharedGlobalConfigHelper, s_globalNoteSharedGlobalConfig)
NoteSharedGlobalConfig *NoteSharedGlobalConfig::self()
{
  if (!s_globalNoteSharedGlobalConfig()->q) {
    new NoteSharedGlobalConfig;
    s_globalNoteSharedGlobalConfig()->q->read();
  }

  return s_globalNoteSharedGlobalConfig()->q;
}

NoteSharedGlobalConfig::NoteSharedGlobalConfig( )
  : KConfigSkeleton( QStringLiteral( "globalnotesettings" ) )
{
  Q_ASSERT(!s_globalNoteSharedGlobalConfig()->q);
  s_globalNoteSharedGlobalConfig()->q = this;
  setCurrentGroup( QStringLiteral( "Note" ) );

  KConfigSkeleton::ItemString  *itemDefaultTitle;
  itemDefaultTitle = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "DefaultTitle" ), mDefaultTitle, QStringLiteral( "%d %t" ) );
  addItem( itemDefaultTitle, QStringLiteral( "DefaultTitle" ) );

  setCurrentGroup( QStringLiteral( "SelectNoteFolder" ) );

  KConfigSkeleton::ItemLongLong  *itemDefaultFolder;
  itemDefaultFolder = new KConfigSkeleton::ItemLongLong( currentGroup(), QStringLiteral( "DefaultFolder" ), mDefaultFolder, -1 );
  addItem( itemDefaultFolder, QStringLiteral( "DefaultFolder" ) );

  setCurrentGroup( QStringLiteral( "Actions" ) );

  KConfigSkeleton::ItemString  *itemMailAction;
  itemMailAction = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "MailAction" ), mMailAction, QStringLiteral( "kmail --subject %t --body %f" ) );
  addItem( itemMailAction, QStringLiteral( "MailAction" ) );

  setCurrentGroup( QStringLiteral( "Alarms" ) );

  KConfigSkeleton::ItemUInt  *itemCheckInterval;
  itemCheckInterval = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "CheckInterval" ), mCheckInterval, 60 );
  addItem( itemCheckInterval, QStringLiteral( "CheckInterval" ) );
  KConfigSkeleton::ItemDateTime  *itemAlarmsLastChecked;
  itemAlarmsLastChecked = new KConfigSkeleton::ItemDateTime( currentGroup(), QStringLiteral( "AlarmsLastChecked" ), mAlarmsLastChecked );
  addItem( itemAlarmsLastChecked, QStringLiteral( "AlarmsLastChecked" ) );

  setCurrentGroup( QStringLiteral( "Network" ) );

  KConfigSkeleton::ItemBool  *itemReceiveNotes;
  itemReceiveNotes = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ReceiveNotes" ), mReceiveNotes, false );
  addItem( itemReceiveNotes, QStringLiteral( "ReceiveNotes" ) );
  KConfigSkeleton::ItemUInt  *itemPort;
  itemPort = new KConfigSkeleton::ItemUInt( currentGroup(), QStringLiteral( "Port" ), mPort, 24837 );
  addItem( itemPort, QStringLiteral( "Port" ) );
  KConfigSkeleton::ItemString  *itemSenderID;
  itemSenderID = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "SenderID" ), mSenderID );
  addItem( itemSenderID, QStringLiteral( "SenderID" ) );
  KConfigSkeleton::ItemStringList  *itemKnownHosts;
  itemKnownHosts = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "KnownHosts" ), mKnownHosts );
  addItem( itemKnownHosts, QStringLiteral( "KnownHosts" ) );
  KConfigSkeleton::ItemSize  *itemNoteHostDialogSize;
  itemNoteHostDialogSize = new KConfigSkeleton::ItemSize( currentGroup(), QStringLiteral( "NoteHostDialogSize" ), mNoteHostDialogSize );
  addItem( itemNoteHostDialogSize, QStringLiteral( "NoteHostDialogSize" ) );
}

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

