// This file is generated by kconfig_compiler_kf5 from ark.kcfg.
// All changes you do to this file will be lost.
#ifndef ARKSETTINGS_H
#define ARKSETTINGS_H

#include "kerfuffle_export.h"

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

class KERFUFFLE_EXPORT ArkSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:
    class EnumDefaultOpenAction
    {
      public:
      enum type { Preview, Open, COUNT };
    };

    static ArkSettings *self();
    ~ArkSettings();

    /**
      Set Whether to show a warning when creating zip archives with AES encryption.
    */
    static
    void setShowEncryptionWarning( bool v )
    {
      if (v != self()->mShowEncryptionWarning && !self()->isImmutable( QStringLiteral( "showEncryptionWarning" ) )) {
        self()->mShowEncryptionWarning = v;
        Q_EMIT self()->showEncryptionWarningChanged();
      }
    }

    Q_PROPERTY(bool showEncryptionWarning READ showEncryptionWarning WRITE setShowEncryptionWarning NOTIFY showEncryptionWarningChanged)
    /**
      Get Whether to show a warning when creating zip archives with AES encryption.
    */
    static
    bool showEncryptionWarning()
    {
      return self()->mShowEncryptionWarning;
    }

    /**
      Set Default action when opening archive entries.
    */
    static
    void setDefaultOpenAction( int v )
    {
      if (v != self()->mDefaultOpenAction && !self()->isImmutable( QStringLiteral( "defaultOpenAction" ) )) {
        self()->mDefaultOpenAction = v;
        Q_EMIT self()->defaultOpenActionChanged();
      }
    }

    Q_PROPERTY(int defaultOpenAction READ defaultOpenAction WRITE setDefaultOpenAction NOTIFY defaultOpenActionChanged)
    /**
      Get Default action when opening archive entries.
    */
    static
    int defaultOpenAction()
    {
      return self()->mDefaultOpenAction;
    }

    /**
      Set Open destination folder after extraction.
    */
    static
    void setOpenDestinationFolderAfterExtraction( bool v )
    {
      if (v != self()->mOpenDestinationFolderAfterExtraction && !self()->isImmutable( QStringLiteral( "openDestinationFolderAfterExtraction" ) )) {
        self()->mOpenDestinationFolderAfterExtraction = v;
        Q_EMIT self()->openDestinationFolderAfterExtractionChanged();
      }
    }

    Q_PROPERTY(bool openDestinationFolderAfterExtraction READ openDestinationFolderAfterExtraction WRITE setOpenDestinationFolderAfterExtraction NOTIFY openDestinationFolderAfterExtractionChanged)
    /**
      Get Open destination folder after extraction.
    */
    static
    bool openDestinationFolderAfterExtraction()
    {
      return self()->mOpenDestinationFolderAfterExtraction;
    }

    /**
      Set Close Ark after extraction.
    */
    static
    void setCloseAfterExtraction( bool v )
    {
      if (v != self()->mCloseAfterExtraction && !self()->isImmutable( QStringLiteral( "closeAfterExtraction" ) )) {
        self()->mCloseAfterExtraction = v;
        Q_EMIT self()->closeAfterExtractionChanged();
      }
    }

    Q_PROPERTY(bool closeAfterExtraction READ closeAfterExtraction WRITE setCloseAfterExtraction NOTIFY closeAfterExtractionChanged)
    /**
      Get Close Ark after extraction.
    */
    static
    bool closeAfterExtraction()
    {
      return self()->mCloseAfterExtraction;
    }

    /**
      Set Preserve paths when extracting.
    */
    static
    void setPreservePaths( bool v )
    {
      if (v != self()->mPreservePaths && !self()->isImmutable( QStringLiteral( "preservePaths" ) )) {
        self()->mPreservePaths = v;
        Q_EMIT self()->preservePathsChanged();
      }
    }

    Q_PROPERTY(bool preservePaths READ preservePaths WRITE setPreservePaths NOTIFY preservePathsChanged)
    /**
      Get Preserve paths when extracting.
    */
    static
    bool preservePaths()
    {
      return self()->mPreservePaths;
    }

    /**
      Set Extract to a subfolder if the archive has more than one top-level entry.
    */
    static
    void setExtractToSubfolder( bool v )
    {
      if (v != self()->mExtractToSubfolder && !self()->isImmutable( QStringLiteral( "extractToSubfolder" ) )) {
        self()->mExtractToSubfolder = v;
        Q_EMIT self()->extractToSubfolderChanged();
      }
    }

    Q_PROPERTY(bool extractToSubfolder READ extractToSubfolder WRITE setExtractToSubfolder NOTIFY extractToSubfolderChanged)
    /**
      Get Extract to a subfolder if the archive has more than one top-level entry.
    */
    static
    bool extractToSubfolder()
    {
      return self()->mExtractToSubfolder;
    }

    /**
      Set How the main window is divided.
    */
    static
    void setSplitterSizes( const QList<int> & v )
    {
      if (v != self()->mSplitterSizes && !self()->isImmutable( QStringLiteral( "splitterSizes" ) )) {
        self()->mSplitterSizes = v;
        Q_EMIT self()->splitterSizesChanged();
      }
    }

    Q_PROPERTY(QList<int> splitterSizes READ splitterSizes WRITE setSplitterSizes NOTIFY splitterSizesChanged)
    /**
      Get How the main window is divided.
    */
    static
    QList<int> splitterSizes()
    {
      return self()->mSplitterSizes;
    }

    /**
      Set Whether to show the information panel.
    */
    static
    void setShowInfoPanel( bool v )
    {
      if (v != self()->mShowInfoPanel && !self()->isImmutable( QStringLiteral( "showInfoPanel" ) )) {
        self()->mShowInfoPanel = v;
        Q_EMIT self()->showInfoPanelChanged();
      }
    }

    Q_PROPERTY(bool showInfoPanel READ showInfoPanel WRITE setShowInfoPanel NOTIFY showInfoPanelChanged)
    /**
      Get Whether to show the information panel.
    */
    static
    bool showInfoPanel()
    {
      return self()->mShowInfoPanel;
    }

    /**
      Set disabledPlugins
    */
    static
    void setDisabledPlugins( const QStringList & v )
    {
      if (v != self()->mDisabledPlugins && !self()->isImmutable( QStringLiteral( "disabledPlugins" ) )) {
        self()->mDisabledPlugins = v;
        Q_EMIT self()->disabledPluginsChanged();
      }
    }

    Q_PROPERTY(QStringList disabledPlugins READ disabledPlugins WRITE setDisabledPlugins NOTIFY disabledPluginsChanged)
    /**
      Get disabledPlugins
    */
    static
    QStringList disabledPlugins()
    {
      return self()->mDisabledPlugins;
    }

    /**
      Set Whether to limit the preview according to file size.
    */
    static
    void setLimitPreviewFileSize( bool v )
    {
      if (v != self()->mLimitPreviewFileSize && !self()->isImmutable( QStringLiteral( "limitPreviewFileSize" ) )) {
        self()->mLimitPreviewFileSize = v;
        Q_EMIT self()->limitPreviewFileSizeChanged();
      }
    }

    Q_PROPERTY(bool limitPreviewFileSize READ limitPreviewFileSize WRITE setLimitPreviewFileSize NOTIFY limitPreviewFileSizeChanged)
    /**
      Get Whether to limit the preview according to file size.
    */
    static
    bool limitPreviewFileSize()
    {
      return self()->mLimitPreviewFileSize;
    }

    /**
      Set Preview file size limit in megabytes.
    */
    static
    void setPreviewFileSizeLimit( int v )
    {
      if (v != self()->mPreviewFileSizeLimit && !self()->isImmutable( QStringLiteral( "previewFileSizeLimit" ) )) {
        self()->mPreviewFileSizeLimit = v;
        Q_EMIT self()->previewFileSizeLimitChanged();
      }
    }

    Q_PROPERTY(int previewFileSizeLimit READ previewFileSizeLimit WRITE setPreviewFileSizeLimit NOTIFY previewFileSizeLimitChanged)
    /**
      Get Preview file size limit in megabytes.
    */
    static
    int previewFileSizeLimit()
    {
      return self()->mPreviewFileSizeLimit;
    }


    enum {
      signalShowEncryptionWarningChanged = 0x1,
      signalDefaultOpenActionChanged = 0x2,
      signalOpenDestinationFolderAfterExtractionChanged = 0x4,
      signalCloseAfterExtractionChanged = 0x8,
      signalPreservePathsChanged = 0x10,
      signalExtractToSubfolderChanged = 0x20,
      signalSplitterSizesChanged = 0x40,
      signalShowInfoPanelChanged = 0x80,
      signalDisabledPluginsChanged = 0x100,
      signalLimitPreviewFileSizeChanged = 0x200,
      signalPreviewFileSizeLimitChanged = 0x400
    };

  Q_SIGNALS:
    void showEncryptionWarningChanged();

    void defaultOpenActionChanged();

    void openDestinationFolderAfterExtractionChanged();

    void closeAfterExtractionChanged();

    void preservePathsChanged();

    void extractToSubfolderChanged();

    void splitterSizesChanged();

    void showInfoPanelChanged();

    void disabledPluginsChanged();

    void limitPreviewFileSizeChanged();

    void previewFileSizeLimitChanged();

  private:
    void itemChanged(quint64 flags);

  protected:
    ArkSettings();
    friend class ArkSettingsHelper;


    // General
    bool mShowEncryptionWarning;
    int mDefaultOpenAction;

    // Extraction
    bool mOpenDestinationFolderAfterExtraction;
    bool mCloseAfterExtraction;
    bool mPreservePaths;
    bool mExtractToSubfolder;

    // MainWindow
    QList<int> mSplitterSizes;
    bool mShowInfoPanel;

    // Plugins
    QStringList mDisabledPlugins;

    // Preview
    bool mLimitPreviewFileSize;
    int mPreviewFileSizeLimit;

  private:
};

#endif

