]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/folderexpander.h
Group classes into folders, Dolphin is too big in the meantime for having a flat...
[dolphin.git] / src / folderexpander.h
index 136b6b152e9faeeaaa27cd7d292a64e4a726ae63..d8da29f17d972e006a62dbb8ed97ae64e6a53394 100644 (file)
@@ -33,19 +33,6 @@ class QSortFilterProxyModel;
 class QModelIndex;
 class KDirModel;
 
-/* Grants "auto expand"/ "spring-loaded folders" to 
-   the provided view.  Qt has its own auto-expand 
-   mechanism, but this works only for QTreeView and
-   does not play well with our auto-scrolling in
-   the Folders pane.  Auto-expansion is enabled by default.
-
-   If the provided view is a QTreeView, the expanded state
-   is automatically toggled on hover.  Otherwise, the enterDir()
-   signal is emitted, and the caller needs to ensure that
-   the requested directory is entered.
-
-   The FolderExpander becomes a child of the provided view */
-
 /**
  * Grants auto expanding functionality to the provided item view.
  * Qt has its own auto expand mechanism, but this works only
@@ -53,7 +40,7 @@ class KDirModel;
  * per default.
  *
  * If the provided view is an instance of the class QTreeView, the
- * expanded of the directory is automatically done on hover. Otherwise
+ * expansion of the directory is automatically done on hover. Otherwise
  * the enterDir() signal is emitted and the caller needs to ensure that
  * the requested directory is entered.
  *
@@ -62,29 +49,30 @@ class KDirModel;
 class LIBDOLPHINPRIVATE_EXPORT FolderExpander : public QObject
 {
     Q_OBJECT
-    
+
 public:
     FolderExpander(QAbstractItemView* view, QSortFilterProxyModel* proxyModel);
     virtual ~FolderExpander();
-  
+
     void setEnabled(bool enabled);
     bool enabled() const;
-  
+
 signals:
     /**
      * Is emitted if the directory \a dirModelIndex should be entered. The
      * signal is not emitted when a QTreeView is used, as the entering of
      * the directory is already provided by expanding the tree node.
      */
-    void enterDir(const QModelIndex& dirModelIndex);
-    
+    void enterDir(const QModelIndex& dirModelIndex, QAbstractItemView* view);
+
+
 private slots:
     void viewScrolled();
     void autoExpandTimeout();
 
-private: 
+private:
     bool m_enabled;
-    
+
     QAbstractItemView* m_view;
     QSortFilterProxyModel* m_proxyModel;