]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphintabpage.h
KStandardItemList: have emblem when hovering
[dolphin.git] / src / dolphintabpage.h
index 4e89d22ee9c44679379c75cf0e0d39b5657785a2..1e79fb5db071f48c68f95c06faedcb2a033064db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * SPDX-FileCopyrightText: 2014 Emmanuel Pescosta <emmanuelpescosta099@gmail.com>
- * SPDX-FileCopyrightText: 2020 Felix Ernst <fe.a.ernst@gmail.com>
+ * SPDX-FileCopyrightText: 2020 Felix Ernst <felixernst@kde.org>
  *
  * SPDX-License-Identifier: GPL-2.0-or-later
  */
@@ -138,6 +138,20 @@ public:
      */
     void setActive(bool active);
 
+    void switchActiveView();
+
+    /**
+     * Overwrites the automatically generated label of this tab with @p label.
+     * This @p label will be kept until it is overwritten by calling this method again.
+     * Calling this with an empty string will restore the automatic labelling.
+     */
+    void setCustomLabel(const QString &label);
+
+    /**
+     * @see setCustomLabel.
+     */
+    QString customLabel() const;
+
 Q_SIGNALS:
     void activeViewChanged(DolphinViewContainer *viewContainer);
     void activeViewUrlChanged(const QUrl &url);
@@ -170,8 +184,6 @@ private Q_SLOTS:
      */
     void slotViewUrlRedirection(const QUrl &oldUrl, const QUrl &newUrl);
 
-    void switchActiveView();
-
 private:
     /**
      * Creates a new view container and does the default initialization.
@@ -201,6 +213,8 @@ private:
     bool m_primaryViewActive;
     bool m_splitViewEnabled;
     bool m_active;
+    /** @see setCustomLabel(). */
+    QString m_customLabel;
 };
 
 class DolphinTabPageSplitterHandle : public QSplitterHandle