2 * Copyright (c) 2007, Aconex. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 #include "tabwidget.h"
18 TabWidget::TabWidget(QWidget
*parent
) : QTabWidget(parent
)
24 bool TabWidget::setActiveTab(Tab
*tab
)
27 return tab
->isArchiveSource();
30 bool TabWidget::setActiveTab(int index
)
32 my
.activeTab
= my
.tabs
.at(index
);
33 return my
.activeTab
->isArchiveSource();
36 void TabWidget::insertTab(Tab
*tab
)
39 tabBar()->setVisible(my
.tabs
.size() > 1);
42 void TabWidget::removeTab(int index
)
44 my
.tabs
.removeAt(index
);
45 tabBar()->setVisible(my
.tabs
.size() > 1);
46 QTabWidget::removeTab(index
);