KTabBar Class Reference
from PyKDE4.kdeui import *
Inherits: QTabBar → QWidget → QObject
Detailed Description
A QTabBar with extended features.

"KDE Tab Bar"
Signals |
| closeRequest (int a0) |
| contextMenu (int index, QPoint globalPos) |
| emptyAreaContextMenu (QPoint globalPos) |
| initiateDrag (int a0) |
| mouseDoubleClick (int a0) |
| mouseMiddleClick (int index) |
| moveTab (int a0, int a1) |
| newTabRequest () |
| receivedDropEvent (int a0, QDropEvent a1) |
| tabDoubleClicked (int index) |
| wheelDelta (int a0) |
Methods |
| __init__ (self, QWidget parent=0) |
| activateDragSwitchTab (self) |
| closeButtonClicked (self) |
| closeRequest (self, int a0) |
| contextMenu (self, int index, QPoint globalPos) |
| dragEnterEvent (self, QDragEnterEvent event) |
| dragMoveEvent (self, QDragMoveEvent event) |
| dropEvent (self, QDropEvent event) |
| emptyAreaContextMenu (self, QPoint globalPos) |
| enableCloseButton (self) |
bool | hoverCloseButton (self) |
bool | hoverCloseButtonDelayed (self) |
| initiateDrag (self, int a0) |
bool | isCloseButtonEnabled (self) |
bool | isTabReorderingEnabled (self) |
| leaveEvent (self, QEvent event) |
| mouseDoubleClick (self, int a0) |
| mouseDoubleClickEvent (self, QMouseEvent event) |
| mouseMiddleClick (self, int index) |
| mouseMoveEvent (self, QMouseEvent event) |
| mousePressEvent (self, QMouseEvent event) |
| mouseReleaseEvent (self, QMouseEvent event) |
| moveTab (self, int a0, int a1) |
| newTabRequest (self) |
| paintEvent (self, QPaintEvent event) |
| receivedDropEvent (self, int a0, QDropEvent a1) |
int | selectTab (self, QPoint position) |
| setCloseButtonEnabled (self, bool a0) |
| setHoverCloseButton (self, bool a0) |
| setHoverCloseButtonDelayed (self, bool a0) |
| setTabCloseActivatePrevious (self, bool a0) |
| setTabReorderingEnabled (self, bool enable) |
bool | tabCloseActivatePrevious (self) |
| tabDoubleClicked (self, int index) |
| tabLayoutChange (self) |
QSize | tabSizeHint (self, int index) |
| wheelDelta (self, int a0) |
| wheelEvent (self, QWheelEvent event) |
Method Documentation
__init__ |
( |
self, |
|
|
|
QWidget |
parent=0 |
|
) |
|
|
|
activateDragSwitchTab |
( |
|
self ) |
|
closeButtonClicked |
( |
|
self ) |
|
closeRequest |
( |
self, |
|
|
|
int |
a0 |
|
) |
|
|
|
- Deprecated:
- Use QTabBar.tabCloseRequested(int) instead.
- Signal syntax:
QObject.connect(source, SIGNAL("closeRequest(int)"), target_slot)
contextMenu |
( |
self, |
|
|
|
int |
index, |
|
|
QPoint |
globalPos |
|
) |
|
|
|
A right mouse button click was performed over the tab with the
- Parameters:
-
| index. |
The signal is emitted on the press of the mouse button.
|
- Signal syntax:
QObject.connect(source, SIGNAL("contextMenu(int, const const QPoint&)"), target_slot)
emptyAreaContextMenu |
( |
self, |
|
|
|
QPoint |
globalPos |
|
) |
|
|
|
A right mouse button click was performed over the empty area on the tab bar.
The signal is emitted on the press of the mouse button.
- Signal syntax:
QObject.connect(source, SIGNAL("emptyAreaContextMenu(const const QPoint&)"), target_slot)
enableCloseButton |
( |
|
self ) |
|
bool hoverCloseButton |
( |
|
self ) |
|
- Deprecated:
- Use QTabBar.tabsClosable() instead.
bool hoverCloseButtonDelayed |
( |
|
self ) |
|
- Deprecated:
- Use QTabBar.tabsClosable() instead.
initiateDrag |
( |
self, |
|
|
|
int |
a0 |
|
) |
|
|
|
- Signal syntax:
QObject.connect(source, SIGNAL("initiateDrag(int)"), target_slot)
bool isCloseButtonEnabled |
( |
|
self ) |
|
Returns true if the close button is shown on tabs.
- Since:
- 4.1
- Deprecated:
- Use QTabBar.tabsClosable() instead.
bool isTabReorderingEnabled |
( |
|
self ) |
|
Returns whether tab reordering is enabled.
- Deprecated:
- Use QTabBar.isMovable() instead.
leaveEvent |
( |
self, |
|
|
|
QEvent |
event |
|
) |
|
|
|
mouseDoubleClick |
( |
self, |
|
|
|
int |
a0 |
|
) |
|
|
|
- Deprecated:
- use tabDoubleClicked(int) and newTabRequest() instead.
- Signal syntax:
QObject.connect(source, SIGNAL("mouseDoubleClick(int)"), target_slot)
mouseMiddleClick |
( |
self, |
|
|
|
int |
index |
|
) |
|
|
|
A double middle mouse button click was performed over the tab with the
- Parameters:
-
| index. |
The signal is emitted on the release of the mouse button.
|
- Signal syntax:
QObject.connect(source, SIGNAL("mouseMiddleClick(int)"), target_slot)
moveTab |
( |
self, |
|
|
|
int |
a0, |
|
|
int |
a1 |
|
) |
|
|
|
- Deprecated:
- Use QTabBar.tabMoved(int,int) instead.
- Signal syntax:
QObject.connect(source, SIGNAL("moveTab(int, int)"), target_slot)
A double left mouse button click was performed over the empty area on the tab bar.
The signal is emitted on the second press of the mouse button, before the release.
- Signal syntax:
QObject.connect(source, SIGNAL("newTabRequest()"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("receivedDropEvent(int, QDropEvent*)"), target_slot)
int selectTab |
( |
self, |
|
|
|
QPoint |
position |
|
) |
|
|
|
Selects the tab which has a tab header at
given
- Parameters:
-
| position. |
|
| position | the coordinates of the tab
|
setCloseButtonEnabled |
( |
self, |
|
|
|
bool |
a0 |
|
) |
|
|
|
If enabled, a close button is available for each tab. The
signal KTabBar.closeRequest() is emitted, if the close button
has been clicked.
- Since:
- 4.1
- Deprecated:
- Use QTabBar.setTabsClosable() instead.
setHoverCloseButton |
( |
self, |
|
|
|
bool |
a0 |
|
) |
|
|
|
If enabled, a close button is shown above the tab icon.
The signal KTabBar.closeRequest() is emitted, if the
close button has been clicked. Note that the tab must have
an icon to use this feature.
- Deprecated:
- Use QTabBar.setTabsClosable() instead.
setHoverCloseButtonDelayed |
( |
self, |
|
|
|
bool |
a0 |
|
) |
|
|
|
If enabled, the close button cannot get clicked until a
minor delay has been passed. This prevents that user
accidentally closes a tab.
- Deprecated:
- Use QTabBar.setTabsClosable() instead.
setTabCloseActivatePrevious |
( |
self, |
|
|
|
bool |
a0 |
|
) |
|
|
|
Sets the 'activate previous tab on close' feature enabled
or disabled. If enabled, as soon as you close a tab, the
previously selected tab is activated again.
- Deprecated:
- Use QTabBar.setSelectionBehaviorOnRemove() instead.
setTabReorderingEnabled |
( |
self, |
|
|
|
bool |
enable |
|
) |
|
|
|
Sets the tab reordering enabled or disabled. If enabled,
the user can reorder the tabs by drag and drop the tab
headers.
- Deprecated:
- Use QTabBar.setMovable() instead.
bool tabCloseActivatePrevious |
( |
|
self ) |
|
Returns whether the 'activate previous tab on close' feature
is enabled.
- Deprecated:
- Use QTabBar.selectionBehaviorOnRemove() instead.
tabDoubleClicked |
( |
self, |
|
|
|
int |
index |
|
) |
|
|
|
A double left mouse button click was performed over the tab with the
- Parameters:
-
| index. |
The signal is emitted on the second press of the mouse button, before the release.
|
- Signal syntax:
QObject.connect(source, SIGNAL("tabDoubleClicked(int)"), target_slot)
QSize tabSizeHint |
( |
self, |
|
|
|
int |
index |
|
) |
|
|
|
wheelDelta |
( |
self, |
|
|
|
int |
a0 |
|
) |
|
|
|
- Signal syntax:
QObject.connect(source, SIGNAL("wheelDelta(int)"), target_slot)