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

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

class QQmlEngine;
class QJSEngine;

class KTripSettings : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

    static KTripSettings *self();
    static KTripSettings *create(QQmlEngine *, QJSEngine *);
    ~KTripSettings() override;

    /**
      Set First run
    */
    static
    void setFirstRun( bool v )
    {
      if (v != self()->mFirstRun && !self()->isFirstRunImmutable()) {
        self()->mFirstRun = v;
        Q_EMIT self()->firstRunChanged();
      }
    }

    Q_PROPERTY(bool firstRun READ firstRun WRITE setFirstRun NOTIFY firstRunChanged)
    Q_PROPERTY(bool isFirstRunImmutable READ isFirstRunImmutable CONSTANT)
    Q_PROPERTY(bool defaultFirstRunValue READ defaultFirstRunValue CONSTANT)
    /**
      Get First run
    */
    static
    bool firstRun()
    {
      return self()->mFirstRun;
    }

    /**
      Is First run Immutable
    */
    static
    bool isFirstRunImmutable()
    {
      return self()->isImmutable( QStringLiteral( "firstRun" ) );
    }

    /**
      Get First run default value
    */
    static
    bool defaultFirstRunValue()
    {
        return defaultFirstRunValue_helper();
    }

    /**
      Set historySortMode
    */
    static
    void setHistorySortMode( const QString & v )
    {
      if (v != self()->mHistorySortMode && !self()->isHistorySortModeImmutable()) {
        self()->mHistorySortMode = v;
        Q_EMIT self()->historySortModeChanged();
      }
    }

    Q_PROPERTY(QString historySortMode READ historySortMode WRITE setHistorySortMode NOTIFY historySortModeChanged)
    Q_PROPERTY(bool isHistorySortModeImmutable READ isHistorySortModeImmutable CONSTANT)
    Q_PROPERTY(QString defaultHistorySortModeValue READ defaultHistorySortModeValue CONSTANT)
    /**
      Get historySortMode
    */
    static
    QString historySortMode()
    {
      return self()->mHistorySortMode;
    }

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

    /**
      Get historySortMode default value
    */
    static
    QString defaultHistorySortModeValue()
    {
        return defaultHistorySortModeValue_helper();
    }

    /**
      Set Enabled backends
    */
    static
    void setEnabledBackends( const QStringList & v )
    {
      if (v != self()->mEnabledBackends && !self()->isEnabledBackendsImmutable()) {
        self()->mEnabledBackends = v;
        Q_EMIT self()->EnabledBackendsChanged();
      }
    }

    Q_PROPERTY(QStringList enabledBackends READ enabledBackends WRITE setEnabledBackends NOTIFY EnabledBackendsChanged)
    Q_PROPERTY(bool isEnabledBackendsImmutable READ isEnabledBackendsImmutable CONSTANT)
    /**
      Get Enabled backends
    */
    static
    QStringList enabledBackends()
    {
      return self()->mEnabledBackends;
    }

    /**
      Is Enabled backends Immutable
    */
    static
    bool isEnabledBackendsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "EnabledBackends" ) );
    }


    enum {
      signalFirstRunChanged = 1,
      signalHistorySortModeChanged = 2,
      signalEnabledBackendsChanged = 3
    };

  Q_SIGNALS:
    void firstRunChanged();

    void historySortModeChanged();

    void EnabledBackendsChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    KTripSettings(QObject *parent = nullptr);
    friend class KTripSettingsHelper;


    // General
    bool mFirstRun;
    static bool defaultFirstRunValue_helper();

    // StopPicker
    QString mHistorySortMode;
    static QString defaultHistorySortModeValue_helper();

    // Backends
    QStringList mEnabledBackends;
    static QStringList defaultEnabledBackendsValue_helper();
};

#endif

