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

#include "baloosettings.h"

BalooSettings::BalooSettings( QObject *parent )
  : KCoreConfigSkeleton( QStringLiteral( "baloofilerc" ) )
{
  setParent(parent);
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&BalooSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "Basic Settings" ) );

  KConfigCompilerSignallingItem  *itemIndexingEnabled;
  KCoreConfigSkeleton::ItemBool  *innerItemIndexingEnabled;
  innerItemIndexingEnabled = new KCoreConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "Indexing-Enabled" ), mIndexingEnabled, true );
  itemIndexingEnabled = new KConfigCompilerSignallingItem(innerItemIndexingEnabled, this, notifyFunction, signalIndexingEnabledChanged);
  itemIndexingEnabled->setWriteFlags(KConfigBase::Notify);
  addItem( itemIndexingEnabled, QStringLiteral( "indexingEnabled" ) );

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemIndexHiddenFolders;
  KCoreConfigSkeleton::ItemBool  *innerItemIndexHiddenFolders;
  innerItemIndexHiddenFolders = new KCoreConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "index hidden folders" ), mIndexHiddenFolders, false );
  itemIndexHiddenFolders = new KConfigCompilerSignallingItem(innerItemIndexHiddenFolders, this, notifyFunction, signalIndexHiddenFoldersChanged);
  itemIndexHiddenFolders->setWriteFlags(KConfigBase::Notify);
  addItem( itemIndexHiddenFolders, QStringLiteral( "indexHiddenFolders" ) );
  KConfigCompilerSignallingItem  *itemDbVersion;
  KCoreConfigSkeleton::ItemInt  *innerItemDbVersion;
  innerItemDbVersion = new KCoreConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "dbVersion" ), mDbVersion, 0 );
  itemDbVersion = new KConfigCompilerSignallingItem(innerItemDbVersion, this, notifyFunction, signalDbVersionChanged);
  itemDbVersion->setWriteFlags(KConfigBase::Notify);
  addItem( itemDbVersion, QStringLiteral( "dbVersion" ) );
  KConfigCompilerSignallingItem  *itemOnlyBasicIndexing;
  KCoreConfigSkeleton::ItemBool  *innerItemOnlyBasicIndexing;
  innerItemOnlyBasicIndexing = new KCoreConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "only basic indexing" ), mOnlyBasicIndexing, false );
  itemOnlyBasicIndexing = new KConfigCompilerSignallingItem(innerItemOnlyBasicIndexing, this, notifyFunction, signalOnlyBasicIndexingChanged);
  itemOnlyBasicIndexing->setWriteFlags(KConfigBase::Notify);
  addItem( itemOnlyBasicIndexing, QStringLiteral( "onlyBasicIndexing" ) );
  KConfigCompilerSignallingItem  *itemDisableInitialUpdate;
  KCoreConfigSkeleton::ItemBool  *innerItemDisableInitialUpdate;
  innerItemDisableInitialUpdate = new KCoreConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "disable initial update" ), mDisableInitialUpdate, true );
  itemDisableInitialUpdate = new KConfigCompilerSignallingItem(innerItemDisableInitialUpdate, this, notifyFunction, signalDisableInitialUpdateChanged);
  itemDisableInitialUpdate->setWriteFlags(KConfigBase::Notify);
  addItem( itemDisableInitialUpdate, QStringLiteral( "disableInitialUpdate" ) );
  KConfigCompilerSignallingItem  *itemExcludedFolders;
  KCoreConfigSkeleton::ItemPathList  *innerItemExcludedFolders;
  innerItemExcludedFolders = new KCoreConfigSkeleton::ItemPathList( currentGroup(), QStringLiteral( "exclude folders" ), mExcludedFolders, QStringList() );
  itemExcludedFolders = new KConfigCompilerSignallingItem(innerItemExcludedFolders, this, notifyFunction, signalExcludedFoldersChanged);
  itemExcludedFolders->setWriteFlags(KConfigBase::Notify);
  addItem( itemExcludedFolders, QStringLiteral( "excludedFolders" ) );
  KConfigCompilerSignallingItem  *itemFolders;
  KCoreConfigSkeleton::ItemPathList  *innerItemFolders;
  innerItemFolders = new KCoreConfigSkeleton::ItemPathList( currentGroup(), QStringLiteral( "folders" ), mFolders, QStringList() << QDir::homePath() );
  itemFolders = new KConfigCompilerSignallingItem(innerItemFolders, this, notifyFunction, signalFoldersChanged);
  itemFolders->setWriteFlags(KConfigBase::Notify);
  addItem( itemFolders, QStringLiteral( "folders" ) );
  KConfigCompilerSignallingItem  *itemExcludedMimetypes;
  KCoreConfigSkeleton::ItemStringList  *innerItemExcludedMimetypes;
  innerItemExcludedMimetypes = new KCoreConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "exclude mimetypes" ), mExcludedMimetypes, Baloo::defaultExcludeMimetypes() );
  itemExcludedMimetypes = new KConfigCompilerSignallingItem(innerItemExcludedMimetypes, this, notifyFunction, signalExcludedMimetypesChanged);
  itemExcludedMimetypes->setWriteFlags(KConfigBase::Notify);
  addItem( itemExcludedMimetypes, QStringLiteral( "excludedMimetypes" ) );
  KConfigCompilerSignallingItem  *itemExcludedFilters;
  KCoreConfigSkeleton::ItemStringList  *innerItemExcludedFilters;
  innerItemExcludedFilters = new KCoreConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "exclude filters" ), mExcludedFilters, Baloo::defaultExcludeFilterList() );
  itemExcludedFilters = new KConfigCompilerSignallingItem(innerItemExcludedFilters, this, notifyFunction, signalExcludedFiltersChanged);
  itemExcludedFilters->setWriteFlags(KConfigBase::Notify);
  addItem( itemExcludedFilters, QStringLiteral( "excludedFilters" ) );
  KConfigCompilerSignallingItem  *itemExcludedFiltersVersion;
  KCoreConfigSkeleton::ItemInt  *innerItemExcludedFiltersVersion;
  innerItemExcludedFiltersVersion = new KCoreConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "exclude filters version" ), mExcludedFiltersVersion, 0 );
  itemExcludedFiltersVersion = new KConfigCompilerSignallingItem(innerItemExcludedFiltersVersion, this, notifyFunction, signalExcludedFiltersVersionChanged);
  itemExcludedFiltersVersion->setWriteFlags(KConfigBase::Notify);
  addItem( itemExcludedFiltersVersion, QStringLiteral( "excludedFiltersVersion" ) );
}

bool BalooSettings::defaultIndexingEnabledValue_helper() const
{

  return true;
}

bool BalooSettings::defaultIndexHiddenFoldersValue_helper() const
{

  return false;
}

int BalooSettings::defaultDbVersionValue_helper() const
{

  return 0;
}

bool BalooSettings::defaultOnlyBasicIndexingValue_helper() const
{

  return false;
}

bool BalooSettings::defaultDisableInitialUpdateValue_helper() const
{

  return true;
}

QStringList BalooSettings::defaultExcludedFoldersValue_helper() const
{

  return QStringList();
}

QStringList BalooSettings::defaultFoldersValue_helper() const
{

  return QStringList() << QDir::homePath();
}

QStringList BalooSettings::defaultExcludedMimetypesValue_helper() const
{

  return Baloo::defaultExcludeMimetypes();
}

QStringList BalooSettings::defaultExcludedFiltersValue_helper() const
{

  return Baloo::defaultExcludeFilterList();
}

int BalooSettings::defaultExcludedFiltersVersionValue_helper() const
{

  return 0;
}

BalooSettings::~BalooSettings()
{
}


void BalooSettings::itemChanged(quint64 signalFlag) {

  switch (signalFlag) {
  case signalIndexingEnabledChanged:
    Q_EMIT indexingEnabledChanged();
    break;
  case signalIndexHiddenFoldersChanged:
    Q_EMIT indexHiddenFoldersChanged();
    break;
  case signalDbVersionChanged:
    Q_EMIT dbVersionChanged();
    break;
  case signalOnlyBasicIndexingChanged:
    Q_EMIT onlyBasicIndexingChanged();
    break;
  case signalDisableInitialUpdateChanged:
    Q_EMIT disableInitialUpdateChanged();
    break;
  case signalExcludedFoldersChanged:
    Q_EMIT excludedFoldersChanged();
    break;
  case signalFoldersChanged:
    Q_EMIT foldersChanged();
    break;
  case signalExcludedMimetypesChanged:
    Q_EMIT excludedMimetypesChanged();
    break;
  case signalExcludedFiltersChanged:
    Q_EMIT excludedFiltersChanged();
    break;
  case signalExcludedFiltersVersionChanged:
    Q_EMIT excludedFiltersVersionChanged();
    break;
  }
}
