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

#include "test_dpointer.h"

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

class TestDPointerPrivate
{
  public:

    // General
    bool autoSave;
    int autoSaveInterval;
    bool confirm;
    QString archiveFile;
    int destination;

    // Views
    int hourSize;
    bool selectionStartsEditor;

    // KOrganizer Plugins
    QStringList selectedPlugins;

    // Colors
    QColor highlightColor;
    QColor agendaBgColor;

    // Fonts
    QFont timeBarFont;

    // items
    KConfigSkeleton::ItemBool *autoSaveItem;
    KConfigSkeleton::ItemInt *autoSaveIntervalItem;
    KConfigSkeleton::ItemBool *confirmItem;
    KConfigSkeleton::ItemString *archiveFileItem;
    KConfigSkeleton::ItemEnum *destinationItem;
    KConfigSkeleton::ItemInt *hourSizeItem;
    KConfigSkeleton::ItemBool *selectionStartsEditorItem;
    KConfigSkeleton::ItemStringList *selectedPluginsItem;
    KConfigSkeleton::ItemColor *highlightColorItem;
    KConfigSkeleton::ItemColor *agendaBgColorItem;
    KConfigSkeleton::ItemFont *timeBarFontItem;
};

class TestDPointerHelper
{
  public:
    TestDPointerHelper() : q(nullptr) {}
    ~TestDPointerHelper() { delete q; }
    TestDPointer *q;
};
Q_GLOBAL_STATIC(TestDPointerHelper, s_globalTestDPointer)
TestDPointer *TestDPointer::self()
{
  if (!s_globalTestDPointer()->q) {
    new TestDPointer;
    s_globalTestDPointer()->q->read();
  }

  return s_globalTestDPointer()->q;
}

TestDPointer::TestDPointer(  )
  : KConfigSkeleton( QStringLiteral( "korganizerrc" ) )
{
  d = new TestDPointerPrivate;
  Q_ASSERT(!s_globalTestDPointer()->q);
  s_globalTestDPointer()->q = this;
  setCurrentGroup( QStringLiteral( "General" ) );

  d->autoSaveItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Auto Save" ), d->autoSave, false );
  d->autoSaveItem->setLabel( QCoreApplication::translate("TestDPointer", "Enable automatic saving of calendar") );
  d->autoSaveItem->setWhatsThis( QCoreApplication::translate("TestDPointer", "WhatsThis text for AutoSave option") );
  addItem( d->autoSaveItem, QStringLiteral( "AutoSave" ) );
  d->autoSaveIntervalItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Auto Save Interval" ), d->autoSaveInterval, 10 );
  d->autoSaveIntervalItem->setLabel( QCoreApplication::translate("TestDPointer", "Auto Save Interval") );
  addItem( d->autoSaveIntervalItem, QStringLiteral( "AutoSaveInterval" ) );
  d->confirmItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Confirm Deletes" ), d->confirm, true );
  d->confirmItem->setLabel( QCoreApplication::translate("TestDPointer", "Confirm deletes") );
  addItem( d->confirmItem, QStringLiteral( "Confirm" ) );
  d->archiveFileItem = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "Archive File" ), d->archiveFile );
  d->archiveFileItem->setLabel( QCoreApplication::translate("TestDPointer", "Archive File") );
  addItem( d->archiveFileItem, QStringLiteral( "ArchiveFile" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesDestination;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("standardDestination");
    valuesDestination.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("askDestination");
    valuesDestination.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("argl1");
    choice.label = QCoreApplication::translate("TestDPointer", "Argl1 Label");
    valuesDestination.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("argl2");
    choice.whatsThis = QCoreApplication::translate("TestDPointer", "Argl2 Whatsthis");
    valuesDestination.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("argl3");
    choice.label = QCoreApplication::translate("TestDPointer", "Argl3 Label");
    choice.whatsThis = QCoreApplication::translate("TestDPointer", "Argl3 Whatsthis");
    valuesDestination.append( choice );
  }
  d->destinationItem = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "Destination" ), d->destination, valuesDestination, EnumDestination::standardDestination );
  d->destinationItem->setLabel( QCoreApplication::translate("TestDPointer", "New Events/Todos Should") );
  addItem( d->destinationItem, QStringLiteral( "Destination" ) );

  setCurrentGroup( QStringLiteral( "Views" ) );

  d->hourSizeItem = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "Hour Size" ), d->hourSize, 10 );
  d->hourSizeItem->setLabel( QCoreApplication::translate("TestDPointer", "Hour Size") );
  addItem( d->hourSizeItem, QStringLiteral( "HourSize" ) );
  d->selectionStartsEditorItem = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "SelectionStartsEditor" ), d->selectionStartsEditor, false );
  d->selectionStartsEditorItem->setLabel( QCoreApplication::translate("TestDPointer", "Time range selection in agenda view starts event editor") );
  addItem( d->selectionStartsEditorItem, QStringLiteral( "SelectionStartsEditor" ) );

  setCurrentGroup( QStringLiteral( "KOrganizer Plugins" ) );

  QStringList defaultSelectedPlugins;
  defaultSelectedPlugins.append( QString::fromUtf8( "holidays" ) );
  defaultSelectedPlugins.append( QString::fromUtf8( "webexport" ) );

  d->selectedPluginsItem = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "SelectedPlugins" ), d->selectedPlugins, defaultSelectedPlugins );
  d->selectedPluginsItem->setLabel( QCoreApplication::translate("TestDPointer", "SelectedPlugins") );
  addItem( d->selectedPluginsItem, QStringLiteral( "SelectedPlugins" ) );

  setCurrentGroup( QStringLiteral( "Colors" ) );

  d->highlightColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Highlight Color" ), d->highlightColor, QColor( 100, 100, 255 ) );
  d->highlightColorItem->setLabel( QCoreApplication::translate("TestDPointer", "Highlight color") );
  addItem( d->highlightColorItem, QStringLiteral( "HighlightColor" ) );
  d->agendaBgColorItem = new KConfigSkeleton::ItemColor( currentGroup(), QStringLiteral( "Agenda Background Color" ), d->agendaBgColor, QColor( 255, 255, 255 ) );
  d->agendaBgColorItem->setLabel( QCoreApplication::translate("TestDPointer", "Agenda view background color") );
  addItem( d->agendaBgColorItem, QStringLiteral( "AgendaBgColor" ) );

  setCurrentGroup( QStringLiteral( "Fonts" ) );

  d->timeBarFontItem = new KConfigSkeleton::ItemFont( currentGroup(), QStringLiteral( "TimeBar Font" ), d->timeBarFont );
  d->timeBarFontItem->setLabel( QCoreApplication::translate("TestDPointer", "Time bar") );
  addItem( d->timeBarFontItem, QStringLiteral( "TimeBarFont" ) );
}

void TestDPointer::setAutoSave( bool v )
{
      if (!self()->isImmutable( QStringLiteral( "AutoSave" ) ))
        self()->d->autoSave = v;
}

bool TestDPointer::autoSave()
{
  return self()->d->autoSave;
}


KConfigSkeleton::ItemBool *TestDPointer::autoSaveItem()
{
  return d->autoSaveItem;
}

void TestDPointer::setAutoSaveInterval( int v )
{
      if (!self()->isImmutable( QStringLiteral( "AutoSaveInterval" ) ))
        self()->d->autoSaveInterval = v;
}

int TestDPointer::autoSaveInterval()
{
  return self()->d->autoSaveInterval;
}


KConfigSkeleton::ItemInt *TestDPointer::autoSaveIntervalItem()
{
  return d->autoSaveIntervalItem;
}

void TestDPointer::setConfirm( bool v )
{
      if (!self()->isImmutable( QStringLiteral( "Confirm" ) ))
        self()->d->confirm = v;
}

bool TestDPointer::confirm()
{
  return self()->d->confirm;
}


KConfigSkeleton::ItemBool *TestDPointer::confirmItem()
{
  return d->confirmItem;
}

void TestDPointer::setArchiveFile( const QString & v )
{
      if (!self()->isImmutable( QStringLiteral( "ArchiveFile" ) ))
        self()->d->archiveFile = v;
}

QString TestDPointer::archiveFile()
{
  return self()->d->archiveFile;
}


KConfigSkeleton::ItemString *TestDPointer::archiveFileItem()
{
  return d->archiveFileItem;
}

void TestDPointer::setDestination( int v )
{
      if (!self()->isImmutable( QStringLiteral( "Destination" ) ))
        self()->d->destination = v;
}

int TestDPointer::destination()
{
  return self()->d->destination;
}


KConfigSkeleton::ItemEnum *TestDPointer::destinationItem()
{
  return d->destinationItem;
}

void TestDPointer::setHourSize( int v )
{
      if (!self()->isImmutable( QStringLiteral( "HourSize" ) ))
        self()->d->hourSize = v;
}

int TestDPointer::hourSize()
{
  return self()->d->hourSize;
}


KConfigSkeleton::ItemInt *TestDPointer::hourSizeItem()
{
  return d->hourSizeItem;
}

void TestDPointer::setSelectionStartsEditor( bool v )
{
      if (!self()->isImmutable( QStringLiteral( "SelectionStartsEditor" ) ))
        self()->d->selectionStartsEditor = v;
}

bool TestDPointer::selectionStartsEditor()
{
  return self()->d->selectionStartsEditor;
}


KConfigSkeleton::ItemBool *TestDPointer::selectionStartsEditorItem()
{
  return d->selectionStartsEditorItem;
}

void TestDPointer::setSelectedPlugins( const QStringList & v )
{
      if (!self()->isImmutable( QStringLiteral( "SelectedPlugins" ) ))
        self()->d->selectedPlugins = v;
}

QStringList TestDPointer::selectedPlugins()
{
  return self()->d->selectedPlugins;
}


KConfigSkeleton::ItemStringList *TestDPointer::selectedPluginsItem()
{
  return d->selectedPluginsItem;
}

void TestDPointer::setHighlightColor( const QColor & v )
{
      if (!self()->isImmutable( QStringLiteral( "HighlightColor" ) ))
        self()->d->highlightColor = v;
}

QColor TestDPointer::highlightColor()
{
  return self()->d->highlightColor;
}


KConfigSkeleton::ItemColor *TestDPointer::highlightColorItem()
{
  return d->highlightColorItem;
}

void TestDPointer::setAgendaBgColor( const QColor & v )
{
      if (!self()->isImmutable( QStringLiteral( "AgendaBgColor" ) ))
        self()->d->agendaBgColor = v;
}

QColor TestDPointer::agendaBgColor()
{
  return self()->d->agendaBgColor;
}


KConfigSkeleton::ItemColor *TestDPointer::agendaBgColorItem()
{
  return d->agendaBgColorItem;
}

void TestDPointer::setTimeBarFont( const QFont & v )
{
      if (!self()->isImmutable( QStringLiteral( "TimeBarFont" ) ))
        self()->d->timeBarFont = v;
}

QFont TestDPointer::timeBarFont()
{
  return self()->d->timeBarFont;
}


KConfigSkeleton::ItemFont *TestDPointer::timeBarFontItem()
{
  return d->timeBarFontItem;
}

TestDPointer::~TestDPointer()
{
  delete d;
  s_globalTestDPointer()->q = nullptr;
}