#include <QGridLayout>
#include <QStyle>
#include <QVariantAnimation>
+
DolphinTabPage::DolphinTabPage(const QUrl &primaryUrl, const QUrl &secondaryUrl, QWidget *parent)
: QWidget(parent)
, m_expandingContainer{nullptr}
stream << m_primaryViewActive;
stream << m_splitter->saveState();
- if (!m_title.isEmpty()) {
- stream << m_title;
+ if (!m_customLabel.isEmpty()) {
+ stream << m_customLabel;
}
return state;
if (!stream.atEnd()) {
QString tabTitle;
stream >> tabTitle;
- setTitle(tabTitle);
+ setCustomLabel(tabTitle);
}
}
activeViewContainer()->setActive(active);
}
-void DolphinTabPage::setTitle(const QString &name)
+void DolphinTabPage::setCustomLabel(const QString &label)
{
- m_title = name;
+ m_customLabel = label;
}
-QString DolphinTabPage::title() const
+QString DolphinTabPage::customLabel() const
{
- return m_title;
+ return m_customLabel;
}
void DolphinTabPage::slotAnimationFinished()
{
Q_ASSERT(index >= 0);
- if (!tabPageAt(index)->title().isEmpty()) {
- QString name = tabPageAt(index)->title();
+ if (!tabPageAt(index)->customLabel().isEmpty()) {
+ QString name = tabPageAt(index)->customLabel();
tabBar()->setTabText(index, name);
return;
}
void DolphinTabWidget::renameTab(int index, const QString &name)
{
if (!name.isEmpty()) {
- tabPageAt(index)->setTitle(name);
+ tabPageAt(index)->setCustomLabel(name);
}
updateTabName(index);