+ * @param tabPage The tab page to get the name of
+ * @return The name of the tab page
+ */
+ QString tabName(DolphinTabPage *tabPage) const;
+
+ struct ViewIndex {
+ const int tabIndex;
+ const bool isInPrimaryView;
+ };
+
+ /**
+ * Getter for a view container.
+ * @param viewIndex specifies the tab and the view within that tab.
+ * @return the view container specified in @p viewIndex or nullptr if it doesn't exist.
+ */
+ DolphinViewContainer *viewContainerAt(ViewIndex viewIndex) const;
+
+ /**
+ * Makes the view container specified in @p viewIndex become the active view container within this tab widget.
+ * @param viewIndex Specifies the tab to activate and the view container within the tab to activate.
+ * @return the freshly activated view container or nullptr if there is no view container at @p viewIndex.
+ */
+ DolphinViewContainer *activateViewContainerAt(ViewIndex viewIndex);
+
+ /**
+ * Get the position of the view within this widget that is open at @p directory.
+ * @param directory The URL of the directory we want to find.
+ * @return a small struct containing the tab index of the view and whether it is
+ * in the primary view. A std::nullopt is returned if there is no view open for @p directory.
+ */
+ const std::optional<const ViewIndex> viewOpenAtDirectory(const QUrl &directory) const;
+
+ /**
+ * Get the position of the view within this widget that has @p item in the view.
+ * This means that the item can be seen by the user in that view when scrolled to the right position.
+ * If the view has folders expanded and @p item is one of them, the view will also be returned.
+ * @param item The URL of the item we want to find.
+ * @return a small struct containing the tab index of the view and whether it is
+ * in the primary view. A std::nullopt is returned if there is no view open that has @p item visible anywhere.