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

#include "discoversettings.h"

DiscoverSettings::DiscoverSettings( KSharedConfig::Ptr config )
  : KConfigSkeleton( std::move( config ) )
{
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&DiscoverSettings::itemChanged);

  setCurrentGroup( QStringLiteral( "DiscoverUI" ) );

  KConfigCompilerSignallingItem  *itemAppsListPageSorting;
  KConfigSkeleton::ItemInt  *innerItemAppsListPageSorting;
  innerItemAppsListPageSorting = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "appsListPageSorting" ), mAppsListPageSorting, ResourcesProxyModel::SortableRatingRole );
  itemAppsListPageSorting = new KConfigCompilerSignallingItem(innerItemAppsListPageSorting, this, notifyFunction, signalAppsListPageSortingChanged);
  addItem( itemAppsListPageSorting, QStringLiteral( "appsListPageSorting" ) );
  KConfigCompilerSignallingItem  *itemInstalledPageSorting;
  KConfigSkeleton::ItemInt  *innerItemInstalledPageSorting;
  innerItemInstalledPageSorting = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "installedPageSorting" ), mInstalledPageSorting, ResourcesProxyModel::NameRole );
  itemInstalledPageSorting = new KConfigCompilerSignallingItem(innerItemInstalledPageSorting, this, notifyFunction, signalInstalledPageSortingChanged);
  addItem( itemInstalledPageSorting, QStringLiteral( "installedPageSorting" ) );
}

DiscoverSettings::~DiscoverSettings()
{
}


void DiscoverSettings::itemChanged(quint64 flags) {

  if ( flags & signalAppsListPageSortingChanged ) {
    Q_EMIT appsListPageSortingChanged();
  }
  if ( flags & signalInstalledPageSortingChanged ) {
    Q_EMIT installedPageSortingChanged();
  }
}

#include "discoversettings.moc"

