┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-23 19:09:01 +0200
committerPeter Penz <[email protected]>2011-09-23 19:11:05 +0200
commit56852cff392f33ee731129fd9a755544d817e590 (patch)
tree235588444cec355da4093fc405cc8072715a3e15 /src/kitemviews/kitemlistview.h
parentccd92b76e74a00aef0f5186af7d797a63c6b80c6 (diff)
Allow resizing of columns by the user
Still open: - Column content is not clipped correctly - First column is not automatically increased to the available width like in Dolphin 1.7
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index da02e0bc2..b088ea487 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -147,6 +147,12 @@ public:
int lastVisibleIndex() const;
virtual QSizeF itemSizeHint(int index) const;
+
+ /**
+ * @return The size of each visible role in case if KItemListView::itemSize()
+ * is empty. This allows to have dynamic but equal role sizes between
+ * all items. Per default an empty hash is returned.
+ */
virtual QHash<QByteArray, QSizeF> visibleRoleSizes() const;
/**
@@ -229,6 +235,16 @@ private slots:
void slotRubberBandActivationChanged(bool active);
/**
+ * Is invoked if the visible role-width of one role in the header has
+ * been changed by the user. It is remembered that the user has modified
+ * the role-width, so that it won't be changed anymore automatically to
+ * calculate an optimized width.
+ */
+ void slotVisibleRoleWidthChanged(const QByteArray& role,
+ qreal currentWidth,
+ qreal previousWidth);
+
+ /**
* Triggers the autoscrolling if autoScroll() is enabled by checking the
* current mouse position. If the mouse position is within the autoscroll
* margins a timer will be started that periodically triggers the autoscrolling.
@@ -354,6 +370,7 @@ private:
QTimer* m_autoScrollTimer;
KItemListHeader* m_header;
+ bool m_useHeaderWidths;
friend class KItemListController;
};