From a02a9101fe127211de1fd24f6876b87686309997 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 6 Dec 2008 23:30:36 +0100 Subject: QTabWidget --> KTabWidget --- src/tabwidget.cpp | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'src/tabwidget.cpp') diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 57e80856..b8e9c748 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -57,6 +57,11 @@ TabBar::TabBar(QWidget *parent) } +TabBar::~TabBar() +{ +} + + void TabBar::selectTabAction() { if (QShortcut *shortCut = qobject_cast(sender())) @@ -199,7 +204,7 @@ void TabBar::reloadTab() TabWidget::TabWidget(QWidget *parent) - : QTabWidget(parent) + : KTabWidget(parent) , m_recentlyClosedTabsAction(0) , m_newTabAction(0) , m_closeTabAction(0) @@ -266,6 +271,11 @@ TabWidget::TabWidget(QWidget *parent) } +TabWidget::~TabWidget() +{ +} + + void TabWidget::clear() { // clear the recently closed tabs @@ -310,7 +320,6 @@ void TabWidget::reloadTab(int index) } - void TabWidget::addWebAction(KAction *action, QWebPage::WebAction webAction) { if (!action) @@ -588,8 +597,10 @@ void TabWidget::closeTab(int index) return; bool hasFocus = false; - if (WebView *tab = webView(index)) { - if (tab->isModified()) { + if (WebView *tab = webView(index)) + { + if (tab->isModified()) + { QMessageBox closeConfirmation(tab); closeConfirmation.setWindowFlags(Qt::Sheet); closeConfirmation.setWindowTitle(i18n("Do you really want to close this page?")); @@ -627,9 +638,10 @@ void TabWidget::webViewLoadStarted() { WebView *webView = qobject_cast(sender()); int index = webViewIndex(webView); - if (-1 != index) { - QIcon icon(QLatin1String(":loading.gif")); // FIXME - setTabIcon(index, icon); + if (-1 != index) + { +// QIcon icon(QLatin1String(":loading.gif")); + setTabIcon(index, KIcon("rekonq") ); } } @@ -694,7 +706,7 @@ void TabWidget::aboutToShowRecentTriggeredAction(QAction *action) void TabWidget::mouseDoubleClickEvent(QMouseEvent *event) { - if ( !childAt(event->pos()) + if ( !childAt(event->pos() ) // Remove the line below when QTabWidget does not have a one pixel frame && event->pos().y() < (tabBar()->y() + tabBar()->height())) { -- cgit v1.2.1