┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabwidget.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2022-08-26 12:29:35 +0200
committerFelix Ernst <[email protected]>2022-10-11 15:26:31 +0200
commit37a98417cd64008b63b95b80ecbedc84d487bd25 (patch)
tree014f4d28ef87d57872f0f37d90a39264298cfed3 /src/dolphintabwidget.h
parent4d81aabd1ee78c2fca61452ef3a866cfad0c88a5 (diff)
Add helper methods to tab widget for view containers
This commit introduces the private getter DolphinTabWidget::viewContainerAt(ViewIndex) and another private method DolphinTabWidget::activateViewContainerAt(ViewIndex). Both methods return nullptr if there is no valid DolphinViewContainer at the specified ViewIndex.
Diffstat (limited to 'src/dolphintabwidget.h')
-rw-r--r--src/dolphintabwidget.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h
index 8342d719d..24d9e228b 100644
--- a/src/dolphintabwidget.h
+++ b/src/dolphintabwidget.h
@@ -226,6 +226,21 @@ private:
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.