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

#include "kalendarconfig.h"

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

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

  return s_globalKalendarConfig()->q;
}

KalendarConfig::KalendarConfig( QObject *parent )
  : KConfigSkeleton( QStringLiteral( "kalendarrc" ) )
{
  setParent(parent);
  Q_ASSERT(!s_globalKalendarConfig()->q);
  s_globalKalendarConfig()->q = this;
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&KalendarConfig::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemShowMenubar;
  KConfigSkeleton::ItemBool  *innerItemShowMenubar;
  innerItemShowMenubar = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showMenubar" ), mShowMenubar, false );
  itemShowMenubar = new KConfigCompilerSignallingItem(innerItemShowMenubar, this, notifyFunction, signalShowMenubarChanged);
  addItem( itemShowMenubar, QStringLiteral( "showMenubar" ) );
  KConfigCompilerSignallingItem  *itemForceCollapsedMainDrawer;
  KConfigSkeleton::ItemBool  *innerItemForceCollapsedMainDrawer;
  innerItemForceCollapsedMainDrawer = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "forceCollapsedMainDrawer" ), mForceCollapsedMainDrawer, false );
  itemForceCollapsedMainDrawer = new KConfigCompilerSignallingItem(innerItemForceCollapsedMainDrawer, this, notifyFunction, signalForceCollapsedMainDrawerChanged);
  addItem( itemForceCollapsedMainDrawer, QStringLiteral( "forceCollapsedMainDrawer" ) );
  KConfigCompilerSignallingItem  *itemEnableMaps;
  KConfigSkeleton::ItemBool  *innerItemEnableMaps;
  innerItemEnableMaps = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "enableMaps" ), mEnableMaps, false );
  itemEnableMaps = new KConfigCompilerSignallingItem(innerItemEnableMaps, this, notifyFunction, signalEnableMapsChanged);
  addItem( itemEnableMaps, QStringLiteral( "enableMaps" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valueslocationMarker;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Circle");
    valueslocationMarker.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Pin");
    valueslocationMarker.append( choice );
  }
  KConfigCompilerSignallingItem  *itemLocationMarker;
  KConfigSkeleton::ItemEnum  *innerItemLocationMarker;
  innerItemLocationMarker = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "locationMarker" ), mLocationMarker, valueslocationMarker, Pin );
  itemLocationMarker = new KConfigCompilerSignallingItem(innerItemLocationMarker, this, notifyFunction, signalLocationMarkerChanged);
  addItem( itemLocationMarker, QStringLiteral( "locationMarker" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valueslastOpenedView;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("MonthView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ScheduleView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("TodoView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("WeekView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ThreeDayView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("DayView");
    valueslastOpenedView.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("ContactView");
    valueslastOpenedView.append( choice );
  }
  KConfigCompilerSignallingItem  *itemLastOpenedView;
  KConfigSkeleton::ItemEnum  *innerItemLastOpenedView;
  innerItemLastOpenedView = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "lastOpenedView" ), mLastOpenedView, valueslastOpenedView, ScheduleView );
  itemLastOpenedView = new KConfigCompilerSignallingItem(innerItemLastOpenedView, this, notifyFunction, signalLastOpenedViewChanged);
  addItem( itemLastOpenedView, QStringLiteral( "lastOpenedView" ) );
  KConfigCompilerSignallingItem  *itemIncidenceInfoDrawerDrawerWidth;
  KConfigSkeleton::ItemInt  *innerItemIncidenceInfoDrawerDrawerWidth;
  innerItemIncidenceInfoDrawerDrawerWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "incidenceInfoDrawerDrawerWidth" ), mIncidenceInfoDrawerDrawerWidth, -1 );
  itemIncidenceInfoDrawerDrawerWidth = new KConfigCompilerSignallingItem(innerItemIncidenceInfoDrawerDrawerWidth, this, notifyFunction, signalIncidenceInfoDrawerDrawerWidthChanged);
  addItem( itemIncidenceInfoDrawerDrawerWidth, QStringLiteral( "incidenceInfoDrawerDrawerWidth" ) );

  setCurrentGroup( QStringLiteral( "MainDrawer" ) );

  KConfigCompilerSignallingItem  *itemTagsSectionExpanded;
  KConfigSkeleton::ItemBool  *innerItemTagsSectionExpanded;
  innerItemTagsSectionExpanded = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "tagsSectionExpanded" ), mTagsSectionExpanded, true );
  itemTagsSectionExpanded = new KConfigCompilerSignallingItem(innerItemTagsSectionExpanded, this, notifyFunction, signalTagsSectionExpandedChanged);
  addItem( itemTagsSectionExpanded, QStringLiteral( "tagsSectionExpanded" ) );
  KConfigCompilerSignallingItem  *itemCalendarsSectionExpanded;
  KConfigSkeleton::ItemBool  *innerItemCalendarsSectionExpanded;
  innerItemCalendarsSectionExpanded = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "calendarsSectionExpanded" ), mCalendarsSectionExpanded, true );
  itemCalendarsSectionExpanded = new KConfigCompilerSignallingItem(innerItemCalendarsSectionExpanded, this, notifyFunction, signalCalendarsSectionExpandedChanged);
  addItem( itemCalendarsSectionExpanded, QStringLiteral( "calendarsSectionExpanded" ) );

  setCurrentGroup( QStringLiteral( "Editor" ) );

  KConfigCompilerSignallingItem  *itemLastUsedEventCollection;
  KConfigSkeleton::ItemInt  *innerItemLastUsedEventCollection;
  innerItemLastUsedEventCollection = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "lastUsedEventCollection" ), mLastUsedEventCollection, -1 );
  itemLastUsedEventCollection = new KConfigCompilerSignallingItem(innerItemLastUsedEventCollection, this, notifyFunction, signalLastUsedEventCollectionChanged);
  addItem( itemLastUsedEventCollection, QStringLiteral( "lastUsedEventCollection" ) );
  KConfigCompilerSignallingItem  *itemLastUsedTodoCollection;
  KConfigSkeleton::ItemInt  *innerItemLastUsedTodoCollection;
  innerItemLastUsedTodoCollection = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "lastUsedTodoCollection" ), mLastUsedTodoCollection, -1 );
  itemLastUsedTodoCollection = new KConfigCompilerSignallingItem(innerItemLastUsedTodoCollection, this, notifyFunction, signalLastUsedTodoCollectionChanged);
  addItem( itemLastUsedTodoCollection, QStringLiteral( "lastUsedTodoCollection" ) );

  setCurrentGroup( QStringLiteral( "GeneralView" ) );

  KConfigCompilerSignallingItem  *itemShowSubtodosInCalendarViews;
  KConfigSkeleton::ItemBool  *innerItemShowSubtodosInCalendarViews;
  innerItemShowSubtodosInCalendarViews = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showSubtodosInCalendarViews" ), mShowSubtodosInCalendarViews, true );
  itemShowSubtodosInCalendarViews = new KConfigCompilerSignallingItem(innerItemShowSubtodosInCalendarViews, this, notifyFunction, signalShowSubtodosInCalendarViewsChanged);
  addItem( itemShowSubtodosInCalendarViews, QStringLiteral( "showSubtodosInCalendarViews" ) );

  setCurrentGroup( QStringLiteral( "MonthView" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuesweekdayLabelAlignment;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Left");
    valuesweekdayLabelAlignment.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Center");
    valuesweekdayLabelAlignment.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Right");
    valuesweekdayLabelAlignment.append( choice );
  }
  KConfigCompilerSignallingItem  *itemWeekdayLabelAlignment;
  KConfigSkeleton::ItemEnum  *innerItemWeekdayLabelAlignment;
  innerItemWeekdayLabelAlignment = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "weekdayLabelAlignment" ), mWeekdayLabelAlignment, valuesweekdayLabelAlignment, Right );
  itemWeekdayLabelAlignment = new KConfigCompilerSignallingItem(innerItemWeekdayLabelAlignment, this, notifyFunction, signalWeekdayLabelAlignmentChanged);
  addItem( itemWeekdayLabelAlignment, QStringLiteral( "weekdayLabelAlignment" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesweekdayLabelLength;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Full");
    valuesweekdayLabelLength.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Abbreviated");
    valuesweekdayLabelLength.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Letter");
    valuesweekdayLabelLength.append( choice );
  }
  KConfigCompilerSignallingItem  *itemWeekdayLabelLength;
  KConfigSkeleton::ItemEnum  *innerItemWeekdayLabelLength;
  innerItemWeekdayLabelLength = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "weekdayLabelLength" ), mWeekdayLabelLength, valuesweekdayLabelLength, Full );
  itemWeekdayLabelLength = new KConfigCompilerSignallingItem(innerItemWeekdayLabelLength, this, notifyFunction, signalWeekdayLabelLengthChanged);
  addItem( itemWeekdayLabelLength, QStringLiteral( "weekdayLabelLength" ) );
  KConfigCompilerSignallingItem  *itemShowWeekNumbers;
  KConfigSkeleton::ItemBool  *innerItemShowWeekNumbers;
  innerItemShowWeekNumbers = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showWeekNumbers" ), mShowWeekNumbers, false );
  itemShowWeekNumbers = new KConfigCompilerSignallingItem(innerItemShowWeekNumbers, this, notifyFunction, signalShowWeekNumbersChanged);
  addItem( itemShowWeekNumbers, QStringLiteral( "showWeekNumbers" ) );
  KConfigCompilerSignallingItem  *itemMonthGridBorderWidth;
  KConfigSkeleton::ItemInt  *innerItemMonthGridBorderWidth;
  innerItemMonthGridBorderWidth = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "monthGridBorderWidth" ), mMonthGridBorderWidth, 1 );
  itemMonthGridBorderWidth = new KConfigCompilerSignallingItem(innerItemMonthGridBorderWidth, this, notifyFunction, signalMonthGridBorderWidthChanged);
  addItem( itemMonthGridBorderWidth, QStringLiteral( "monthGridBorderWidth" ) );

  setCurrentGroup( QStringLiteral( "WeekView" ) );

  KConfigCompilerSignallingItem  *itemWeekViewAllDayHeaderHeight;
  KConfigSkeleton::ItemInt  *innerItemWeekViewAllDayHeaderHeight;
  innerItemWeekViewAllDayHeaderHeight = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "weekViewAllDayHeaderHeight" ), mWeekViewAllDayHeaderHeight, -1 );
  itemWeekViewAllDayHeaderHeight = new KConfigCompilerSignallingItem(innerItemWeekViewAllDayHeaderHeight, this, notifyFunction, signalWeekViewAllDayHeaderHeightChanged);
  addItem( itemWeekViewAllDayHeaderHeight, QStringLiteral( "weekViewAllDayHeaderHeight" ) );

  setCurrentGroup( QStringLiteral( "ScheduleView" ) );

  KConfigCompilerSignallingItem  *itemShowWeekHeaders;
  KConfigSkeleton::ItemBool  *innerItemShowWeekHeaders;
  innerItemShowWeekHeaders = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showWeekHeaders" ), mShowWeekHeaders, true );
  itemShowWeekHeaders = new KConfigCompilerSignallingItem(innerItemShowWeekHeaders, this, notifyFunction, signalShowWeekHeadersChanged);
  addItem( itemShowWeekHeaders, QStringLiteral( "showWeekHeaders" ) );

  setCurrentGroup( QStringLiteral( "TaskView" ) );

  QList<KConfigSkeleton::ItemEnum::Choice> valuessort;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("DueTime");
    valuessort.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Alphabetically");
    valuessort.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("Priority");
    valuessort.append( choice );
  }
  KConfigCompilerSignallingItem  *itemSort;
  KConfigSkeleton::ItemEnum  *innerItemSort;
  innerItemSort = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "sort" ), mSort, valuessort, DueTime );
  itemSort = new KConfigCompilerSignallingItem(innerItemSort, this, notifyFunction, signalSortChanged);
  addItem( itemSort, QStringLiteral( "sort" ) );
  KConfigCompilerSignallingItem  *itemAscendingOrder;
  KConfigSkeleton::ItemBool  *innerItemAscendingOrder;
  innerItemAscendingOrder = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "ascendingOrder" ), mAscendingOrder, true );
  itemAscendingOrder = new KConfigCompilerSignallingItem(innerItemAscendingOrder, this, notifyFunction, signalAscendingOrderChanged);
  addItem( itemAscendingOrder, QStringLiteral( "ascendingOrder" ) );
  KConfigCompilerSignallingItem  *itemShowCompletedSubtodos;
  KConfigSkeleton::ItemBool  *innerItemShowCompletedSubtodos;
  innerItemShowCompletedSubtodos = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "showCompletedSubtodos" ), mShowCompletedSubtodos, true );
  itemShowCompletedSubtodos = new KConfigCompilerSignallingItem(innerItemShowCompletedSubtodos, this, notifyFunction, signalShowCompletedSubtodosChanged);
  addItem( itemShowCompletedSubtodos, QStringLiteral( "showCompletedSubtodos" ) );
  KConfigCompilerSignallingItem  *itemPastEventsTransparencyLevel;
  KConfigSkeleton::ItemDouble  *innerItemPastEventsTransparencyLevel;
  innerItemPastEventsTransparencyLevel = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "pastEventsTransparencyLevel" ), mPastEventsTransparencyLevel, 0 );
  itemPastEventsTransparencyLevel = new KConfigCompilerSignallingItem(innerItemPastEventsTransparencyLevel, this, notifyFunction, signalPastEventsTransparencyLevelChanged);
  addItem( itemPastEventsTransparencyLevel, QStringLiteral( "pastEventsTransparencyLevel" ) );
}

bool KalendarConfig::defaultShowMenubarValue_helper()
{

  return false;
}

bool KalendarConfig::defaultForceCollapsedMainDrawerValue_helper()
{

  return false;
}

bool KalendarConfig::defaultEnableMapsValue_helper()
{

  return false;
}

int KalendarConfig::defaultLocationMarkerValue_helper()
{

  return Pin;
}

int KalendarConfig::defaultLastOpenedViewValue_helper()
{

  return ScheduleView;
}

int KalendarConfig::defaultIncidenceInfoDrawerDrawerWidthValue_helper()
{

  return -1;
}

bool KalendarConfig::defaultTagsSectionExpandedValue_helper()
{

  return true;
}

bool KalendarConfig::defaultCalendarsSectionExpandedValue_helper()
{

  return true;
}

int KalendarConfig::defaultLastUsedEventCollectionValue_helper()
{

  return -1;
}

int KalendarConfig::defaultLastUsedTodoCollectionValue_helper()
{

  return -1;
}

bool KalendarConfig::defaultShowSubtodosInCalendarViewsValue_helper()
{

  return true;
}

int KalendarConfig::defaultWeekdayLabelAlignmentValue_helper()
{

  return Right;
}

int KalendarConfig::defaultWeekdayLabelLengthValue_helper()
{

  return Full;
}

bool KalendarConfig::defaultShowWeekNumbersValue_helper()
{

  return false;
}

int KalendarConfig::defaultMonthGridBorderWidthValue_helper()
{

  return 1;
}

int KalendarConfig::defaultWeekViewAllDayHeaderHeightValue_helper()
{

  return -1;
}

bool KalendarConfig::defaultShowWeekHeadersValue_helper()
{

  return true;
}

int KalendarConfig::defaultSortValue_helper()
{

  return DueTime;
}

bool KalendarConfig::defaultAscendingOrderValue_helper()
{

  return true;
}

bool KalendarConfig::defaultShowCompletedSubtodosValue_helper()
{

  return true;
}

double KalendarConfig::defaultPastEventsTransparencyLevelValue_helper()
{

  return 0;
}

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


void KalendarConfig::itemChanged(quint64 flags) {

  if ( flags & signalShowMenubarChanged ) {
    Q_EMIT showMenubarChanged();
  }
  if ( flags & signalForceCollapsedMainDrawerChanged ) {
    Q_EMIT forceCollapsedMainDrawerChanged();
  }
  if ( flags & signalEnableMapsChanged ) {
    Q_EMIT enableMapsChanged();
  }
  if ( flags & signalLocationMarkerChanged ) {
    Q_EMIT locationMarkerChanged();
  }
  if ( flags & signalLastOpenedViewChanged ) {
    Q_EMIT lastOpenedViewChanged();
  }
  if ( flags & signalIncidenceInfoDrawerDrawerWidthChanged ) {
    Q_EMIT incidenceInfoDrawerDrawerWidthChanged();
  }
  if ( flags & signalTagsSectionExpandedChanged ) {
    Q_EMIT tagsSectionExpandedChanged();
  }
  if ( flags & signalCalendarsSectionExpandedChanged ) {
    Q_EMIT calendarsSectionExpandedChanged();
  }
  if ( flags & signalLastUsedEventCollectionChanged ) {
    Q_EMIT lastUsedEventCollectionChanged();
  }
  if ( flags & signalLastUsedTodoCollectionChanged ) {
    Q_EMIT lastUsedTodoCollectionChanged();
  }
  if ( flags & signalShowSubtodosInCalendarViewsChanged ) {
    Q_EMIT showSubtodosInCalendarViewsChanged();
  }
  if ( flags & signalWeekdayLabelAlignmentChanged ) {
    Q_EMIT weekdayLabelAlignmentChanged();
  }
  if ( flags & signalWeekdayLabelLengthChanged ) {
    Q_EMIT weekdayLabelLengthChanged();
  }
  if ( flags & signalShowWeekNumbersChanged ) {
    Q_EMIT showWeekNumbersChanged();
  }
  if ( flags & signalMonthGridBorderWidthChanged ) {
    Q_EMIT monthGridBorderWidthChanged();
  }
  if ( flags & signalWeekViewAllDayHeaderHeightChanged ) {
    Q_EMIT weekViewAllDayHeaderHeightChanged();
  }
  if ( flags & signalShowWeekHeadersChanged ) {
    Q_EMIT showWeekHeadersChanged();
  }
  if ( flags & signalSortChanged ) {
    Q_EMIT sortChanged();
  }
  if ( flags & signalAscendingOrderChanged ) {
    Q_EMIT ascendingOrderChanged();
  }
  if ( flags & signalShowCompletedSubtodosChanged ) {
    Q_EMIT showCompletedSubtodosChanged();
  }
  if ( flags & signalPastEventsTransparencyLevelChanged ) {
    Q_EMIT pastEventsTransparencyLevelChanged();
  }
}

#include "kalendarconfig.moc"

