Home ⌂Doc Index ◂Up ▴

eric6.E5Gui.E5SideBar

Module implementing a sidebar class.

Global Attributes

None

Classes

E5SideBar Class implementing a sidebar with a widget area, that is hidden or shown, if the current tab is clicked again.

Functions

None


E5SideBar

Class implementing a sidebar with a widget area, that is hidden or shown, if the current tab is clicked again.

Derived from

QWidget

Class Attributes

East
North
South
Version
West

Class Methods

None

Methods

E5SideBar Constructor
__appFocusChanged Private slot to handle a change of the focus.
__autoHideToggled Private slot to handle the toggling of the autohide button.
__cancelDelayTimer Private method to cancel the current delay timer.
__delayedAction Private slot to handle the firing of the delay timer.
__expandIt Private method to expand the sidebar.
__shrinkIt Private method to shrink the sidebar.
__splitterMoved Private slot to react on splitter moves.
addTab Public method to add a tab to the sidebar.
clear Public method to remove all tabs.
count Public method to get the number of tabs.
currentIndex Public method to get the index of the current tab.
currentWidget Public method to get a reference to the current widget.
delay Public method to get the delay value for the expand/shrink delay in milliseconds.
enterEvent Protected method to handle the mouse entering this widget.
eventFilter Public method to handle some events for the tabbar.
expand Public method to record a expand request.
indexOf Public method to get the index of the given widget.
insertTab Public method to insert a tab into the sidebar.
isAutoHiding Public method to check, if the auto hide function is active.
isMinimized Public method to check the minimized state.
isTabEnabled Public method to check, if a tab is enabled.
leaveEvent Protected method to handle the mouse leaving this widget.
nextTab Public slot used to show the next tab.
orientation Public method to get the orientation of the sidebar.
prevTab Public slot used to show the previous tab.
removeTab Public method to remove a tab.
restoreState Public method to restore the state of the sidebar.
saveState Public method to save the state of the sidebar.
setCurrentIndex Public slot to set the current index.
setCurrentWidget Public slot to set the current widget.
setDelay Public method to set the delay value for the expand/shrink delay in milliseconds.
setOrientation Public method to set the orientation of the sidebar.
setSplitter Public method to set the splitter managing the sidebar.
setTabEnabled Public method to set the enabled state of a tab.
setTabIcon Public method to set the icon of a tab.
setTabText Public method to set the text of a tab.
setTabToolTip Public method to set the tooltip text of a tab.
setTabWhatsThis Public method to set the WhatsThis text of a tab.
shrink Public method to record a shrink request.
shutdown Public method to shut down the object.
tabIcon Public method to get the icon of a tab.
tabText Public method to get the text of a tab.
tabToolTip Public method to get the tooltip text of a tab.
tabWhatsThis Public method to get the WhatsThis text of a tab.
widget Public method to get a reference to the widget associated with a tab.

Static Methods

None

E5SideBar (Constructor)

E5SideBar(orientation=None, delay=200, parent=None)

Constructor

orientation
orientation of the sidebar widget (North, East, South, West)
delay
value for the expand/shrink delay in milliseconds (integer)
parent
parent widget (QWidget)

E5SideBar.__appFocusChanged

__appFocusChanged(old, now)

Private slot to handle a change of the focus.

old
reference to the widget, that lost focus (QWidget or None)
now
reference to the widget having the focus (QWidget or None)

E5SideBar.__autoHideToggled

__autoHideToggled(checked)

Private slot to handle the toggling of the autohide button.

checked
flag indicating the checked state of the button (boolean)

E5SideBar.__cancelDelayTimer

__cancelDelayTimer()

Private method to cancel the current delay timer.

E5SideBar.__delayedAction

__delayedAction()

Private slot to handle the firing of the delay timer.

E5SideBar.__expandIt

__expandIt()

Private method to expand the sidebar.

E5SideBar.__shrinkIt

__shrinkIt()

Private method to shrink the sidebar.

E5SideBar.__splitterMoved

__splitterMoved(pos, index)

Private slot to react on splitter moves.

pos
new position of the splitter handle (integer)
index
index of the splitter handle (integer)

E5SideBar.addTab

addTab(widget, iconOrLabel, label=None)

Public method to add a tab to the sidebar.

widget
reference to the widget to add (QWidget)
iconOrLabel
reference to the icon or the label text of the tab (QIcon, string)
label
the labeltext of the tab (string) (only to be used, if the second parameter is a QIcon)

E5SideBar.clear

clear()

Public method to remove all tabs.

E5SideBar.count

count()

Public method to get the number of tabs.

Returns:
number of tabs in the sidebar (integer)

E5SideBar.currentIndex

currentIndex()

Public method to get the index of the current tab.

Returns:
index of the current tab (integer)

E5SideBar.currentWidget

currentWidget()

Public method to get a reference to the current widget.

Returns:
reference to the current widget (QWidget)

E5SideBar.delay

delay()

Public method to get the delay value for the expand/shrink delay in milliseconds.

Returns:
value for the expand/shrink delay in milliseconds (integer)

E5SideBar.enterEvent

enterEvent(event)

Protected method to handle the mouse entering this widget.

event
reference to the event (QEvent)

E5SideBar.eventFilter

eventFilter(obj, evt)

Public method to handle some events for the tabbar.

obj
reference to the object (QObject)
evt
reference to the event object (QEvent)
Returns:
flag indicating, if the event was handled (boolean)

E5SideBar.expand

expand()

Public method to record a expand request.

E5SideBar.indexOf

indexOf(widget)

Public method to get the index of the given widget.

widget
reference to the widget to get the index of (QWidget)
Returns:
index of the given widget (integer)

E5SideBar.insertTab

insertTab(index, widget, iconOrLabel, label=None)

Public method to insert a tab into the sidebar.

index
the index to insert the tab at (integer)
widget
reference to the widget to insert (QWidget)
iconOrLabel
reference to the icon or the labeltext of the tab (QIcon, string)
label
the labeltext of the tab (string) (only to be used, if the second parameter is a QIcon)

E5SideBar.isAutoHiding

isAutoHiding()

Public method to check, if the auto hide function is active.

Returns:
flag indicating the state of auto hiding (boolean)

E5SideBar.isMinimized

isMinimized()

Public method to check the minimized state.

Returns:
flag indicating the minimized state (boolean)

E5SideBar.isTabEnabled

isTabEnabled(index)

Public method to check, if a tab is enabled.

index
index of the tab to check (integer)
Returns:
flag indicating the enabled state (boolean)

E5SideBar.leaveEvent

leaveEvent(event)

Protected method to handle the mouse leaving this widget.

event
reference to the event (QEvent)

E5SideBar.nextTab

nextTab()

Public slot used to show the next tab.

E5SideBar.orientation

orientation()

Public method to get the orientation of the sidebar.

Returns:
orientation of the sidebar (North, East, South, West)

E5SideBar.prevTab

prevTab()

Public slot used to show the previous tab.

E5SideBar.removeTab

removeTab(index)

Public method to remove a tab.

index
the index of the tab to remove (integer)

E5SideBar.restoreState

restoreState(state)

Public method to restore the state of the sidebar.

state
byte array containing the saved state (QByteArray)
Returns:
flag indicating success (boolean)

E5SideBar.saveState

saveState()

Public method to save the state of the sidebar.

Returns:
saved state as a byte array (QByteArray)

E5SideBar.setCurrentIndex

setCurrentIndex(index)

Public slot to set the current index.

index
the index to set as the current index (integer)

E5SideBar.setCurrentWidget

setCurrentWidget(widget)

Public slot to set the current widget.

widget
reference to the widget to become the current widget (QWidget)

E5SideBar.setDelay

setDelay(delay)

Public method to set the delay value for the expand/shrink delay in milliseconds.

delay
value for the expand/shrink delay in milliseconds (integer)

E5SideBar.setOrientation

setOrientation(orient)

Public method to set the orientation of the sidebar.

orient
orientation of the sidebar (North, East, South, West)

E5SideBar.setSplitter

setSplitter(splitter)

Public method to set the splitter managing the sidebar.

splitter
reference to the splitter (QSplitter)

E5SideBar.setTabEnabled

setTabEnabled(index, enabled)

Public method to set the enabled state of a tab.

index
index of the tab to set (integer)
enabled
enabled state to set (boolean)

E5SideBar.setTabIcon

setTabIcon(index, icon)

Public method to set the icon of a tab.

index
index of the tab (integer)
icon
icon to be set (QIcon)

E5SideBar.setTabText

setTabText(index, text)

Public method to set the text of a tab.

index
index of the tab (integer)
text
text to set (string)

E5SideBar.setTabToolTip

setTabToolTip(index, tip)

Public method to set the tooltip text of a tab.

index
index of the tab (integer)
tip
tooltip text to set (string)

E5SideBar.setTabWhatsThis

setTabWhatsThis(index, text)

Public method to set the WhatsThis text of a tab.

index
index of the tab (integer)
text
WhatsThis text to set (string)

E5SideBar.shrink

shrink()

Public method to record a shrink request.

E5SideBar.shutdown

shutdown()

Public method to shut down the object.

This method does some preparations so the object can be deleted properly. It disconnects from the focusChanged signal in order to avoid trouble later on.

E5SideBar.tabIcon

tabIcon(index)

Public method to get the icon of a tab.

index
index of the tab (integer)
Returns:
icon of the tab (QIcon)

E5SideBar.tabText

tabText(index)

Public method to get the text of a tab.

index
index of the tab (integer)
Returns:
text of the tab (string)

E5SideBar.tabToolTip

tabToolTip(index)

Public method to get the tooltip text of a tab.

index
index of the tab (integer)
Returns:
tooltip text of the tab (string)

E5SideBar.tabWhatsThis

tabWhatsThis(index)

Public method to get the WhatsThis text of a tab.

index
index of the tab (integer)
Returns:
WhatsThis text of the tab (string)

E5SideBar.widget

widget(index)

Public method to get a reference to the widget associated with a tab.

index
index of the tab (integer)
Returns:
reference to the widget (QWidget)
Up



Home ⌂Doc Index ◂Up ▴