X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/3316903fe8a9a3c95dad18d19d795cdb55208473..d6488887ecf69d7f192b94de8dce34fae0b7eb76:/src/viewproperties.h diff --git a/src/viewproperties.h b/src/viewproperties.h index b4d9500bc..b4d6ac724 100644 --- a/src/viewproperties.h +++ b/src/viewproperties.h @@ -23,12 +23,9 @@ #include #include -#include - -#include "directoryviewpropertysettings.h" - -class QFile; +#include +class ViewPropertySettings; /** * @brief Maintains the view properties like 'view mode' or * 'show hidden files' for a directory. @@ -50,7 +47,7 @@ class QFile; * (see GeneralSettings::globalViewMode()), the values from the global .directory file * are used for initialization. */ -class ViewProperties +class LIBDOLPHINPRIVATE_EXPORT ViewProperties { public: explicit ViewProperties(const KUrl& url); @@ -65,12 +62,18 @@ public: void setShowHiddenFiles(bool show); bool showHiddenFiles() const; + void setCategorizedSorting(bool categorized); + bool categorizedSorting() const; + void setSorting(DolphinView::Sorting sorting); DolphinView::Sorting sorting() const; void setSortOrder(Qt::SortOrder sortOrder); Qt::SortOrder sortOrder() const; + void setAdditionalInfo(KFileItemDelegate::InformationList info); + KFileItemDelegate::InformationList additionalInfo() const; + /** * Sets the directory properties view mode, show preview, * show hidden files, sorting and sort order like @@ -97,6 +100,15 @@ public: */ void save(); + /** + * Returns the URL of the directory, where the mirrored view properties + * are stored into. Mirrored view properties are used if: + * - there is no write access for storing the view properties into + * the original directory + * - for non local directories + */ + static KUrl mirroredDirectory(); + private: /** * Returns the destination directory path where the view @@ -105,14 +117,26 @@ private: */ QString destinationDir(const QString& subDir) const; - ViewProperties(const ViewProperties& props); - ViewProperties& operator= (const ViewProperties& props); + Q_DISABLE_COPY(ViewProperties) private: + enum AdditionalInfoValues + { + NoInfo = 0, + SizeInfo = 1, + DateInfo = 2, + PermissionsInfo = 4, + OwnerInfo = 8, + GroupInfo = 16, + TypeInfo = 32 + }; + bool m_changedProps; bool m_autoSave; QString m_filepath; ViewPropertySettings* m_node; + + static bool m_nepomukSupport; }; #endif