]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinviewcontainer.h
Improvements for slow sorting roles
[dolphin.git] / src / dolphinviewcontainer.h
index 82b105a4a4f1e4a2b41d5e4e61b85428f59c068f..734021aa9927731ae2ec889f4c779a5e8eacda9a 100644 (file)
@@ -42,7 +42,7 @@ class DolphinStatusBar;
  * @short Represents a view for the directory content
  *        including the navigation bar, filter bar and status bar.
  *
- * View modes for icons, details and columns are supported. Currently
+ * View modes for icons, compact and details are supported. Currently
  * Dolphin allows to have up to two views inside the main window.
  *
  * @see DolphinView
@@ -80,10 +80,13 @@ public:
     const DolphinView* view() const;
     DolphinView* view();
 
+    const DolphinSearchBox* searchBox() const;
+    DolphinSearchBox* searchBox();
+
     /**
      * Refreshes the view container to get synchronized with the (updated) Dolphin settings.
      */
-    void refresh();
+    void readSettings();
 
     /** Returns true, if the filter bar is visible. */
     bool isFilterBarVisible() const;
@@ -151,7 +154,9 @@ private slots:
      */
     void updateStatusBar();
 
-    void updateProgress(int percent);
+    void updateLoadingProgress(int percent);
+
+    void updateSortProgress(int percent);
 
     /**
      * Updates the statusbar to show an undetermined progress with the correct
@@ -170,7 +175,7 @@ private slots:
      * directory is opened in the view. If the item is a file, the file
      * gets started by the corresponding application.
      */
-    void slotItemTriggered(const KFileItem& item);
+    void slotItemActivated(const KFileItem& item);
 
     /**
      * Opens a the file \a url by opening the corresponding application.
@@ -209,10 +214,16 @@ private slots:
     void activate();
 
     /**
-     * Saves the state of the current view: contents position,
-     * root URL, ...
+     * Is invoked if the signal urlAboutToBeChanged() from the DolphinView
+     * is emitted. Tries to save the view-state.
      */
-    void saveViewState();
+    void slotViewUrlAboutToBeChanged(const KUrl& url);
+
+    /**
+     * Is invoked if the signal urlAboutToBeChanged() from the URL navigator
+     * is emitted. Tries to save the view-state.
+     */
+    void slotUrlNavigatorLocationAboutToBeChanged(const KUrl& url);
 
     /**
      * Restores the current view to show \a url and assures
@@ -263,6 +274,12 @@ private:
      */
     bool isSearchUrl(const KUrl& url) const;
 
+    /**
+     * Saves the state of the current view: contents position,
+     * root URL, ...
+     */
+    void saveViewState();
+
 private:
     QVBoxLayout* m_topLayout;
     KUrlNavigator* m_urlNavigator;
@@ -277,34 +294,4 @@ private:
     QElapsedTimer m_statusBarTimestamp;  // Time in ms since last update
 };
 
-inline const DolphinStatusBar* DolphinViewContainer::statusBar() const
-{
-    return m_statusBar;
-}
-
-inline DolphinStatusBar* DolphinViewContainer::statusBar()
-{
-    return m_statusBar;
-}
-
-inline const KUrlNavigator* DolphinViewContainer::urlNavigator() const
-{
-    return m_urlNavigator;
-}
-
-inline KUrlNavigator* DolphinViewContainer::urlNavigator()
-{
-    return m_urlNavigator;
-}
-
-inline const DolphinView* DolphinViewContainer::view() const
-{
-    return m_view;
-}
-
-inline DolphinView* DolphinViewContainer::view()
-{
-    return m_view;
-}
-
 #endif // DOLPHINVIEWCONTAINER_H