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

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

class KClockSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:
    enum EnumTimerNotification { Never, WhenKClockNotRunning, Always };
    Q_ENUM(EnumTimerNotification)

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

    /**
      Set Whether to use 24 hour or 12 hour time in the UI.
    */
    static
    void setTimeFormat( const QString & v )
    {
      if (v != self()->mTimeFormat && !self()->isTimeFormatImmutable()) {
        self()->mTimeFormat = v;
        Q_EMIT self()->timeFormatChanged();
      }
    }

    Q_PROPERTY(QString timeFormat READ timeFormat WRITE setTimeFormat NOTIFY timeFormatChanged)
    Q_PROPERTY(bool isTimeFormatImmutable READ isTimeFormatImmutable CONSTANT)
    Q_PROPERTY(QString defaultTimeFormatValue READ defaultTimeFormatValue CONSTANT)
    /**
      Get Whether to use 24 hour or 12 hour time in the UI.
    */
    static
    QString timeFormat()
    {
      return self()->mTimeFormat;
    }

    /**
      Is Whether to use 24 hour or 12 hour time in the UI. Immutable
    */
    static
    bool isTimeFormatImmutable()
    {
      return self()->isImmutable( QStringLiteral( "timeFormat" ) );
    }

    /**
      Get Whether to use 24 hour or 12 hour time in the UI. default value
    */
    static
    QString defaultTimeFormatValue()
    {
        return defaultTimeFormatValue_helper();
    }

    /**
      Set Whether to show a notification for a running timer.
    */
    static
    void setTimerNotification( int v )
    {
      if (v != self()->mTimerNotification && !self()->isTimerNotificationImmutable()) {
        self()->mTimerNotification = v;
        Q_EMIT self()->timerNotificationChanged();
      }
    }

    Q_PROPERTY(int timerNotification READ timerNotification WRITE setTimerNotification NOTIFY timerNotificationChanged)
    Q_PROPERTY(bool isTimerNotificationImmutable READ isTimerNotificationImmutable CONSTANT)
    Q_PROPERTY(int defaultTimerNotificationValue READ defaultTimerNotificationValue CONSTANT)
    /**
      Get Whether to show a notification for a running timer.
    */
    static
    int timerNotification()
    {
      return self()->mTimerNotification;
    }

    /**
      Is Whether to show a notification for a running timer. Immutable
    */
    static
    bool isTimerNotificationImmutable()
    {
      return self()->isImmutable( QStringLiteral( "timerNotification" ) );
    }

    /**
      Get Whether to show a notification for a running timer. default value
    */
    static
    int defaultTimerNotificationValue()
    {
        return defaultTimerNotificationValue_helper();
    }


    enum {
      signalTimeFormatChanged = 1,
      signalTimerNotificationChanged = 2
    };

  Q_SIGNALS:
    void timeFormatChanged();

    void timerNotificationChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    KClockSettings();
    friend class KClockSettingsHelper;


    // Global
    QString mTimeFormat;
    static QString defaultTimeFormatValue_helper();
    int mTimerNotification;
    static int defaultTimerNotificationValue_helper();
};

#endif

