Like QTabWidget the LogView provides a stack of widgets. Different from
the normal QTabWidget the tabs are aligned at the bottom with QTabBar::RoundedBelow
style. The contents of the different widgets can be scrolled by scrollbars that are
on the right and bottom side. The widgets themselves must be derived from
LogViewWidget.
LogView is not derived from QTabWidget as this would prevent the implentation
of the horizontal scrollbar at the side of the tabbar. The interface is similar to
QTabWidget to make it easy to use.
Methods
|
|
|
|
__init__
|
__init__ (
self,
parent=None,
name=None,
flags=0,
)
Constructor
Arguments
- parent
- parent widget (QWidget)
- name
- name of this widget (string or QString)
- flags
- window flags
|
|
addTab
|
addTab (
self,
child,
labelOrTabOrIconset,
label=None,
)
Adds a tab.
Arguments
- child
- child widget to be managed
- labelOrTabOrIconset
- label, tab or icon to be shown
(QString, QTab or QIconSet)
- label
- label to be displayed next to an icon (QString)
Exceptions
|
|
TypeError, "LogView.addTab() only accepts LogViewWidget"
TypeError, "addTab() takes 4 arguments (3 given)"
|
|
|
contextMenuEvent
|
contextMenuEvent ( self, evt )
Reimplemented for custom context menu.
Arguments
- evt
- context menu event (QContextMenuEvent)
|
|
getActualViewport
|
getActualViewport ( self )
Gets the actual viewport or None if there is none.
Returns
reference to the actual viewport
|
|
handleClearWidget
|
handleClearWidget ( self )
Private slot to handle the clear popup menu action.
|
|
handleScrollbarValueChanged
|
handleScrollbarValueChanged ( self, value )
Called when the value of a scrollbar changes.
Arguments
- value
- value of the scrollbar (int) (ignored)
|
|
handleTabbarSelected
|
handleTabbarSelected ( self, id )
Called when the selection in the tabbar changes.
The corresponding widget is activated.
Arguments
- id
- the id of the selected tab (int)
|
|
handleWidgetSizeChanged
|
handleWidgetSizeChanged ( self, widget )
Recalculates the scrollbars if necessary.
|
|
resizeEvent
|
resizeEvent ( self, evt )
Reimplemented to set the scrollbar sizes.
Arguments
- evt
- resize event (QResizeEvent)
|
|
setCurrentPage
|
setCurrentPage ( self, pos )
Set the page at position pos as the current page.
|
|
setupScrollBars
|
setupScrollBars ( self )
Calculates the sizes of the scrollbars for the top widget.
|
|
wheelEvent
|
wheelEvent ( self, evt )
Private method to override the wheel event.
Arguments
- evt
- wheel event (QWheelEvent)
|