]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnwidget.h
* Use Nepomuk for getting the meta data instead of KFileMetaInfo.
[dolphin.git] / src / dolphincolumnwidget.h
index 1054af2e32a6f1bb9f6c6b771967bacdda043390..916bfac2ed1a7c8e6b383a7322db5ba4396ee899 100644 (file)
 class DolphinColumnView;
 class DolphinModel;
 class DolphinSortFilterProxyModel;
-class IconManager;
-class KDirLister;
+class DolphinDirLister;
+class DolphinViewAutoScroller;
+class KFilePreviewGenerator;
 class KJob;
 class KFileItem;
 class KFileItemList;
+class SelectionManager;
+class ToolTipManager;
 class QPixmap;
 
 /**
@@ -98,6 +101,24 @@ public:
      */
     void setNameFilter(const QString& nameFilter);
 
+    /**
+     * Does an inline editing for the item \a item.
+     */
+    void editItem(const KFileItem& item);
+
+    /**
+     * Returns the item on the position \a pos. The KFileItem instance
+     * is null if no item is below the position.
+     */
+    KFileItem itemAt(const QPoint& pos) const;
+
+    KFileItemList selectedItems() const;
+
+    /**
+     * Returns the MIME data for the selected items.
+     */
+    QMimeData* selectionMimeData() const;
+
 protected:
     virtual QStyleOptionViewItem viewOptions() const;
     virtual void startDrag(Qt::DropActions supportedActions);
@@ -110,19 +131,16 @@ protected:
     virtual void keyPressEvent(QKeyEvent* event);
     virtual void contextMenuEvent(QContextMenuEvent* event);
     virtual void wheelEvent(QWheelEvent* event);
+    virtual void leaveEvent(QEvent* event);
     virtual void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
+    virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous);
 
 private slots:
-    /**
-     * If the item specified by \a index is a directory, then this
-     * directory will be loaded in a new column. If the  item is a
-     * file, the corresponding application will get started.
-     */
-    void triggerItem(const QModelIndex& index);
-
     void slotEntered(const QModelIndex& index);
-
+    void slotClicked(const QModelIndex& index);
+    void slotDoubleClicked(const QModelIndex& index);
     void requestActivation();
+    void updateFont();
 
 private:
     /** Used by DolphinColumnWidget::setActive(). */
@@ -131,25 +149,28 @@ private:
     /** Used by DolphinColumnWidget::setActive(). */
     void deactivate();
 
-    KFileItem itemForIndex(const QModelIndex& index) const;
-
 private:
     bool m_active;
     DolphinColumnView* m_view;
+    SelectionManager* m_selectionManager;
+    DolphinViewAutoScroller* m_autoScroller;
     KUrl m_url;      // URL of the directory that is shown
     KUrl m_childUrl; // URL of the next column that is shown
 
     QFont m_font;
     QSize m_decorationSize;
 
-    KDirLister* m_dirLister;
+    DolphinDirLister* m_dirLister;
     DolphinModel* m_dolphinModel;
     DolphinSortFilterProxyModel* m_proxyModel;
 
-    IconManager* m_iconManager;
+    KFilePreviewGenerator* m_previewGenerator;
+
+    ToolTipManager* m_toolTipManager;
+
+    QRect m_dropRect;
 
-    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
+    friend class DolphinColumnView;
 };
 
 inline bool DolphinColumnWidget::isActive() const