eric4.E4Gui.E4TabWidget

Module implementing a TabWidget class substituting QTabWidget.

Global Attributes

None

Classes

E4DnDTabBar Class implementing a tab bar class substituting QTabBar.
E4TabWidget Class implementing a tab widget class substituting QTabWidget.
E4WheelTabBar Class implementing a tab bar class substituting QTabBar to support wheel events.

Functions

None


E4DnDTabBar

Class implementing a tab bar class substituting QTabBar.

Signals

tabMoveRequested(int, int)
emitted to signal a tab move request giving the old and new index position

Derived from

E4WheelTabBar

Class Attributes

None

Methods

E4DnDTabBar Constructor
dragEnterEvent Protected method to handle drag enter events.
dropEvent Protected method to handle drop events.
mouseMoveEvent Protected method to handle mouse move events.
mousePressEvent Protected method to handle mouse press events.

E4DnDTabBar (Constructor)

E4DnDTabBar(parent = None)

Constructor

parent
reference to the parent widget (QWidget)

E4DnDTabBar.dragEnterEvent

dragEnterEvent(event)

Protected method to handle drag enter events.

event
reference to the drag enter event (QDragEnterEvent)

E4DnDTabBar.dropEvent

dropEvent(event)

Protected method to handle drop events.

event
reference to the drop event (QDropEvent)

E4DnDTabBar.mouseMoveEvent

mouseMoveEvent(event)

Protected method to handle mouse move events.

event
reference to the mouse move event (QMouseEvent)

E4DnDTabBar.mousePressEvent

mousePressEvent(event)

Protected method to handle mouse press events.

event
reference to the mouse press event (QMouseEvent)
Up


E4TabWidget

Class implementing a tab widget class substituting QTabWidget.

It provides slots to show the previous and next tab and give them the input focus and it allows to have a context menu for the tabs.

Signals

customTabContextMenuRequested(const QPoint & point, int index)
emitted when a context menu for a tab is requested

Derived from

QTabWidget

Class Attributes

None

Methods

E4TabWidget Constructor
__currentChanged Private slot to handle the currentChanged signal.
__handleTabCustomContextMenuRequested Private slot to handle the context menu request for the tabbar.
moveTab Public method to move a tab to a new index.
nextTab Public slot used to show the next tab.
prevTab Public slot used to show the previous tab.
selectTab Public method to get the index of a tab given a position.
setTabContextMenuPolicy Public method to set the context menu policy of the tab.
switchTab Public slot used to switch between the current and the previous current tab.

E4TabWidget (Constructor)

E4TabWidget(parent = None, dnd = False)

Constructor

parent
reference to the parent widget (QWidget)

E4TabWidget.__currentChanged

__currentChanged(index)

Private slot to handle the currentChanged signal.

index
index of the current tab

E4TabWidget.__handleTabCustomContextMenuRequested

__handleTabCustomContextMenuRequested(point)

Private slot to handle the context menu request for the tabbar.

point
point the context menu was requested (QPoint)

E4TabWidget.moveTab

moveTab(curIndex, newIndex)

Public method to move a tab to a new index.

curIndex
index of tab to be moved (integer)
newIndex
index the tab should be moved to (integer)

E4TabWidget.nextTab

nextTab()

Public slot used to show the next tab.

E4TabWidget.prevTab

prevTab()

Public slot used to show the previous tab.

E4TabWidget.selectTab

selectTab(pos)

Public method to get the index of a tab given a position.

pos
position determining the tab index (QPoint)
Returns:
index of the tab (integer)

E4TabWidget.setTabContextMenuPolicy

setTabContextMenuPolicy(policy)

Public method to set the context menu policy of the tab.

policy
context menu policy to set (Qt.ContextMenuPolicy)

E4TabWidget.switchTab

switchTab()

Public slot used to switch between the current and the previous current tab.

Up


E4WheelTabBar

Class implementing a tab bar class substituting QTabBar to support wheel events.

Derived from

QTabBar

Class Attributes

None

Methods

E4WheelTabBar Constructor
wheelEvent Protected slot to support wheel events.

E4WheelTabBar (Constructor)

E4WheelTabBar(parent = None)

Constructor

parent
reference to the parent widget (QWidget)

E4WheelTabBar.wheelEvent

wheelEvent(event)

Protected slot to support wheel events.

reference
to the wheel event (QWheelEvent)
Up