// This file is generated by kconfig_compiler_kf6 from massif-visualizer-settings.kcfg.
// All changes you do to this file will be lost.
#ifndef MASSIF_SETTINGS_H
#define MASSIF_SETTINGS_H

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

namespace Massif {

class Settings : public KConfigSkeleton
{
  public:
    enum EnumLegendPosition { North, East, South, West, Floating };
    enum EnumLegendAlignment { Left, Center, Right, Top, Bottom };

    static Settings *self();
    ~Settings() override;

    /**
      Set Cost Precision
    */
    static
    void setPrettyCostPrecision( int v )
    {
      if (!self()->isPrettyCostPrecisionImmutable())
        self()->mPrettyCostPrecision = v;
    }

    /**
      Get Cost Precision
    */
    static
    int prettyCostPrecision()
    {
      return self()->mPrettyCostPrecision;
    }

    /**
      Is Cost Precision Immutable
    */
    static
    bool isPrettyCostPrecisionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "PrettyCostPrecision" ) );
    }

    /**
      Get Item object corresponding to PrettyCostPrecision()
    */
    ItemInt *prettyCostPrecisionItem()
    {
      return mPrettyCostPrecisionItem;
    }

    /**
      Set Shorten Templates
    */
    static
    void setShortenTemplates( bool v )
    {
      if (!self()->isShortenTemplatesImmutable())
        self()->mShortenTemplates = v;
    }

    /**
      Get Shorten Templates
    */
    static
    bool shortenTemplates()
    {
      return self()->mShortenTemplates;
    }

    /**
      Is Shorten Templates Immutable
    */
    static
    bool isShortenTemplatesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ShortenTemplates" ) );
    }

    /**
      Get Item object corresponding to ShortenTemplates()
    */
    ItemBool *shortenTemplatesItem()
    {
      return mShortenTemplatesItem;
    }

    /**
      Set Legend Position
    */
    static
    void setLegendPosition( EnumLegendPosition v )
    {
      if (!self()->isLegendPositionImmutable())
        self()->mLegendPosition = v;
    }

    /**
      Get Legend Position
    */
    static
    EnumLegendPosition legendPosition()
    {
      return static_cast<EnumLegendPosition>(self()->mLegendPosition);
    }

    /**
      Is Legend Position Immutable
    */
    static
    bool isLegendPositionImmutable()
    {
      return self()->isImmutable( QStringLiteral( "LegendPosition" ) );
    }

    /**
      Get Item object corresponding to LegendPosition()
    */
    ItemEnum *legendPositionItem()
    {
      return mLegendPositionItem;
    }

    /**
      Set Legend Alignment
    */
    static
    void setLegendAlignment( EnumLegendAlignment v )
    {
      if (!self()->isLegendAlignmentImmutable())
        self()->mLegendAlignment = v;
    }

    /**
      Get Legend Alignment
    */
    static
    EnumLegendAlignment legendAlignment()
    {
      return static_cast<EnumLegendAlignment>(self()->mLegendAlignment);
    }

    /**
      Is Legend Alignment Immutable
    */
    static
    bool isLegendAlignmentImmutable()
    {
      return self()->isImmutable( QStringLiteral( "LegendAlignment" ) );
    }

    /**
      Get Item object corresponding to LegendAlignment()
    */
    ItemEnum *legendAlignmentItem()
    {
      return mLegendAlignmentItem;
    }

    /**
      Set Legend Font Size
    */
    static
    void setLegendFontSize( int v )
    {
      if (v < 6)
      {
        qDebug() << "setLegendFontSize: value " << v << " is less than the minimum value of 6";
        v = 6;
      }

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

      if (!self()->isLegendFontSizeImmutable())
        self()->mLegendFontSize = v;
    }

    /**
      Get Legend Font Size
    */
    static
    int legendFontSize()
    {
      return self()->mLegendFontSize;
    }

    /**
      Is Legend Font Size Immutable
    */
    static
    bool isLegendFontSizeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "LegendFontSize" ) );
    }

    /**
      Get Item object corresponding to LegendFontSize()
    */
    ItemInt *legendFontSizeItem()
    {
      return mLegendFontSizeItem;
    }

  protected:
    Settings();
    friend class SettingsHelper;


    // Settings
    int mPrettyCostPrecision;
    bool mShortenTemplates;
    int mLegendPosition;
    int mLegendAlignment;
    int mLegendFontSize;

  private:
    ItemInt *mPrettyCostPrecisionItem;
    ItemBool *mShortenTemplatesItem;
    ItemEnum *mLegendPositionItem;
    ItemEnum *mLegendAlignmentItem;
    ItemInt *mLegendFontSizeItem;
};

}

#endif

