2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
11 #include "tabwidget.h"
13 #include <QPushButton>
17 #include <KLocalizedString>
21 TabWidget::TabWidget(QWidget
* parent
)
22 : KTabWidget(parent
) {
23 m_close
= new QPushButton(this);
24 m_close
->setToolTip(i18n("Close the current tab"));
25 m_close
->setIcon(KIcon("tab-close"));
26 m_close
->adjustSize();
28 connect(m_close
, SIGNAL(clicked()), this, SIGNAL(closeTab()));
29 setCornerWidget(m_close
);
31 setTabBarHidden(true);
34 // void TabWidget::insertTab(int index, QWidget* widget, const QString& caption) {
35 // KTabWidget::insertTab(index, widget, caption);
36 // kDebug() << "showing";
38 // setTabBarHidden(false);
41 // void TabWidget::removeTab(int index) {
42 // KTabWidget::removeTab(index);
43 // kDebug() << "hiding";
45 // setTabBarHidden(true);