]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kcategorizedview_p.h
Factorize all the view-related action handling to DolphinViewActionHandler, to remove...
[dolphin.git] / src / kcategorizedview_p.h
index 1a8a7f3768a103baadc364d15e2d6caaac717943..a18854ba3c9dd8ee07c16347b3902a415e03ee98 100644 (file)
@@ -1,6 +1,6 @@
 /**
   * This file is part of the KDE project
-  * Copyright (C) 2007 Rafael Fernández López <ereslibre@gmail.com>
+  * Copyright (C) 2007 Rafael Fernández López <ereslibre@kde.org>
   *
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Library General Public
@@ -21,7 +21,8 @@
 #ifndef KCATEGORIZEDVIEW_P_H
 #define KCATEGORIZEDVIEW_P_H
 
-class KSortFilterProxyModel;
+class KCategorizedSortFilterProxyModel;
+class KCategoryDrawer;
 
 /**
   * @internal
@@ -111,6 +112,8 @@ public:
       */
     void drawDraggedItems();
 
+    void layoutChanged(bool forceItemReload = false);
+
 
     // Attributes
 
@@ -122,38 +125,40 @@ public:
 
     // Basic data
     KCategorizedView *listView;
-    KItemCategorizer *itemCategorizer;
+    KCategoryDrawer *categoryDrawer;
     QSize biggestItemSize;
 
     // Behavior data
     bool mouseButtonPressed;
+    bool rightMouseButtonPressed;
     bool isDragging;
     bool dragLeftViewport;
     QModelIndex hovered;
     QString hoveredCategory;
     QPoint initialPressPosition;
     QPoint mousePosition;
-    QItemSelection lastSelection;
-    QModelIndex currentViewIndex;
     int forcedSelectionPosition;
 
     // Cache data
     // We cannot merge some of them into structs because it would affect
     // performance
-    QHash<QModelIndex, struct ElementInfo> elementsInfo; // in source model
-    QHash<QModelIndex, QRect> elementsPosition;          // in source model
-    QHash<QModelIndex, QModelIndex> elementDictionary;   // mapped indexes
-    QHash<QModelIndex, QModelIndex> invertedElementDictionary;   // mapped indexes
+    QHash<int, struct ElementInfo> elementsInfo;
+    QHash<int, QRect> elementsPosition;
     QHash<QString, QModelIndexList> categoriesIndexes;
     QHash<QString, QRect> categoriesPosition;
     QStringList categories;
     QModelIndexList intersectedIndexes;
     QRect lastDraggedItemsRect;
-    QRect lastSelectionRect;
+    int modelSortRole;
+    int modelSortColumn;
+    int modelLastRowCount;
+    bool modelCategorized;
+    Qt::SortOrder modelSortOrder;
+    QItemSelection lastSelection;
 
     // Attributes for speed reasons
-    KSortFilterProxyModel *proxyModel;
-    QModelIndexList sourceModelIndexList;                // in source model
+    KCategorizedSortFilterProxyModel *proxyModel;
+    QModelIndexList modelIndexList;
 };
 
 #endif // KCATEGORIZEDVIEW_P_H