]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinview.h
information sidebar fixes:
[dolphin.git] / src / dolphinview.h
index f6b85f96b74e9cee4d9abdb2a889328934d7f39f..0ac116fabc8bb0eec515393c4e914d3f0fe42b8c 100644 (file)
 
 #include <kurlnavigator.h>
 
-#include <QDropEvent>
-#include <QLinkedList>
-#include <QListView>
-#include <QMouseEvent>
-#include <QVBoxLayout>
-#include <QWidget>
+#include <QtGui/QKeyEvent>
+#include <QtCore/QLinkedList>
+#include <QtGui/QListView>
+#include <QtGui/QBoxLayout>
+#include <QtGui/QWidget>
 
 class DolphinController;
 class FilterBar;
@@ -108,7 +107,8 @@ public:
         SortByPermissions,
         SortByOwner,
         SortByGroup,
-        MaxSortEnum = SortByGroup
+        SortByType,
+        MaxSortEnum = SortByType
     };
 
     DolphinView(DolphinMainWindow* mainwindow,
@@ -120,15 +120,31 @@ public:
     virtual ~DolphinView();
 
     /**
-     * Sets the current active URL.
-     * The signals KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
+     * Sets the current active URL, where all actions are applied. The
+     * URL navigator is synchronized with this URL. The signals
+     * KUrlNavigator::urlChanged() and KUrlNavigator::historyChanged()
      * are emitted.
+     * @see DolphinView::urlNavigator()
      */
     void setUrl(const KUrl& url);
 
-    /** Returns the current active URL. */
+    /**
+     * Returns the current active URL, where all actions are applied.
+     * The URL navigator is synchronized with this URL.
+     */
     const KUrl& url() const;
 
+    /**
+     * Returns the root URL of the view, which is defined as the first
+     * visible path of DolphinView::url(). Usually the root URL is
+     * equal to DolphinView::url(), but in the case of the column view
+     * when 2 columns are shown, the root URL might be:
+     * /home/peter/Documents
+     * and DolphinView::url() might return
+     * /home/peter/Documents/Music/
+     */
+    KUrl rootUrl() const;
+
     /**
      * Returns true if the view is active and hence all actions are
      * applied to this view.
@@ -350,6 +366,13 @@ public:
     /** Reloads the current directory. */
     void reload();
 
+    /**
+     * Refreshs 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.
+     */
+    void refresh();
+
 public slots:
     /**
      * Popups the filter bar above the status bar if \a show is true.
@@ -370,7 +393,7 @@ public slots:
     void requestActivation();
 
     /**
-     * Request of a selection change. The view will do its best to accomodate
+     * Request of a selection change. The view will do its best to accommodate
      * the request, but it is not guaranteed that all items in \a selection
      * will actually get selected. The view will e.g. not select items which
      * are not in the currently displayed folder.
@@ -450,7 +473,7 @@ private slots:
      * Replaces the icon of the item \a item by the preview pixmap
      * \a pixmap.
      */
-    void showPreview(const KFileItem* item, const QPixmap& pixmap);
+    void showPreview(const KFileItem& item, const QPixmap& pixmap);
 
     /**
      * Restores the x- and y-position of the contents if the
@@ -521,6 +544,20 @@ private slots:
     /** Applies an item effect to all cut items of the clipboard. */
     void updateCutItems();
 
+    /**
+     * Updates the status bar to show hover information for the
+     * item with the index \a index. If currently other items are selected,
+     * no hover information is shown.
+     * @see DolphinView::clearHoverInformation()
+     */
+    void showHoverInformation(const QModelIndex& index);
+
+    /**
+     * Clears the hover information shown in the status bar.
+     * @see DolphinView::showHoverInformation().
+     */
+    void clearHoverInformation();
+
 private:
     void startDirLister(const KUrl& url, bool reload = false);
 
@@ -592,6 +629,7 @@ private:
 
     bool m_showProgress;
     bool m_blockContentsMovedSignal;
+    bool m_initializeColumnView;
     Mode m_mode;
 
     int m_iconSize;