]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnwidget.h
Move the Ctrl-wheel zoom handling to dolphinview.
[dolphin.git] / src / dolphincolumnwidget.h
index fdb0471f2eb6b90b55c7aca6fb8b0e4dd79c36af..1054af2e32a6f1bb9f6c6b771967bacdda043390 100644 (file)
 #ifndef DOLPHINCOLUMNWIDGET_H
 #define DOLPHINCOLUMNWIDGET_H
 
+#include "dolphinview.h"
+
+#include <QFont>
 #include <QListView>
+#include <QSize>
 #include <QStyleOption>
 
 #include <kurl.h>
@@ -28,7 +32,9 @@
 class DolphinColumnView;
 class DolphinModel;
 class DolphinSortFilterProxyModel;
+class IconManager;
 class KDirLister;
+class KJob;
 class KFileItem;
 class KFileItemList;
 class QPixmap;
@@ -75,6 +81,8 @@ public:
     /** Reloads the directory DolphinColumnWidget::url(). */
     void reload();
 
+    void setSorting(DolphinView::Sorting sorting);
+    void setSortOrder(Qt::SortOrder order);
     void setShowHiddenFiles(bool show);
     void setShowPreview(bool show);
 
@@ -92,6 +100,7 @@ public:
 
 protected:
     virtual QStyleOptionViewItem viewOptions() const;
+    virtual void startDrag(Qt::DropActions supportedActions);
     virtual void dragEnterEvent(QDragEnterEvent* event);
     virtual void dragLeaveEvent(QDragLeaveEvent* event);
     virtual void dragMoveEvent(QDragMoveEvent* event);
@@ -100,6 +109,7 @@ protected:
     virtual void mousePressEvent(QMouseEvent* event);
     virtual void keyPressEvent(QKeyEvent* event);
     virtual void contextMenuEvent(QContextMenuEvent* event);
+    virtual void wheelEvent(QWheelEvent* event);
     virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
 
 private slots:
@@ -110,21 +120,10 @@ private slots:
      */
     void triggerItem(const QModelIndex& index);
 
-    /**
-     * Generates a preview image for each file item in \a items.
-     * The current preview settings (maximum size, 'Show Preview' menu)
-     * are respected.
-     */
-    void generatePreviews(const KFileItemList& items);
-
-    /**
-     * Replaces the icon of the item \a item by the preview pixmap
-     * \a pixmap.
-     */
-    void showPreview(const KFileItem& item, const QPixmap& pixmap);
-
     void slotEntered(const QModelIndex& index);
 
+    void requestActivation();
+
 private:
     /** Used by DolphinColumnWidget::setActive(). */
     void activate();
@@ -132,25 +131,23 @@ private:
     /** Used by DolphinColumnWidget::setActive(). */
     void deactivate();
 
-    /**
-     * Returns true, if the item \a item has been cut into
-     * the clipboard.
-     */
-    bool isCutItem(const KFileItem& item) const;
-
     KFileItem itemForIndex(const QModelIndex& index) const;
 
 private:
     bool m_active;
-    bool m_showPreview;
     DolphinColumnView* m_view;
     KUrl m_url;      // URL of the directory that is shown
     KUrl m_childUrl; // URL of the next column that is shown
-    QStyleOptionViewItem m_viewOptions;
+
+    QFont m_font;
+    QSize m_decorationSize;
+
     KDirLister* m_dirLister;
     DolphinModel* m_dolphinModel;
     DolphinSortFilterProxyModel* m_proxyModel;
 
+    IconManager* m_iconManager;
+
     bool m_dragging;   // TODO: remove this property when the issue #160611 is solved in Qt 4.4
     QRect m_dropRect;  // TODO: remove this property when the issue #160611 is solved in Qt 4.4
 };
@@ -183,9 +180,4 @@ inline const KUrl& DolphinColumnWidget::url() const
     return m_url;
 }
 
-inline QStyleOptionViewItem DolphinColumnWidget::viewOptions() const
-{
-    return m_viewOptions;
-}
-
 #endif