// This file is generated by kconfig_compiler_kf6 from fallapart.kcfg.
// All changes you do to this file will be lost.
#ifndef KWIN_FALLAPARTCONFIG_H
#define KWIN_FALLAPARTCONFIG_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

namespace KWin {

class FallApartConfig : public KConfigSkeleton
{
  public:

    static FallApartConfig *self();
    static void instance(const QString& cfgfilename);
    static void instance(KSharedConfig::Ptr config);
    ~FallApartConfig() override;

    /**
      Set BlockSize
    */
    static
    void setBlockSize( int v )
    {
      if (v < 1)
      {
        qDebug() << "setBlockSize: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 100000)
      {
        qDebug() << "setBlockSize: value " << v << " is greater than the maximum value of 100000";
        v = 100000;
      }

      if (!self()->isBlockSizeImmutable())
        self()->mBlockSize = v;
    }

    /**
      Get BlockSize
    */
    static
    int blockSize()
    {
      return self()->mBlockSize;
    }

    /**
      Is BlockSize Immutable
    */
    static
    bool isBlockSizeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "BlockSize" ) );
    }

  protected:
    FallApartConfig(KSharedConfig::Ptr config);
    friend class FallApartConfigHelper;


    // Effect-fallapart
    int mBlockSize;
};

}

#endif

