]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.h
Allow custom sorting of details-view columns
[dolphin.git] / src / views / dolphinview.h
index 9a3a83fa302b24f368d283833d3d357199617f8a..f2f15c592b5f73d8163229d438b3c9078eea2b96 100644 (file)
@@ -111,7 +111,6 @@ public:
     enum AdditionalInfo
     {
         NoInfo = 0,
-        NameInfo,
         SizeInfo,
         DateInfo,
         PermissionsInfo,
@@ -265,11 +264,15 @@ public:
     void stopLoading();
 
     /**
-     * Refreshes the view to get synchronized with the (updated) Dolphin settings.
-     * This method only needs to get invoked if the view settings for the Icons View,
-     * Details View or Columns View have been changed.
+     * Refreshes the view to get synchronized with the settings (e.g. icons size,
+     * font, ...).
      */
-    void refresh();
+    void readSettings();
+
+    /**
+     * Saves the current settings (e.g. icons size, font, ..).
+     */
+    void writeSettings();
 
     /**
      * Filters the currently shown items by \a nameFilter. All items
@@ -336,9 +339,7 @@ public:
     bool hasSelection() const;
 
     /**
-     * Returns the root item which represents the current URL. Note that the returned
-     * item can be null (KFileItem::isNull() will return true) in case that the directory
-     * has not been loaded.
+     * Returns the root item which represents the current URL.
      */
     KFileItem rootItem() const;
 
@@ -547,6 +548,9 @@ protected:
     /** Changes the zoom level if Control is pressed during a wheel event. */
     virtual void wheelEvent(QWheelEvent* event);
 
+    /** @reimp */
+    virtual void hideEvent(QHideEvent* event);
+
 private slots:
     /**
      * Marks the view as active (DolphinView:isActive() will return true)
@@ -580,15 +584,6 @@ private slots:
      */
     void emitSelectionChangedSignal();
 
-    /**
-     * Drops dragged URLs to the destination path \a destPath. If
-     * the URLs are dropped above an item inside the destination path,
-     * the item is indicated by \a destItem.
-     */
-    void dropUrls(const KFileItem& destItem,
-                  const KUrl& destPath,
-                  QDropEvent* event);
-
     /**
      * Updates the view properties of the current URL to the
      * sorting given by \a sorting.
@@ -658,6 +653,13 @@ private slots:
      */
     void slotSortRoleChangedByHeader(const QByteArray& current, const QByteArray& previous);
 
+    /**
+     * Is invoked when the visible roles have been changed by the user by dragging
+     * a header item. The view properties of the directory will get updated.
+     */
+    void slotVisibleRolesChangedByHeader(const QList<QByteArray>& current,
+                                         const QList<QByteArray>& previous);
+
     /**
      * Observes the item with the URL \a url. As soon as the directory
      * model indicates that the item is available, the item will
@@ -685,6 +687,8 @@ private slots:
      */
     void updateViewState();
 
+    void hideToolTip();
+
     //void slotUrlChangeRequested(const KUrl& url);
 
 private:
@@ -743,10 +747,12 @@ private:
     static QString fileSizeText(KIO::filesize_t fileSize);
 
 private:
-    bool m_active : 1;
-    bool m_tabsForFiles : 1;
-    bool m_assureVisibleCurrentIndex : 1;
-    bool m_isFolderWritable : 1;
+    bool m_active;
+    bool m_tabsForFiles;
+    bool m_assureVisibleCurrentIndex;
+    bool m_isFolderWritable;
+    bool m_dragging; // True if a dragging is done. Required to be able to decide whether a
+                     // tooltip may be shown when hovering an item.
 
     KUrl m_url;
     Mode m_mode;
@@ -766,7 +772,7 @@ private:
     KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
 
     QList<KUrl> m_selectedUrls; // Used for making the view to remember selections after F5
-    
+
     VersionControlObserver* m_versionControlObserver;
 
     // For unit tests