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

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

#include <QDir>
#include <QUrl>
#include <KCompletion>
class GeneralSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:
    class EnumSortingChoice
    {
      public:
      enum type { NaturalSorting, CaseInsensitiveSorting, CaseSensitiveSorting, COUNT };
    };

    static GeneralSettings *self();
    ~GeneralSettings();

    /**
      Set Should the URL be editable for the user
    */
    static
    void setEditableUrl( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "EditableUrl" ) ))
        self()->mEditableUrl = v;
    }

    /**
      Get Should the URL be editable for the user
    */
    static
    bool editableUrl()
    {
      return self()->mEditableUrl;
    }

    /**
      Set Text completion mode of the URL Navigator
    */
    static
    void setUrlCompletionMode( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "UrlCompletionMode" ) ))
        self()->mUrlCompletionMode = v;
    }

    /**
      Get Text completion mode of the URL Navigator
    */
    static
    int urlCompletionMode()
    {
      return self()->mUrlCompletionMode;
    }

    /**
      Set Should the full path be shown inside the location bar
    */
    static
    void setShowFullPath( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowFullPath" ) ))
        self()->mShowFullPath = v;
    }

    /**
      Get Should the full path be shown inside the location bar
    */
    static
    bool showFullPath()
    {
      return self()->mShowFullPath;
    }

    /**
      Set Should the full path be shown in the title bar
    */
    static
    void setShowFullPathInTitlebar( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowFullPathInTitlebar" ) ))
        self()->mShowFullPathInTitlebar = v;
    }

    /**
      Get Should the full path be shown in the title bar
    */
    static
    bool showFullPathInTitlebar()
    {
      return self()->mShowFullPathInTitlebar;
    }

    /**
      Set Internal version of Dolphin, containing 3 digits for major, minor, bugfix
    */
    static
    void setVersion( int v )
    {
      if (!self()->isImmutable( QStringLiteral( "Version" ) ))
        self()->mVersion = v;
    }

    /**
      Get Internal version of Dolphin, containing 3 digits for major, minor, bugfix
    */
    static
    int version()
    {
      return self()->mVersion;
    }

    /**
      Set Have the startup settings been modified (internal setting not shown in the UI)
    */
    static
    void setModifiedStartupSettings( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ModifiedStartupSettings" ) ))
        self()->mModifiedStartupSettings = v;
    }

    /**
      Get Have the startup settings been modified (internal setting not shown in the UI)
    */
    static
    bool modifiedStartupSettings()
    {
      return self()->mModifiedStartupSettings;
    }

    /**
      Set Home URL
    */
    static
    void setHomeUrl( const QString & v )
    {
      if (!self()->isImmutable( QStringLiteral( "HomeUrl" ) ))
        self()->mHomeUrl = v;
    }

    /**
      Get Home URL
    */
    static
    QString homeUrl()
    {
      return self()->mHomeUrl;
    }

    /**
      Set Split the view into two panes
    */
    static
    void setSplitView( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "SplitView" ) ))
        self()->mSplitView = v;
    }

    /**
      Get Split the view into two panes
    */
    static
    bool splitView()
    {
      return self()->mSplitView;
    }

    /**
      Set Should the filter bar be shown
    */
    static
    void setFilterBar( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "FilterBar" ) ))
        self()->mFilterBar = v;
    }

    /**
      Get Should the filter bar be shown
    */
    static
    bool filterBar()
    {
      return self()->mFilterBar;
    }

    /**
      Set Should the view properties be used for all folders
    */
    static
    void setGlobalViewProps( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "GlobalViewProps" ) ))
        self()->mGlobalViewProps = v;
    }

    /**
      Get Should the view properties be used for all folders
    */
    static
    bool globalViewProps()
    {
      return self()->mGlobalViewProps;
    }

    /**
      Set Browse through archives
    */
    static
    void setBrowseThroughArchives( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "BrowseThroughArchives" ) ))
        self()->mBrowseThroughArchives = v;
    }

    /**
      Get Browse through archives
    */
    static
    bool browseThroughArchives()
    {
      return self()->mBrowseThroughArchives;
    }

    /**
      Set Ask for confirmation when closing windows with multiple tabs.
    */
    static
    void setConfirmClosingMultipleTabs( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ConfirmClosingMultipleTabs" ) ))
        self()->mConfirmClosingMultipleTabs = v;
    }

    /**
      Get Ask for confirmation when closing windows with multiple tabs.
    */
    static
    bool confirmClosingMultipleTabs()
    {
      return self()->mConfirmClosingMultipleTabs;
    }

    /**
      Set Rename inline
    */
    static
    void setRenameInline( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "RenameInline" ) ))
        self()->mRenameInline = v;
    }

    /**
      Get Rename inline
    */
    static
    bool renameInline()
    {
      return self()->mRenameInline;
    }

    /**
      Set Show selection toggle
    */
    static
    void setShowSelectionToggle( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowSelectionToggle" ) ))
        self()->mShowSelectionToggle = v;
    }

    /**
      Get Show selection toggle
    */
    static
    bool showSelectionToggle()
    {
      return self()->mShowSelectionToggle;
    }

    /**
      Set Use tab for switching between right and left split
    */
    static
    void setUseTabForSwitchingSplitView( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "UseTabForSwitchingSplitView" ) ))
        self()->mUseTabForSwitchingSplitView = v;
    }

    /**
      Get Use tab for switching between right and left split
    */
    static
    bool useTabForSwitchingSplitView()
    {
      return self()->mUseTabForSwitchingSplitView;
    }

    /**
      Set Show tooltips
    */
    static
    void setShowToolTips( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowToolTips" ) ))
        self()->mShowToolTips = v;
    }

    /**
      Get Show tooltips
    */
    static
    bool showToolTips()
    {
      return self()->mShowToolTips;
    }

    /**
      Set Show 'Copy To' and 'Move To' commands in context menu
    */
    static
    void setShowCopyMoveMenu( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowCopyMoveMenu" ) ))
        self()->mShowCopyMoveMenu = v;
    }

    /**
      Get Show 'Copy To' and 'Move To' commands in context menu
    */
    static
    bool showCopyMoveMenu()
    {
      return self()->mShowCopyMoveMenu;
    }

    /**
      Set Timestamp since when the view properties are valid
    */
    static
    void setViewPropsTimestamp( const QDateTime & v )
    {
      if (!self()->isImmutable( QStringLiteral( "ViewPropsTimestamp" ) ))
        self()->mViewPropsTimestamp = v;
    }

    /**
      Get Timestamp since when the view properties are valid
    */
    static
    QDateTime viewPropsTimestamp()
    {
      return self()->mViewPropsTimestamp;
    }

    /**
      Set Use auto-expanding folders for all view types
    */
    static
    void setAutoExpandFolders( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "AutoExpandFolders" ) ))
        self()->mAutoExpandFolders = v;
    }

    /**
      Get Use auto-expanding folders for all view types
    */
    static
    bool autoExpandFolders()
    {
      return self()->mAutoExpandFolders;
    }

    /**
      Set Show zoom slider in the statusbar
    */
    static
    void setShowZoomSlider( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowZoomSlider" ) ))
        self()->mShowZoomSlider = v;
    }

    /**
      Get Show zoom slider in the statusbar
    */
    static
    bool showZoomSlider()
    {
      return self()->mShowZoomSlider;
    }

    /**
      Set Show the space information in the statusbar
    */
    static
    void setShowSpaceInfo( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "ShowSpaceInfo" ) ))
        self()->mShowSpaceInfo = v;
    }

    /**
      Get Show the space information in the statusbar
    */
    static
    bool showSpaceInfo()
    {
      return self()->mShowSpaceInfo;
    }

    /**
      Set Lock the layout of the panels
    */
    static
    void setLockPanels( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "LockPanels" ) ))
        self()->mLockPanels = v;
    }

    /**
      Get Lock the layout of the panels
    */
    static
    bool lockPanels()
    {
      return self()->mLockPanels;
    }

    /**
      Set Enlarge Small Previews
    */
    static
    void setEnlargeSmallPreviews( bool v )
    {
      if (!self()->isImmutable( QStringLiteral( "EnlargeSmallPreviews" ) ))
        self()->mEnlargeSmallPreviews = v;
    }

    /**
      Get Enlarge Small Previews
    */
    static
    bool enlargeSmallPreviews()
    {
      return self()->mEnlargeSmallPreviews;
    }

    /**
      Set Choose Natural, Case Sensitive, or Case Insensitive order of sorting the items
    */
    static
    void setSortingChoice( int v )
    {
      if (v != self()->mSortingChoice && !self()->isImmutable( QStringLiteral( "SortingChoice" ) )) {
        self()->mSortingChoice = v;
        self()->mSettingsChanged |= signalSortingChoiceChanged;
      }
    }

    /**
      Get Choose Natural, Case Sensitive, or Case Insensitive order of sorting the items
    */
    static
    int sortingChoice()
    {
      return self()->mSortingChoice;
    }


    enum {
      signalSortingChoiceChanged = 0x1
    };

  Q_SIGNALS:
    void sortingChoiceChanged();

  private:
    void itemChanged(quint64 flags);

  protected:
    GeneralSettings();
    friend class GeneralSettingsHelper;

    bool usrSave() Q_DECL_OVERRIDE;

    // General
    bool mEditableUrl;
    int mUrlCompletionMode;
    bool mShowFullPath;
    bool mShowFullPathInTitlebar;
    int mVersion;
    bool mModifiedStartupSettings;
    QString mHomeUrl;
    bool mSplitView;
    bool mFilterBar;
    bool mGlobalViewProps;
    bool mBrowseThroughArchives;
    bool mConfirmClosingMultipleTabs;
    bool mRenameInline;
    bool mShowSelectionToggle;
    bool mUseTabForSwitchingSplitView;
    bool mShowToolTips;
    bool mShowCopyMoveMenu;
    QDateTime mViewPropsTimestamp;
    bool mAutoExpandFolders;
    bool mShowZoomSlider;
    bool mShowSpaceInfo;
    bool mLockPanels;
    bool mEnlargeSmallPreviews;
    int mSortingChoice;

  private:
    uint mSettingsChanged;
};

#endif

