katetabwidget.h
00001 /* This file is part of the KDE project 00002 Copyright (C) 2005 Christoph Cullmann <cullmann@kde.org> 00003 Copyright (C) 2002,2003 Joseph Wenninger <jowenn@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef __KATE_TABWIDGET_H__ 00021 #define __KATE_TABWIDGET_H__ 00022 00023 #include <ktabwidget.h> 00024 00025 class KateTabWidget : public KTabWidget 00026 { 00027 Q_OBJECT 00028 00029 public: 00030 enum TabWidgetVisibility { 00031 AlwaysShowTabs = 0, 00032 ShowWhenMoreThanOneTab = 1, 00033 NeverShowTabs = 2 00034 }; 00035 00036 public: 00037 KateTabWidget(TQWidget* parent, const char* name=0); 00038 virtual ~KateTabWidget(); 00039 00040 virtual void addTab ( TQWidget * child, const TQString & label ); 00041 00042 virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ); 00043 00044 virtual void addTab ( TQWidget * child, TQTab * tab ); 00045 00046 virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 ); 00047 00048 virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 ); 00049 00050 virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 ); 00051 00052 virtual void removePage ( TQWidget * w ); 00053 00054 TabWidgetVisibility tabWidgetVisibility() const; 00055 00056 void setTabWidgetVisibility( TabWidgetVisibility ); 00057 00058 private slots: 00059 void closeTab(TQWidget* w); 00060 00061 private: 00062 void maybeShow(); 00063 void setCornerWidgetVisibility(bool visible); 00064 00065 private: 00066 TabWidgetVisibility m_visibility; 00067 }; 00068 00069 #endif