1
/* This file is part of the KDE libraries
2
Copyright (C) 2003 Stephan Binner <binner@kde.org>
3
Copyright (C) 2003 Zack Rusin <zack@kde.org>
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
Boston, MA 02111-1307, USA.
31
class KTabBar: public QTabBar
36
KTabBar( QWidget* parent=0, const char* name=0 );
39
void setCloseIcon(const QIconSet&);
41
virtual void setTabEnabled( int, bool );
43
const QColor &tabColor( int ) const;
44
void setTabColor( int, const QColor& );
46
virtual int insertTab( QTab *, int index = -1 );
47
virtual void removeTab( QTab * );
49
void setTabReorderingEnabled( bool enable );
50
bool isTabReorderingEnabled() const;
52
void setHoverCloseButton( bool );
53
bool hoverCloseButton() const;
55
void setHoverCloseButtonDelayed( bool );
56
bool hoverCloseButtonDelayed() const;
58
void setTabCloseActivatePrevious( bool );
59
bool tabCloseActivatePrevious() const;
62
void contextMenu( int, const QPoint & );
63
void mouseDoubleClick( int );
64
void mouseMiddleClick( int );
65
void initiateDrag( int );
66
void testCanDecode(const QDragMoveEvent *e, bool &accept /* result */);
67
void receivedDropEvent( int, QDropEvent * );
68
void moveTab( int, int );
69
void closeRequest( int );
70
#ifndef QT_NO_WHEELEVENT
71
void wheelDelta( int );
75
virtual void mouseDoubleClickEvent( QMouseEvent *e );
76
virtual void mousePressEvent( QMouseEvent *e );
77
virtual void mouseMoveEvent( QMouseEvent *e );
78
virtual void mouseReleaseEvent( QMouseEvent *e );
79
#ifndef QT_NO_WHEELEVENT
80
virtual void wheelEvent( QWheelEvent *e );
83
virtual void dragMoveEvent( QDragMoveEvent *e );
84
virtual void dropEvent( QDropEvent *e );
86
virtual void paintLabel( QPainter*, const QRect&, QTab*, bool ) const;
89
virtual void closeButtonClicked();
90
virtual void onLayoutChange();
91
virtual void enableCloseButton();
92
virtual void activateDragSwitchTab();
97
int mReorderPreviousTab;
98
QMap<int, QColor> mTabColors;
99
QTab *mHoverCloseButtonTab, *mDragSwitchTab;
100
QPushButton *mHoverCloseButton;
101
QTimer *mEnableCloseButtonTimer, *mActivateDragSwitchTabTimer;
103
bool mHoverCloseButtonEnabled;
104
bool mHoverCloseButtonDelayed;
105
bool mTabReorderingEnabled;
106
bool mTabCloseActivatePrevious;