┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index 118ed2f03..293f4b1ec 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -381,15 +381,28 @@ private:
* the same row or column, otherwise the create-animation is used instead.
* @return True if the moving-animation has been applied.
*/
- bool moveWidget(KItemListWidget* widget, const QRectF& itemBounds);
+ bool moveWidget(KItemListWidget* widget, const QPointF& newPos);
void emitOffsetChanges();
KItemListWidget* createWidget(int index);
void recycleWidget(KItemListWidget* widget);
+
+ /**
+ * Changes the index of the widget to \a index. The cell-information
+ * for the widget gets reset and will be updated in the next doLayout().
+ */
void setWidgetIndex(KItemListWidget* widget, int index);
/**
+ * Changes the index of the widget to \a index. In opposite to
+ * setWidgetIndex() the cell-information of the widget gets updated.
+ * This update gives doLayout() the chance to animate the moving
+ * of the item visually (see moveWidget()).
+ */
+ void moveWidgetToIndex(KItemListWidget* widget, int index);
+
+ /**
* Helper method for prepareLayoutForIncreasedItemCount().
*/
void setLayouterSize(const QSizeF& size, SizeType sizeType);
@@ -550,6 +563,15 @@ private:
QHash<int, KItemListWidget*> m_visibleItems;
QHash<KItemListWidget*, KItemListGroupHeader*> m_visibleGroups;
+ struct Cell
+ {
+ Cell() : column(-1), row(-1) {}
+ Cell(int c, int r) : column(c), row(r) {}
+ int column;
+ int row;
+ };
+ QHash<int, Cell> m_visibleCells;
+
int m_scrollBarExtent;
KItemListSizeHintResolver* m_sizeHintResolver;
KItemListViewLayouter* m_layouter;