Changeset View
Changeset View
Standalone View
Standalone View
krusader/panelmanager.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 53 | { | |||
---|---|---|---|---|---|
58 | 58 | | |||
59 | // new tab button | 59 | // new tab button | ||
60 | _newTab = new QToolButton(this); | 60 | _newTab = new QToolButton(this); | ||
61 | _newTab->setAutoRaise(true); | 61 | _newTab->setAutoRaise(true); | ||
62 | _newTab->setText(i18n("Open a new tab in home")); | 62 | _newTab->setText(i18n("Open a new tab in home")); | ||
63 | _newTab->setToolTip(i18n("Open a new tab in home")); | 63 | _newTab->setToolTip(i18n("Open a new tab in home")); | ||
64 | _newTab->setIcon(Icon("tab-new")); | 64 | _newTab->setIcon(Icon("tab-new")); | ||
65 | _newTab->adjustSize(); | 65 | _newTab->adjustSize(); | ||
66 | connect(_newTab, SIGNAL(clicked()), this, SLOT(slotNewTab())); | 66 | connect(_newTab, &QToolButton::clicked, this, QOverload<>::of(&PanelManager::slotNewTab)); | ||
67 | 67 | | |||
68 | // tab-bar | 68 | // tab-bar | ||
69 | _tabbar = new PanelTabBar(this, _actions); | 69 | _tabbar = new PanelTabBar(this, _actions); | ||
70 | connect(_tabbar, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentTabChanged(int))); | 70 | connect(_tabbar, &PanelTabBar::currentChanged, this, &PanelManager::slotCurrentTabChanged); | ||
71 | connect(_tabbar, SIGNAL(tabCloseRequested(int)), this, SLOT(slotCloseTab(int))); | 71 | connect(_tabbar, &PanelTabBar::tabCloseRequested, this, QOverload<int>::of(&PanelManager::slotCloseTab)); | ||
72 | connect(_tabbar, SIGNAL(closeCurrentTab()), this, SLOT(slotCloseTab())); | 72 | connect(_tabbar, &PanelTabBar::closeCurrentTab, this, QOverload<>::of(&PanelManager::slotCloseTab)); | ||
73 | connect(_tabbar, SIGNAL(newTab(QUrl)), this, SLOT(slotNewTab(QUrl))); | 73 | connect(_tabbar, SIGNAL(newTab(QUrl)), this, SLOT(slotNewTab(QUrl))); | ||
74 | connect(_tabbar, SIGNAL(draggingTab(QMouseEvent*)), this, SLOT(slotDraggingTab(QMouseEvent*))); | 74 | connect(_tabbar, &PanelTabBar::draggingTab, this, &PanelManager::slotDraggingTab); | ||
75 | connect(_tabbar, SIGNAL(draggingTabFinished(QMouseEvent*)), this, SLOT(slotDraggingTabFinished(QMouseEvent*))); | 75 | connect(_tabbar, &PanelTabBar::draggingTabFinished, this, &PanelManager::slotDraggingTabFinished); | ||
76 | 76 | | |||
77 | QHBoxLayout *tabbarLayout = new QHBoxLayout; | 77 | QHBoxLayout *tabbarLayout = new QHBoxLayout; | ||
78 | tabbarLayout->setSpacing(0); | 78 | tabbarLayout->setSpacing(0); | ||
79 | tabbarLayout->setContentsMargins(0, 0, 0, 0); | 79 | tabbarLayout->setContentsMargins(0, 0, 0, 0); | ||
80 | 80 | | |||
81 | tabbarLayout->addWidget(_tabbar); | 81 | tabbarLayout->addWidget(_tabbar); | ||
82 | tabbarLayout->addWidget(_newTab); | 82 | tabbarLayout->addWidget(_newTab); | ||
83 | 83 | | |||
▲ Show 20 Lines • Show All 379 Lines • Show Last 20 Lines |