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

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

#include <QtCore/qdir.h>
#include <QDesktopServices>

class Preferences : public KConfigSkeleton
{
  public:

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

    /**
      Set firstStart
    */
    static
    void setFirstStart( bool v )
    {
      if (!self()->isFirstStartImmutable())
        self()->mFirstStart = v;
    }

    /**
      Get firstStart
    */
    static
    bool firstStart()
    {
      return self()->mFirstStart;
    }

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

    /**
      Set Overwrite existing files
    */
    static
    void setOverwriteExistingFiles( bool v )
    {
      if (!self()->isOverwriteExistingFilesImmutable())
        self()->mOverwriteExistingFiles = v;
    }

    /**
      Get Overwrite existing files
    */
    static
    bool overwriteExistingFiles()
    {
      return self()->mOverwriteExistingFiles;
    }

    /**
      Is Overwrite existing files Immutable
    */
    static
    bool isOverwriteExistingFilesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "overwriteExistingFiles" ) );
    }

    /**
      Set Delete partial files after cancel
    */
    static
    void setDeletePartialFiles( bool v )
    {
      if (!self()->isDeletePartialFilesImmutable())
        self()->mDeletePartialFiles = v;
    }

    /**
      Get Delete partial files after cancel
    */
    static
    bool deletePartialFiles()
    {
      return self()->mDeletePartialFiles;
    }

    /**
      Is Delete partial files after cancel Immutable
    */
    static
    bool isDeletePartialFilesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "deletePartialFiles" ) );
    }

    /**
      Set Eject CD tray after extraction finished
    */
    static
    void setEjectCDTray( bool v )
    {
      if (!self()->isEjectCDTrayImmutable())
        self()->mEjectCDTray = v;
    }

    /**
      Get Eject CD tray after extraction finished
    */
    static
    bool ejectCDTray()
    {
      return self()->mEjectCDTray;
    }

    /**
      Is Eject CD tray after extraction finished Immutable
    */
    static
    bool isEjectCDTrayImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ejectCDTray" ) );
    }

    /**
      Set Perform CDDB lookup automatically
    */
    static
    void setCddbLookupAuto( bool v )
    {
      if (!self()->isCddbLookupAutoImmutable())
        self()->mCddbLookupAuto = v;
    }

    /**
      Get Perform CDDB lookup automatically
    */
    static
    bool cddbLookupAuto()
    {
      return self()->mCddbLookupAuto;
    }

    /**
      Is Perform CDDB lookup automatically Immutable
    */
    static
    bool isCddbLookupAutoImmutable()
    {
      return self()->isImmutable( QStringLiteral( "cddbLookupAuto" ) );
    }

    /**
      Set Perform cover lookup (amazon) automatically
    */
    static
    void setCoverLookupAuto( bool v )
    {
      if (!self()->isCoverLookupAutoImmutable())
        self()->mCoverLookupAuto = v;
    }

    /**
      Get Perform cover lookup (amazon) automatically
    */
    static
    bool coverLookupAuto()
    {
      return self()->mCoverLookupAuto;
    }

    /**
      Is Perform cover lookup (amazon) automatically Immutable
    */
    static
    bool isCoverLookupAutoImmutable()
    {
      return self()->isImmutable( QStringLiteral( "coverLookupAuto" ) );
    }

    /**
      Set Number of covers to fetch
    */
    static
    void setFetchCount( int v )
    {
      if (v < 1)
      {
        qDebug() << "setFetchCount: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isFetchCountImmutable())
        self()->mFetchCount = v;
    }

    /**
      Get Number of covers to fetch
    */
    static
    int fetchCount()
    {
      return self()->mFetchCount;
    }

    /**
      Is Number of covers to fetch Immutable
    */
    static
    bool isFetchCountImmutable()
    {
      return self()->isImmutable( QStringLiteral( "fetchCount" ) );
    }

    /**
      Set Full paranoia mode (secure mode)
    */
    static
    void setFullParanoiaMode( bool v )
    {
      if (!self()->isFullParanoiaModeImmutable())
        self()->mFullParanoiaMode = v;
    }

    /**
      Get Full paranoia mode (secure mode)
    */
    static
    bool fullParanoiaMode()
    {
      return self()->mFullParanoiaMode;
    }

    /**
      Is Full paranoia mode (secure mode) Immutable
    */
    static
    bool isFullParanoiaModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "fullParanoiaMode" ) );
    }

    /**
      Set Skip read errors
    */
    static
    void setSkipReadErrors( bool v )
    {
      if (!self()->isSkipReadErrorsImmutable())
        self()->mSkipReadErrors = v;
    }

    /**
      Get Skip read errors
    */
    static
    bool skipReadErrors()
    {
      return self()->mSkipReadErrors;
    }

    /**
      Is Skip read errors Immutable
    */
    static
    bool isSkipReadErrorsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "skipReadErrors" ) );
    }

    /**
      Set Retries on read error
    */
    static
    void setRetriesOnReadError( int v )
    {
      if (v < 0)
      {
        qDebug() << "setRetriesOnReadError: value " << v << " is less than the minimum value of 0";
        v = 0;
      }

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

      if (!self()->isRetriesOnReadErrorImmutable())
        self()->mRetriesOnReadError = v;
    }

    /**
      Get Retries on read error
    */
    static
    int retriesOnReadError()
    {
      return self()->mRetriesOnReadError;
    }

    /**
      Is Retries on read error Immutable
    */
    static
    bool isRetriesOnReadErrorImmutable()
    {
      return self()->isImmutable( QStringLiteral( "retriesOnReadError" ) );
    }

    /**
      Set Sample shift
    */
    static
    void setSampleShift( int v )
    {
      if (v < -10000)
      {
        qDebug() << "setSampleShift: value " << v << " is less than the minimum value of -10000";
        v = -10000;
      }

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

      if (!self()->isSampleShiftImmutable())
        self()->mSampleShift = v;
    }

    /**
      Get Sample shift
    */
    static
    int sampleShift()
    {
      return self()->mSampleShift;
    }

    /**
      Is Sample shift Immutable
    */
    static
    bool isSampleShiftImmutable()
    {
      return self()->isImmutable( QStringLiteral( "sampleShift" ) );
    }

    /**
      Set Base path to store music files
    */
    static
    void setBasePath( const QString & v )
    {
      if (!self()->isBasePathImmutable())
        self()->mBasePath = v;
    }

    /**
      Get Base path to store music files
    */
    static
    QString basePath()
    {
      return self()->mBasePath;
    }

    /**
      Is Base path to store music files Immutable
    */
    static
    bool isBasePathImmutable()
    {
      return self()->isImmutable( QStringLiteral( "basePath" ) );
    }

    /**
      Set Upload files to server
    */
    static
    void setUpload( bool v )
    {
      if (!self()->isUploadImmutable())
        self()->mUpload = v;
    }

    /**
      Get Upload files to server
    */
    static
    bool upload()
    {
      return self()->mUpload;
    }

    /**
      Is Upload files to server Immutable
    */
    static
    bool isUploadImmutable()
    {
      return self()->isImmutable( QStringLiteral( "upload" ) );
    }

    /**
      Set URL of server
    */
    static
    void setUrl( const QUrl & v )
    {
      if (!self()->isUrlImmutable())
        self()->mUrl = v;
    }

    /**
      Get URL of server
    */
    static
    QUrl url()
    {
      return self()->mUrl;
    }

    /**
      Is URL of server Immutable
    */
    static
    bool isUrlImmutable()
    {
      return self()->isImmutable( QStringLiteral( "url" ) );
    }

  protected:
    Preferences();
    friend class PreferencesHelper;


    // general
    bool mFirstStart;
    bool mOverwriteExistingFiles;
    bool mDeletePartialFiles;
    bool mEjectCDTray;
    bool mCddbLookupAuto;
    bool mCoverLookupAuto;
    int mFetchCount;
    bool mFullParanoiaMode;
    bool mSkipReadErrors;
    int mRetriesOnReadError;
    int mSampleShift;
    QString mBasePath;
    bool mUpload;
    QUrl mUrl;
};

#endif

