┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kcategorizedview_p.h
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-09-17 04:02:17 +0000
committerRafael Fernández López <[email protected]>2007-09-17 04:02:17 +0000
commitc8072005fada01d772595ec64adca449134f421e (patch)
tree2bbcad6b43218569c813ef888bec3ad009335b69 /src/kcategorizedview_p.h
parent231436769d037a83afbf57fedea167b6fb9a5ad4 (diff)
Create the new architecture for KCategorizedView. Now DolphinModel is created, inheriting KDirModel for returning valid data for the role of the category of
an item. DolphinSortFilterProxyModel implements now methods lessThanCategoryMethod and lessThanGeneralMethod from KCategorizedSortFilterProxyModel. The only thing that needs to be adapted is the keyboard navigation on the KCategorizedView. CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=713319
Diffstat (limited to 'src/kcategorizedview_p.h')
-rw-r--r--src/kcategorizedview_p.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/kcategorizedview_p.h b/src/kcategorizedview_p.h
index 690db5ba9..d72753b1d 100644
--- a/src/kcategorizedview_p.h
+++ b/src/kcategorizedview_p.h
@@ -21,7 +21,8 @@
#ifndef KCATEGORIZEDVIEW_P_H
#define KCATEGORIZEDVIEW_P_H
-class DolphinSortFilterProxyModel;
+class KCategorizedSortFilterProxyModel;
+class KCategoryDrawer;
/**
* @internal
@@ -122,7 +123,7 @@ public:
// Basic data
KCategorizedView *listView;
- KItemCategorizer *itemCategorizer;
+ KCategoryDrawer *categoryDrawer;
QSize biggestItemSize;
// Behavior data
@@ -140,10 +141,8 @@ public:
// 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;
@@ -152,8 +151,8 @@ public:
QRect lastSelectionRect;
// Attributes for speed reasons
- DolphinSortFilterProxyModel *proxyModel;
- QModelIndexList sourceModelIndexList; // in source model
+ KCategorizedSortFilterProxyModel *proxyModel;
+ QModelIndexList modelIndexList;
};
#endif // KCATEGORIZEDVIEW_P_H