26 #ifndef DIGIKAM_DCATEGORIZED_VIEW_PRIVATE_H
27 #define DIGIKAM_DCATEGORIZED_VIEW_PRIVATE_H
40 #include <QPaintEvent>
53 #define DOLPHIN_DRAGANDDROP
55 class DCategoryDrawer;
60 class DCategorizedSortFilterProxyModel;
67 : QVector<QModelIndex>(rowCount),
75 QModelIndex& index = QVector<QModelIndex>::operator[](i);
79 index = model->index(i, column);
89 const QModelIndex& operator[](
int i)
const
91 return QVector<QModelIndex>::operator[](i);
96 QAbstractItemModel* model;
114 const QModelIndexList& intersectionSet(
const QRect& rect);
119 QRect visualRectInViewport(
const QModelIndex& index)
const;
124 QRect visualCategoryRectInViewport(
const QString& category)
const;
129 const QRect& cacheIndex(
const QModelIndex& index);
134 const QRect& cacheCategory(
const QString& category);
140 const QRect& cachedRectIndex(
const QModelIndex& index);
146 const QRect& cachedRectCategory(
const QString& category);
152 QRect visualRect(
const QModelIndex& index);
158 QRect categoryVisualRect(
const QString& category);
163 QSize contentsSize();
170 void drawNewCategory(
const QModelIndex& index,
172 const QStyleOption& option,
179 void updateScrollbars();
184 void drawDraggedItems(QPainter* painter);
190 void drawDraggedItems();
201 QItemSelection selectionForRect(
const QRect& rect);
211 : relativeOffsetToCategory(0)
Definition: dcategorizedsortfilterproxymodel.h:53
Attributes.
Definition: dcategorizedview_p.h:207
int relativeOffsetToCategory
Definition: dcategorizedview_p.h:216
QString category
Definition: dcategorizedview_p.h:215
ElementInfo()
Definition: dcategorizedview_p.h:210
Definition: dcategorizedview_p.h:103
QRect lastDraggedItemsRect
Definition: dcategorizedview_p.h:248
bool dragLeftViewport
Definition: dcategorizedview_p.h:229
QPoint initialPressPosition
Definition: dcategorizedview_p.h:233
QHash< QString, QVector< int > > categoriesIndexes
Definition: dcategorizedview_p.h:244
QItemSelection lastSelection
Definition: dcategorizedview_p.h:249
DCategorizedView * listView
Basic data.
Definition: dcategorizedview_p.h:222
QString hoveredCategory
Definition: dcategorizedview_p.h:232
QVector< ElementInfo > elementsInfo
Definition: dcategorizedview_p.h:242
QModelIndexList intersectedIndexes
Definition: dcategorizedview_p.h:247
QHash< int, QRect > elementsPosition
Definition: dcategorizedview_p.h:243
DCategorizedSortFilterProxyModel * proxyModel
Attributes for speed reasons.
Definition: dcategorizedview_p.h:252
int forcedSelectionPosition
Definition: dcategorizedview_p.h:235
bool mouseButtonPressed
Behavior data.
Definition: dcategorizedview_p.h:227
QPoint mousePosition
Definition: dcategorizedview_p.h:234
bool drawItemsWhileDragging
Definition: dcategorizedview_p.h:230
QModelIndex hovered
Definition: dcategorizedview_p.h:231
bool rightMouseButtonPressed
Definition: dcategorizedview_p.h:228
DCategoryDrawer * categoryDrawer
Definition: dcategorizedview_p.h:223
QHash< QString, QRect > categoriesPosition
Definition: dcategorizedview_p.h:245
QSize biggestItemSize
Definition: dcategorizedview_p.h:224
QStringList categories
Definition: dcategorizedview_p.h:246
Item view for listing items.
Definition: dcategorizedview.h:49
Definition: dcategorydrawer.h:52
Definition: dcategorizedview_p.h:63
QModelIndex & operator[](int i)
Definition: dcategorizedview_p.h:73
SparseModelIndexVector(int rowCount, QAbstractItemModel *const model_, int column_)
Definition: dcategorizedview_p.h:66
Definition: datefolderview.cpp:43