]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistview.h
Details view: Allow to turn off expandable folders like in Dolphin 1.7
[dolphin.git] / src / kitemviews / kitemlistview.h
index b416888eb8aa37a28472d1c36a3bac8d19dc5c9a..8f6e11e385649c670aafbe92ebcb2e24a12f9e82 100644 (file)
@@ -201,15 +201,15 @@ public:
     virtual QHash<QByteArray, QSizeF> 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<QByteArray>& current, const QList<QByteArray>& 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<KItemListWidget*> 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);