]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/viewproperties.h
Now we have it: don't update the whole viewport, and be safe when drawing, so there...
[dolphin.git] / src / viewproperties.h
index b4d9500bc66e57c1e905c59b2bcc4c564de745b7..b4d6ac724c48d5ad91da900b391a9ff53d6d6b33 100644 (file)
 
 #include <dolphinview.h>
 #include <kurl.h>
-#include <qdatetime.h>
-
-#include "directoryviewpropertysettings.h"
-
-class QFile;
+#include <libdolphin_export.h>
 
+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