DolphinTabWidget::DolphinTabWidget(QWidget* parent) :
QTabWidget(parent),
- m_placesSelectorVisible(true),
m_lastViewedTab(0)
{
KAcceleratorManager::setNoAccel(this);
DolphinTabPage* tabPage = new DolphinTabPage(primaryUrl, secondaryUrl, this);
tabPage->setActive(false);
- tabPage->setPlacesSelectorVisible(m_placesSelectorVisible);
connect(tabPage, &DolphinTabPage::activeViewChanged,
this, &DolphinTabWidget::activeViewChanged);
connect(tabPage, &DolphinTabPage::activeViewUrlChanged,
}
DolphinTabPage* tabPage = tabPageAt(index);
- emit rememberClosedTab(tabPage->activeViewContainer()->url(), tabPage->saveState());
+ Q_EMIT rememberClosedTab(tabPage->activeViewContainer()->url(), tabPage->saveState());
removeTab(index);
tabPage->deleteLater();
setCurrentIndex(index >= 0 ? index : (count() - 1));
}
-void DolphinTabWidget::slotPlacesPanelVisibilityChanged(bool visible)
-{
- // The places-selector from the URL navigator should only be shown
- // if the places dock is invisible
- m_placesSelectorVisible = !visible;
-
- const int tabCount = count();
- for (int i = 0; i < tabCount; ++i) {
- DolphinTabPage* tabPage = tabPageAt(i);
- tabPage->setPlacesSelectorVisible(m_placesSelectorVisible);
- }
-}
-
void DolphinTabWidget::restoreClosedTab(const QByteArray& state)
{
openNewActivatedTab();
// Emit the currentUrlChanged signal if the url of the current tab has been changed.
if (index == currentIndex()) {
- emit currentUrlChanged(url);
+ Q_EMIT currentUrlChanged(url);
}
}
}
}
DolphinTabPage* tabPage = tabPageAt(index);
DolphinViewContainer* viewContainer = tabPage->activeViewContainer();
- emit activeViewChanged(viewContainer);
- emit currentUrlChanged(viewContainer->url());
+ Q_EMIT activeViewChanged(viewContainer);
+ Q_EMIT currentUrlChanged(viewContainer->url());
tabPage->setActive(true);
m_lastViewedTab = index;
}
tabBar()->show();
}
- emit tabCountChanged(count());
+ Q_EMIT tabCountChanged(count());
}
void DolphinTabWidget::tabRemoved(int index)
tabBar()->hide();
}
- emit tabCountChanged(count());
+ Q_EMIT tabCountChanged(count());
}
QString DolphinTabWidget::tabName(DolphinTabPage* tabPage) const