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

#include "systemmonitor.h"

SystemMonitorConfiguration::SystemMonitorConfiguration( )
  : KConfigSkeleton( QStringLiteral( "systemmonitorrc" ) )
{
  KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&SystemMonitorConfiguration::itemChanged);

  setCurrentGroup( QStringLiteral( "General" ) );

  KConfigCompilerSignallingItem  *itemWidth;
  KConfigSkeleton::ItemDouble  *innerItemWidth;
  innerItemWidth = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "width" ), mWidth, 1000.0 );
  itemWidth = new KConfigCompilerSignallingItem(innerItemWidth, this, notifyFunction, signalWidthChanged);
  addItem( itemWidth, QStringLiteral( "width" ) );
  KConfigCompilerSignallingItem  *itemHeight;
  KConfigSkeleton::ItemDouble  *innerItemHeight;
  innerItemHeight = new KConfigSkeleton::ItemDouble( currentGroup(), QStringLiteral( "height" ), mHeight, 700.0 );
  itemHeight = new KConfigCompilerSignallingItem(innerItemHeight, this, notifyFunction, signalHeightChanged);
  addItem( itemHeight, QStringLiteral( "height" ) );
  KConfigCompilerSignallingItem  *itemMaximized;
  KConfigSkeleton::ItemBool  *innerItemMaximized;
  innerItemMaximized = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "maximized" ), mMaximized, false );
  itemMaximized = new KConfigCompilerSignallingItem(innerItemMaximized, this, notifyFunction, signalMaximizedChanged);
  addItem( itemMaximized, QStringLiteral( "maximized" ) );
  KConfigCompilerSignallingItem  *itemLastPage;
  KConfigSkeleton::ItemString  *innerItemLastPage;
  innerItemLastPage = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "lastPage" ), mLastPage );
  itemLastPage = new KConfigCompilerSignallingItem(innerItemLastPage, this, notifyFunction, signalLastPageChanged);
  addItem( itemLastPage, QStringLiteral( "lastPage" ) );
  KConfigCompilerSignallingItem  *itemSidebarCollapsed;
  KConfigSkeleton::ItemBool  *innerItemSidebarCollapsed;
  innerItemSidebarCollapsed = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "sidebarCollapsed" ), mSidebarCollapsed, false );
  itemSidebarCollapsed = new KConfigCompilerSignallingItem(innerItemSidebarCollapsed, this, notifyFunction, signalSidebarCollapsedChanged);
  addItem( itemSidebarCollapsed, QStringLiteral( "sidebarCollapsed" ) );
  QStringList defaultpageOrder;
  defaultpageOrder.append( QString::fromUtf8( "overview.page" ) );
  defaultpageOrder.append( QString::fromUtf8( "applications.page" ) );
  defaultpageOrder.append( QString::fromUtf8( "history.page" ) );
  defaultpageOrder.append( QString::fromUtf8( "processes.page" ) );

  KConfigCompilerSignallingItem  *itemPageOrder;
  KConfigSkeleton::ItemStringList  *innerItemPageOrder;
  innerItemPageOrder = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "pageOrder" ), mPageOrder, defaultpageOrder );
  itemPageOrder = new KConfigCompilerSignallingItem(innerItemPageOrder, this, notifyFunction, signalPageOrderChanged);
  addItem( itemPageOrder, QStringLiteral( "pageOrder" ) );
  KConfigCompilerSignallingItem  *itemHiddenPages;
  KConfigSkeleton::ItemStringList  *innerItemHiddenPages;
  innerItemHiddenPages = new KConfigSkeleton::ItemStringList( currentGroup(), QStringLiteral( "hiddenPages" ), mHiddenPages );
  itemHiddenPages = new KConfigCompilerSignallingItem(innerItemHiddenPages, this, notifyFunction, signalHiddenPagesChanged);
  addItem( itemHiddenPages, QStringLiteral( "hiddenPages" ) );
  KConfigCompilerSignallingItem  *itemStartPage;
  KConfigSkeleton::ItemString  *innerItemStartPage;
  innerItemStartPage = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "startPage" ), mStartPage, QStringLiteral( "overview.page" ) );
  itemStartPage = new KConfigCompilerSignallingItem(innerItemStartPage, this, notifyFunction, signalStartPageChanged);
  addItem( itemStartPage, QStringLiteral( "startPage" ) );
  KConfigCompilerSignallingItem  *itemLastVisitedPage;
  KConfigSkeleton::ItemString  *innerItemLastVisitedPage;
  innerItemLastVisitedPage = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "lastVisitedPage" ), mLastVisitedPage );
  itemLastVisitedPage = new KConfigCompilerSignallingItem(innerItemLastVisitedPage, this, notifyFunction, signalLastVisitedPageChanged);
  addItem( itemLastVisitedPage, QStringLiteral( "lastVisitedPage" ) );
}

SystemMonitorConfiguration::~SystemMonitorConfiguration()
{
}


void SystemMonitorConfiguration::itemChanged(quint64 flags) {

  if ( flags & signalWidthChanged ) {
    Q_EMIT widthChanged();
  }
  if ( flags & signalHeightChanged ) {
    Q_EMIT heightChanged();
  }
  if ( flags & signalMaximizedChanged ) {
    Q_EMIT maximizedChanged();
  }
  if ( flags & signalLastPageChanged ) {
    Q_EMIT lastPageChanged();
  }
  if ( flags & signalSidebarCollapsedChanged ) {
    Q_EMIT sidebarCollapsedChanged();
  }
  if ( flags & signalPageOrderChanged ) {
    Q_EMIT pageOrderChanged();
  }
  if ( flags & signalHiddenPagesChanged ) {
    Q_EMIT hiddenPagesChanged();
  }
  if ( flags & signalStartPageChanged ) {
    Q_EMIT startPageChanged();
  }
  if ( flags & signalLastVisitedPageChanged ) {
    Q_EMIT lastVisitedPageChanged();
  }
}

#include "systemmonitor.moc"

