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

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

class QQmlEngine;
class QJSEngine;

class Config : public KConfigSkeleton
{
  Q_OBJECT
  QML_ELEMENT
  QML_SINGLETON
  public:

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

    /**
      Set Show the Menubar.
    */
    static
    void setShowMenubar( bool v )
    {
      if (v != self()->mShowMenubar && !self()->isShowMenubarImmutable()) {
        self()->mShowMenubar = v;
        Q_EMIT self()->showMenubarChanged();
      }
    }

    Q_PROPERTY(bool showMenubar READ showMenubar WRITE setShowMenubar NOTIFY showMenubarChanged)
    Q_PROPERTY(bool isShowMenubarImmutable READ isShowMenubarImmutable CONSTANT)
    Q_PROPERTY(bool defaultShowMenubarValue READ defaultShowMenubarValue CONSTANT)
    /**
      Get Show the Menubar.
    */
    static
    bool showMenubar()
    {
      return self()->mShowMenubar;
    }

    /**
      Is Show the Menubar. Immutable
    */
    static
    bool isShowMenubarImmutable()
    {
      return self()->isImmutable( QStringLiteral( "showMenubar" ) );
    }

    /**
      Get Show the Menubar. default value
    */
    static
    bool defaultShowMenubarValue()
    {
        return defaultShowMenubarValue_helper();
    }


    enum {
      signalShowMenubarChanged = 1
    };

  Q_SIGNALS:
    void showMenubarChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:
    Config(QObject *parent = nullptr);
    friend class ConfigHelper;


    // General
    bool mShowMenubar;
    static bool defaultShowMenubarValue_helper();
};

#endif

