┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-09-19 16:38:07 +0200
committerPeter Penz <[email protected]>2011-09-19 16:39:08 +0200
commitf9bcd0a47cbdf0806c35a82856efdbe06279fb82 (patch)
treebc23a8f97413d6f910031fca2446df9428cfb999 /src/kitemviews/kitemlistview.h
parent8879f5e7527caee52966f352af7fa9585fe58192 (diff)
Rough draft for getting back the header for the details-view
Diffstat (limited to 'src/kitemviews/kitemlistview.h')
-rw-r--r--src/kitemviews/kitemlistview.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h
index 55a5c3344..a2fa23f3e 100644
--- a/src/kitemviews/kitemlistview.h
+++ b/src/kitemviews/kitemlistview.h
@@ -33,14 +33,15 @@
#include <QSet>
class KItemListController;
-class KItemListWidgetCreatorBase;
class KItemListGroupHeader;
class KItemListGroupHeaderCreatorBase;
+class KItemListHeader;
class KItemListSizeHintResolver;
class KItemListRubberBand;
class KItemListViewAnimation;
class KItemListViewLayouter;
class KItemListWidget;
+class KItemListWidgetCreatorBase;
class KItemListViewCreatorBase;
class QTimer;
@@ -98,6 +99,13 @@ public:
bool autoScroll() const;
/**
+ * Turns on the header if \p show is true. Per default the
+ * header is not shown.
+ */
+ void setHeaderShown(bool show);
+ bool isHeaderShown() const;
+
+ /**
* @return Controller of the item-list. The controller gets
* initialized by KItemListController::setView() and will
* result in calling KItemListController::onControllerChanged().
@@ -206,6 +214,8 @@ protected:
QList<KItemListWidget*> visibleItemListWidgets() const;
+ virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
+
protected slots:
virtual void slotItemsInserted(const KItemRangeList& itemRanges);
virtual void slotItemsRemoved(const KItemRangeList& itemRanges);
@@ -293,6 +303,12 @@ private:
void updateWidgetProperties(KItemListWidget* widget, int index);
/**
+ * Updates the width of the KItemListHeader corresponding to the required width of
+ * the roles.
+ */
+ void updateHeaderWidth();
+
+ /**
* Helper function for triggerAutoScrolling().
* @param pos Logical position of the mouse relative to the range.
* @param range Range of the visible area.
@@ -336,6 +352,8 @@ private:
int m_autoScrollIncrement;
QTimer* m_autoScrollTimer;
+ KItemListHeader* m_header;
+
friend class KItemListController;
};