]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabwidget.h
Merge remote-tracking branch 'fork/work/zakharafoniam/useful-groups'
[dolphin.git] / src / dolphintabwidget.h
index 75c6e3471aa45e285db393fce451870750dd95f9..ca101e2dbfcf6a6c232b61cb337270e50d13ecf1 100644 (file)
@@ -69,6 +69,11 @@ public:
      */
     void refreshViews();
 
+    /**
+     * Update the name of the tab with the index \a index.
+     */
+    void updateTabName(int index);
+
     /**
      * @return Whether any of the tab pages has @p url opened
      * in their primary or secondary view.
@@ -106,6 +111,11 @@ Q_SIGNALS:
      */
     void currentUrlChanged(const QUrl &url);
 
+    /**
+     * Is emitted when the url of any tab has been changed (including the current tab).
+     */
+    void urlChanged(const QUrl &url);
+
 public Q_SLOTS:
     /**
      * Opens a new view with the current URL that is part of a tab and activates
@@ -122,8 +132,11 @@ public Q_SLOTS:
     /**
      * Opens a new tab in the background showing the URL \a primaryUrl and the
      * optional URL \a secondaryUrl.
+     * @return A pointer to the opened DolphinTabPage.
      */
-    void openNewTab(const QUrl &primaryUrl, const QUrl &secondaryUrl = QUrl(), NewTabPosition position = NewTabPosition::FollowSetting);
+    DolphinTabPage *openNewTab(const QUrl &primaryUrl,
+                               const QUrl &secondaryUrl = QUrl(),
+                               DolphinTabWidget::NewTabPosition position = DolphinTabWidget::NewTabPosition::FollowSetting);
 
     /**
      * Opens each directory in \p dirs in a separate tab unless it is already open.
@@ -196,6 +209,12 @@ private Q_SLOTS:
      */
     void openNewActivatedTab(int index);
 
+    /**
+     * Is connected to the KTabBar signal receivedDragMoveEvent.
+     * Allows dragging and dropping files onto tabs.
+     */
+    void tabDragMoveEvent(int tab, QDragMoveEvent *event);
+
     /**
      * Is connected to the KTabBar signal receivedDropEvent.
      * Allows dragging and dropping files onto tabs.
@@ -210,6 +229,13 @@ private Q_SLOTS:
 
     void currentTabChanged(int index);
 
+    /**
+     * Calls DolphinTabPage::setCustomLabel(label) for the tab at @p index
+     * and propagates that change to the DolphinTabBar.
+     * @see DolphinTabPage::setCustomLabel().
+     */
+    void renameTab(int index, const QString &label);
+
 protected:
     void tabInserted(int index) override;
     void tabRemoved(int index) override;