diff options
| author | Nathaniel Graham <[email protected]> | 2018-04-07 22:35:38 -0600 |
|---|---|---|
| committer | Nathaniel Graham <[email protected]> | 2018-04-09 17:00:47 -0600 |
| commit | b12a7b0f24d5960b0fbf26d7ccc37605c5b03c34 (patch) | |
| tree | 961b6e6ade8554f8e354f3d5a38512b2283215eb /src/dolphintabwidget.h | |
| parent | 3a028d9db0ee4cdd9103d9ab375f95d985539fd2 (diff) | |
Add more tab access functions
Summary: These new functions to access the next and previous tabs are not used by anything yet, but it is envisioned that they would be useful for a variety of purposes--such as the "open path in new tab" feature from D11703
Test Plan: Dolphin still compiled and runs; new code is not actually used anywhere
Reviewers: #dolphin, elvisangelaccio
Reviewed By: #dolphin, elvisangelaccio
Differential Revision: https://phabricator.kde.org/D12039
Diffstat (limited to 'src/dolphintabwidget.h')
| -rw-r--r-- | src/dolphintabwidget.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/dolphintabwidget.h b/src/dolphintabwidget.h index ba2fd4867..b4493f7ed 100644 --- a/src/dolphintabwidget.h +++ b/src/dolphintabwidget.h @@ -40,6 +40,18 @@ public: DolphinTabPage* currentTabPage() const; /** + * @return the next tab page. If the current active tab is the last tab, + * it returns the first tab. If there is only one tab, returns nullptr + */ + DolphinTabPage* nextTabPage() const; + + /** + * @return the previous tab page. If the current active tab is the first tab, + * it returns the last tab. If there is only one tab, returns nullptr + */ + DolphinTabPage* prevTabPage() const; + + /** * @return Tab page at the given \a index (can be 0 if the index is out-of-range) */ DolphinTabPage* tabPageAt(const int index) const; @@ -187,7 +199,7 @@ private: /** Caches the (negated) places panel visibility */ bool m_placesSelectorVisible; - int m_previousTab; + int m_lastViewedTab; }; #endif |
