From c61f622dae9355c1cf60ab2d4e0fdb3bbef32c52 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Sat, 23 Jun 2007 02:40:11 +0000 Subject: [PATCH] Replace QTabBar with KTabBar in tabbed view container. Partly to follow the KDE guideline of using KWidgetType instead of QWidgetType and to enable easier addition of some user requested features. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=679108 --- src/ViewContainer.cpp | 9 ++++++++- src/ViewContainer.h | 6 ++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/ViewContainer.cpp b/src/ViewContainer.cpp index 9c2ca8b5e..6cd637075 100644 --- a/src/ViewContainer.cpp +++ b/src/ViewContainer.cpp @@ -402,8 +402,15 @@ void TabbedViewContainer::selectTabColor() } ViewContainerTabBar::ViewContainerTabBar(QWidget* parent) - : QTabBar(parent) + : KTabBar(parent) { + //TODO Make tab re-ordering possible, but the QStackedWidget + // and tab widget will then have different indicies, in which + // case either the view widget stack needs to be re-ordered + // or mapping between the tab and stack widget indicies needs + // to be added + // + //setTabReorderingEnabled(true); } QSize ViewContainerTabBar::tabSizeHint(int index) const diff --git a/src/ViewContainer.h b/src/ViewContainer.h index a7cdc7a15..0c40daf77 100644 --- a/src/ViewContainer.h +++ b/src/ViewContainer.h @@ -26,9 +26,11 @@ #include #include #include -#include #include +// KDE +#include + class QSpacerItem; class QStackedWidget; class QWidget; @@ -309,7 +311,7 @@ private: // internal class, // to allow for tweaks to the tab bar required by TabbedViewContainerV2. // does not actually do anything currently -class ViewContainerTabBar : public QTabBar +class ViewContainerTabBar : public KTabBar { public: ViewContainerTabBar(QWidget* parent = 0);