]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.h
Merge branch 'Applications/18.04'
[dolphin.git] / src / dolphintabwidget.h
index 7b3a18814c59ad8adad380d069ea9595884225c8..b4493f7ed82e00e1a82270b0cf9d3e48fe8eaf1c 100644 (file)
@@ -39,6 +39,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)
      */
@@ -174,8 +186,8 @@ private slots:
     void currentTabChanged(int index);
 
 protected:
-    virtual void tabInserted(int index) Q_DECL_OVERRIDE;
-    virtual void tabRemoved(int index) Q_DECL_OVERRIDE;
+    void tabInserted(int index) override;
+    void tabRemoved(int index) override;
 
 private:
     /**
@@ -186,6 +198,8 @@ private:
 private:
     /** Caches the (negated) places panel visibility */
     bool m_placesSelectorVisible;
+
+    int m_lastViewedTab;
 };
 
 #endif