+ /**
+ * 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;
+
+ KUrl rootUrl() const;
+
+ bool supportsCategorizedSorting() const;
+ bool itemsExpandable() const;
+ QSet<KUrl> expandedUrls() const;
+ const DolphinDetailsViewExpander* setExpandedUrls(const QSet<KUrl>& urlsToExpand);
+
+ /**
+ * Returns true, if a reloading of the items is required
+ * when the additional information properties have been changed
+ * by the user.
+ */
+ bool reloadOnAdditionalInfoChange() const;
+
+ DolphinModel* dirModel() const;
+ DolphinSortFilterProxyModel* proxyModel() const;
+ KDirLister* dirLister() const;
+
+ private:
+ DolphinIconsView* m_iconsView;
+ DolphinDetailsView* m_detailsView;
+ DolphinColumnViewContainer* m_columnsContainer;
+ DolphinSortFilterProxyModel* m_proxyModel;
+ QAbstractItemView* m_dragSource;
+ QPointer<DolphinDetailsViewExpander> m_detailsViewExpander;
+ };
+
+ bool m_active : 1;
+ bool m_showPreview : 1;
+ bool m_storedCategorizedSorting : 1;
+ bool m_tabsForFiles : 1;
+ bool m_isContextMenuOpen : 1; // TODO: workaround for Qt-issue 207192
+ bool m_ignoreViewProperties : 1;
+ bool m_assureVisibleCurrentIndex : 1;
+ bool m_expanderActive : 1;
+