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

#include <views/dolphinview.h>
#include <qnamespace.h>
#include <dolphin_export.h>

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

#include <kfileitemdelegate.h>

class DOLPHIN_EXPORT ViewPropertySettings : public KConfigSkeleton
{
  public:

    ViewPropertySettings( std::unique_ptr<KConfig> config );
    ~ViewPropertySettings() override;

    /**
      Set Hidden files shown
    */
    void setHiddenFilesShown( bool v )
    {
      if (!isHiddenFilesShownImmutable())
        mHiddenFilesShown = v;
    }

    /**
      Get Hidden files shown
    */
    bool hiddenFilesShown() const
    {
      return mHiddenFilesShown;
    }

    /**
      Is Hidden files shown Immutable
    */
    bool isHiddenFilesShownImmutable() const
    {
      return isImmutable( QStringLiteral( "HiddenFilesShown" ) );
    }

    /**
      Set Version
    */
    void setVersion( int v )
    {
      if (!isVersionImmutable())
        mVersion = v;
    }

    /**
      Get Version
    */
    int version() const
    {
      return mVersion;
    }

    /**
      Is Version Immutable
    */
    bool isVersionImmutable() const
    {
      return isImmutable( QStringLiteral( "Version" ) );
    }

    /**
      Set View Mode
    */
    void setViewMode( int v )
    {
      if (!isViewModeImmutable())
        mViewMode = v;
    }

    /**
      Get View Mode
    */
    int viewMode() const
    {
      return mViewMode;
    }

    /**
      Is View Mode Immutable
    */
    bool isViewModeImmutable() const
    {
      return isImmutable( QStringLiteral( "ViewMode" ) );
    }

    /**
      Set Zoom Level
    */
    void setZoomLevel( int v )
    {
      if (!isZoomLevelImmutable())
        mZoomLevel = v;
    }

    /**
      Get Zoom Level
    */
    int zoomLevel() const
    {
      return mZoomLevel;
    }

    /**
      Is Zoom Level Immutable
    */
    bool isZoomLevelImmutable() const
    {
      return isImmutable( QStringLiteral( "ZoomLevel" ) );
    }

    /**
      Set Previews shown
    */
    void setPreviewsShown( bool v )
    {
      if (!isPreviewsShownImmutable())
        mPreviewsShown = v;
    }

    /**
      Get Previews shown
    */
    bool previewsShown() const
    {
      return mPreviewsShown;
    }

    /**
      Is Previews shown Immutable
    */
    bool isPreviewsShownImmutable() const
    {
      return isImmutable( QStringLiteral( "PreviewsShown" ) );
    }

    /**
      Set Grouped Sorting
    */
    void setGroupedSorting( bool v )
    {
      if (!isGroupedSortingImmutable())
        mGroupedSorting = v;
    }

    /**
      Get Grouped Sorting
    */
    bool groupedSorting() const
    {
      return mGroupedSorting;
    }

    /**
      Is Grouped Sorting Immutable
    */
    bool isGroupedSortingImmutable() const
    {
      return isImmutable( QStringLiteral( "GroupedSorting" ) );
    }

    /**
      Set Sort files by
    */
    void setSortRole( const QString & v )
    {
      if (!isSortRoleImmutable())
        mSortRole = v;
    }

    /**
      Get Sort files by
    */
    QString sortRole() const
    {
      return mSortRole;
    }

    /**
      Is Sort files by Immutable
    */
    bool isSortRoleImmutable() const
    {
      return isImmutable( QStringLiteral( "SortRole" ) );
    }

    /**
      Set Group files by
    */
    void setGroupRole( const QString & v )
    {
      if (!isGroupRoleImmutable())
        mGroupRole = v;
    }

    /**
      Get Group files by
    */
    QString groupRole() const
    {
      return mGroupRole;
    }

    /**
      Is Group files by Immutable
    */
    bool isGroupRoleImmutable() const
    {
      return isImmutable( QStringLiteral( "GroupRole" ) );
    }

    /**
      Set Order in which to sort files
    */
    void setSortOrder( int v )
    {
      if (v < Qt::AscendingOrder)
      {
        qDebug() << "setSortOrder: value " << v << " is less than the minimum value of Qt::AscendingOrder";
        v = Qt::AscendingOrder;
      }

      if (v > Qt::DescendingOrder)
      {
        qDebug() << "setSortOrder: value " << v << " is greater than the maximum value of Qt::DescendingOrder";
        v = Qt::DescendingOrder;
      }

      if (!isSortOrderImmutable())
        mSortOrder = v;
    }

    /**
      Get Order in which to sort files
    */
    int sortOrder() const
    {
      return mSortOrder;
    }

    /**
      Is Order in which to sort files Immutable
    */
    bool isSortOrderImmutable() const
    {
      return isImmutable( QStringLiteral( "SortOrder" ) );
    }

    /**
      Set Show folders first when sorting files and folders
    */
    void setSortFoldersFirst( bool v )
    {
      if (!isSortFoldersFirstImmutable())
        mSortFoldersFirst = v;
    }

    /**
      Get Show folders first when sorting files and folders
    */
    bool sortFoldersFirst() const
    {
      return mSortFoldersFirst;
    }

    /**
      Is Show folders first when sorting files and folders Immutable
    */
    bool isSortFoldersFirstImmutable() const
    {
      return isImmutable( QStringLiteral( "SortFoldersFirst" ) );
    }

    /**
      Set Show hidden files and folders last
    */
    void setSortHiddenLast( bool v )
    {
      if (!isSortHiddenLastImmutable())
        mSortHiddenLast = v;
    }

    /**
      Get Show hidden files and folders last
    */
    bool sortHiddenLast() const
    {
      return mSortHiddenLast;
    }

    /**
      Is Show hidden files and folders last Immutable
    */
    bool isSortHiddenLastImmutable() const
    {
      return isImmutable( QStringLiteral( "SortHiddenLast" ) );
    }

    /**
      Set Visible roles
    */
    void setVisibleRoles( const QStringList & v )
    {
      if (!isVisibleRolesImmutable())
        mVisibleRoles = v;
    }

    /**
      Get Visible roles
    */
    QStringList visibleRoles() const
    {
      return mVisibleRoles;
    }

    /**
      Is Visible roles Immutable
    */
    bool isVisibleRolesImmutable() const
    {
      return isImmutable( QStringLiteral( "VisibleRoles" ) );
    }

    /**
      Set Header column widths
    */
    void setHeaderColumnWidths( const QList<int> & v )
    {
      if (!isHeaderColumnWidthsImmutable())
        mHeaderColumnWidths = v;
    }

    /**
      Get Header column widths
    */
    QList<int> headerColumnWidths() const
    {
      return mHeaderColumnWidths;
    }

    /**
      Is Header column widths Immutable
    */
    bool isHeaderColumnWidthsImmutable() const
    {
      return isImmutable( QStringLiteral( "HeaderColumnWidths" ) );
    }

    /**
      Set Properties last changed
    */
    void setTimestamp( const QDateTime & v )
    {
      if (!isTimestampImmutable())
        mTimestamp = v;
    }

    /**
      Get Properties last changed
    */
    QDateTime timestamp() const
    {
      return mTimestamp;
    }

    /**
      Is Properties last changed Immutable
    */
    bool isTimestampImmutable() const
    {
      return isImmutable( QStringLiteral( "Timestamp" ) );
    }

    /**
      Set View mode changed once by dynamic view
    */
    void setDynamicViewPassed( bool v )
    {
      if (!isDynamicViewPassedImmutable())
        mDynamicViewPassed = v;
    }

    /**
      Get View mode changed once by dynamic view
    */
    bool dynamicViewPassed() const
    {
      return mDynamicViewPassed;
    }

    /**
      Is View mode changed once by dynamic view Immutable
    */
    bool isDynamicViewPassedImmutable() const
    {
      return isImmutable( QStringLiteral( "DynamicViewPassed" ) );
    }

    /**
      Set Additional Information
    */
    void setAdditionalInfo( const QStringList & v )
    {
      if (!isAdditionalInfoImmutable())
        mAdditionalInfo = v;
    }

    /**
      Get Additional Information
    */
    QStringList additionalInfo() const
    {
      return mAdditionalInfo;
    }

    /**
      Is Additional Information Immutable
    */
    bool isAdditionalInfoImmutable() const
    {
      return isImmutable( QStringLiteral( "AdditionalInfo" ) );
    }

  protected:

    // Settings
    bool mHiddenFilesShown;

    // Dolphin
    int mVersion;
    int mViewMode;
    int mZoomLevel;
    bool mPreviewsShown;
    bool mGroupedSorting;
    QString mSortRole;
    QString mGroupRole;
    int mSortOrder;
    bool mSortFoldersFirst;
    bool mSortHiddenLast;
    QStringList mVisibleRoles;
    QList<int> mHeaderColumnWidths;
    QDateTime mTimestamp;
    bool mDynamicViewPassed;
    QStringList mAdditionalInfo;
};

#endif

