Changeset View
Changeset View
Standalone View
Standalone View
krusader/panelmanager.cpp
Show All 16 Lines | |||||
17 | * * | 17 | * * | ||
18 | * You should have received a copy of the GNU General Public License * | 18 | * You should have received a copy of the GNU General Public License * | ||
19 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | 19 | * along with Krusader. If not, see [http://www.gnu.org/licenses/]. * | ||
20 | *****************************************************************************/ | 20 | *****************************************************************************/ | ||
21 | 21 | | |||
22 | #include "panelmanager.h" | 22 | #include "panelmanager.h" | ||
23 | 23 | | |||
24 | #include "defaults.h" | 24 | #include "defaults.h" | ||
25 | #include "icon.h" | ||||
25 | #include "tabactions.h" | 26 | #include "tabactions.h" | ||
26 | #include "krusaderview.h" | 27 | #include "krusaderview.h" | ||
27 | #include "krmainwindow.h" | 28 | #include "krmainwindow.h" | ||
28 | #include "Panel/listpanel.h" | 29 | #include "Panel/listpanel.h" | ||
29 | #include "Panel/panelfunc.h" | 30 | #include "Panel/panelfunc.h" | ||
30 | #include "Panel/PanelView/krviewfactory.h" | 31 | #include "Panel/PanelView/krviewfactory.h" | ||
31 | 32 | | |||
32 | #include <assert.h> | 33 | #include <assert.h> | ||
33 | 34 | | |||
34 | // QtGui | 35 | // QtGui | ||
35 | #include <QImage> | 36 | #include <QImage> | ||
36 | // QtWidgets | 37 | // QtWidgets | ||
37 | #include <QStackedWidget> | 38 | #include <QStackedWidget> | ||
38 | #include <QToolButton> | 39 | #include <QToolButton> | ||
39 | #include <QGridLayout> | 40 | #include <QGridLayout> | ||
40 | 41 | | |||
41 | #include <KConfigCore/KConfig> | 42 | #include <KConfigCore/KConfig> | ||
42 | #include <KI18n/KLocalizedString> | 43 | #include <KI18n/KLocalizedString> | ||
43 | #include <KIconThemes/KIconLoader> | | |||
44 | 44 | | |||
45 | 45 | | |||
46 | PanelManager::PanelManager(QWidget *parent, KrMainWindow* mainWindow, bool left) : | 46 | PanelManager::PanelManager(QWidget *parent, KrMainWindow* mainWindow, bool left) : | ||
47 | QWidget(parent), | 47 | QWidget(parent), | ||
48 | _otherManager(0), | 48 | _otherManager(0), | ||
49 | _actions(mainWindow->tabActions()), | 49 | _actions(mainWindow->tabActions()), | ||
50 | _layout(0), | 50 | _layout(0), | ||
51 | _left(left), | 51 | _left(left), | ||
52 | _currentPanel(0) | 52 | _currentPanel(0) | ||
53 | { | 53 | { | ||
54 | _layout = new QGridLayout(this); | 54 | _layout = new QGridLayout(this); | ||
55 | _layout->setContentsMargins(0, 0, 0, 0); | 55 | _layout->setContentsMargins(0, 0, 0, 0); | ||
56 | _layout->setSpacing(0); | 56 | _layout->setSpacing(0); | ||
57 | _stack = new QStackedWidget(this); | 57 | _stack = new QStackedWidget(this); | ||
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(SmallIcon("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, SIGNAL(clicked()), this, SLOT(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, SIGNAL(currentChanged(int)), this, SLOT(slotCurrentTabChanged(int))); | ||
71 | connect(_tabbar, SIGNAL(tabCloseRequested(int)), this, SLOT(slotCloseTab(int))); | 71 | connect(_tabbar, SIGNAL(tabCloseRequested(int)), this, SLOT(slotCloseTab(int))); | ||
72 | connect(_tabbar, SIGNAL(closeCurrentTab()), this, SLOT(slotCloseTab())); | 72 | connect(_tabbar, SIGNAL(closeCurrentTab()), this, SLOT(slotCloseTab())); | ||
▲ Show 20 Lines • Show All 390 Lines • Show Last 20 Lines |