- /**
- * Abstracts the access to the different view implementations
- * for icons-, details- and column-view.
- */
- class ViewAccessor
- {
- public:
- ViewAccessor(DolphinSortFilterProxyModel* proxyModel);
- ~ViewAccessor();
-
- void createView(QWidget* parent,
- DolphinViewController* dolphinViewController,
- const ViewModeController* viewModeController,
- Mode mode);
- void deleteView();
-
- /**
- * Must be invoked before the URL has been changed and allows view implementations
- * like the column view to create a new column.
- */
- void prepareUrlChange(const KUrl& url);
-
- QAbstractItemView* itemView() const;
- KFileItemDelegate* itemDelegate() const;
-
- /**
- * Returns the widget that should be added to the layout as target. Usually
- * the item view itself is returned, but in the case of the column view
- * a container widget is returned.
- */
- QWidget* layoutTarget() const;
-
- void setRootUrl(const KUrl& rootUrl);
- KUrl rootUrl() const;
-
- bool supportsCategorizedSorting() const;
- bool itemsExpandable() const;
- QSet<KUrl> expandedUrls() const;
- const DolphinDetailsViewExpander* setExpandedUrls(const QSet<KUrl>& urlsToExpand);