#include "dolphinnavigatorswidgetaction.h"
#include "dolphintabpage.h"
-#include "views/draganddrophelper.h"
#include <QTabWidget>
#include <QUrl>
/**
* 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(),
- DolphinTabWidget::NewTabPosition position = DolphinTabWidget::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.
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;
*/
const std::optional<const ViewIndex> viewShowingItem(const QUrl &item) const;
- DragAndDropHelper m_dragAndDropHelper;
-
private:
QPointer<DolphinTabPage> m_lastViewedTab;
QPointer<DolphinNavigatorsWidgetAction> m_navigatorsWidget;