]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnview.h
Move the Ctrl-wheel zoom handling to dolphinview.
[dolphin.git] / src / dolphincolumnview.h
index 80228a84cc35261713f383f824872d45758532e1..6ac4fdb3f177986e1b8014109bf898397919e970 100644 (file)
 #ifndef DOLPHINCOLUMNVIEW_H
 #define DOLPHINCOLUMNVIEW_H
 
+#include "dolphinview.h"
+
 #include <kurl.h>
 
 #include <QAbstractItemView>
 #include <QList>
+#include <QString>
 #include <QStyleOption>
 
 class DolphinColumnWidget;
 class DolphinController;
 class DolphinModel;
 class QAbstractProxyModel;
+class QFrame;
 class QTimeLine;
 
 /**
@@ -69,13 +73,25 @@ public:
     /** Returns the URL of the first column. */
     KUrl rootUrl() const;
 
-public slots:
+    /**
+     * Filters the currently shown items by \a nameFilter. All items
+     * which contain the given filter string will be shown.
+     */
+    void setNameFilter(const QString& nameFilter);
+
+    /**
+     * Returns the currently used name filter. All items
+     * which contain the name filter will be shown.
+     */
+    QString nameFilter() const;
+
     /**
      * Shows the column which represents the URL \a url. If the column
      * is already shown, it gets activated, otherwise it will be created.
      */
     void showColumn(const KUrl& url);
 
+public slots:
     /** @see QAbstractItemView::selectAll() */
     virtual void selectAll();
 
@@ -89,6 +105,7 @@ protected:
 
     virtual void mousePressEvent(QMouseEvent* event);
     virtual void resizeEvent(QResizeEvent* event);
+    virtual void wheelEvent(QWheelEvent* event);
 
 private slots:
     void zoomIn();
@@ -114,8 +131,10 @@ private slots:
      */
     void updateColumnsBackground(bool active);
 
-    void slotShowHiddenFilesChanged(bool show);
-    void slotShowPreviewChanged(bool show);
+    void slotSortingChanged(DolphinView::Sorting sorting);
+    void slotSortOrderChanged(Qt::SortOrder order);
+    void slotShowHiddenFilesChanged();
+    void slotShowPreviewChanged();
 
 private:
     bool isZoomInPossible() const;
@@ -156,7 +175,9 @@ private:
     int m_index;
     int m_contentX;
     QList<DolphinColumnWidget*> m_columns;
+    QFrame* m_emptyViewport;
     QTimeLine* m_animation;
+    QString m_nameFilter;
 
     friend class DolphinColumnWidget;
 };