From 475f8b1261a6ea106ca9dd90b625ea95fe63a4c7 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Fri, 9 Mar 2012 16:12:00 +0100 Subject: Details view: Allow to turn off expandable folders like in Dolphin 1.7 The option for turning off expandable folders has been removed with the new view-engine. Due to several requests this option has been readded again. As for 4.8.x no new user-interface strings may be introduced, the line ExpandableFolders=false must be manually added below the section "[DetailsMode]" in the file ~/.kde/share/config/dolphinrc if the expandable-folders feature should be disabled. Thanks to H.H. "cyberbeat" for the initial patch! BUG: 289090 FIXED-IN: 4.8.2 --- src/kitemviews/kitemlistview.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src/kitemviews/kitemlistview.h') diff --git a/src/kitemviews/kitemlistview.h b/src/kitemviews/kitemlistview.h index b416888eb..8f6e11e38 100644 --- a/src/kitemviews/kitemlistview.h +++ b/src/kitemviews/kitemlistview.h @@ -201,15 +201,15 @@ public: virtual QHash visibleRolesSizes(const KItemRangeList& itemRanges) const; /** - * @return True if the view supports the expanding of items. Per default - * false is returned. If expanding of items is supported - * (see setSupportsItemExpanding()),the methods - * KItemModelBase::setExpanded(), KItemModelBase::isExpanded(), - * KItemModelBase::isExpandable() and KItemModelBase::expandedParentsCount() - * must be reimplemented. The view-implementation - * has to take care itself how to visually represent the expanded items provided - * by the model. + * If set to true, items having child-items can be expanded to show the child-items as + * part of the view. Per default the expanding of items is is disabled. If expanding of + * items is enabled, the methods KItemModelBase::setExpanded(), KItemModelBase::isExpanded(), + * KItemModelBase::isExpandable() and KItemModelBase::expandedParentsCount() + * must be reimplemented. The view-implementation + * has to take care itself how to visually represent the expanded items provided + * by the model. */ + void setSupportsItemExpanding(bool supportsExpanding); bool supportsItemExpanding() const; /** @@ -327,6 +327,7 @@ protected: virtual void onScrollOffsetChanged(qreal current, qreal previous); virtual void onVisibleRolesChanged(const QList& current, const QList& previous); virtual void onStyleOptionChanged(const KItemListStyleOption& current, const KItemListStyleOption& previous); + virtual void onSupportsItemExpandingChanged(bool supportsExpanding); virtual void onTransactionBegin(); virtual void onTransactionEnd(); @@ -341,13 +342,6 @@ protected: QList visibleItemListWidgets() const; - /** - * Must be called by the derived class if it supports the expanding - * of items. - * @see supportsItemExpanding() - */ - void setSupportsItemExpanding(bool supportsExpanding); - protected slots: virtual void slotItemsInserted(const KItemRangeList& itemRanges); virtual void slotItemsRemoved(const KItemRangeList& itemRanges); -- cgit v1.3.1