Replaced all std::cout with kDebug.
[tagua/yd.git] / src / tabwidget.cpp
blob32b39dfd710bc0bf22aafb7a082f0569c21eb6e3
1 /*
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.
9 */
11 #include "tabwidget.h"
13 #include <QPushButton>
14 #include <QTabBar>
16 #include <KIcon>
17 #include <KLocalizedString>
19 #include <iostream>
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";
37 // if (count() > 1)
38 // setTabBarHidden(false);
39 // }
40 //
41 // void TabWidget::removeTab(int index) {
42 // KTabWidget::removeTab(index);
43 // kDebug() << "hiding";
44 // if (count() <= 1)
45 // setTabBarHidden(true);
46 // }