eye.widgets.tabs module¶
Tab widget
- class eye.widgets.tabs.SplitButton(**kwargs)[source]¶
Bases:
QToolButton
,WidgetMixin
Button for splitting
When clicked, the button shows a popup menu to choose between horizontal split and vertical split. The button is suitable for using as cornerWidget of
TabWidget
.
- class eye.widgets.tabs.TabBar(**kwargs)[source]¶
Bases:
QTabBar
,BandMixin
,CategoryMixin
- class eye.widgets.tabs.TabWidget(**kwargs)[source]¶
Bases:
DropAreaMixin
,QTabWidget
,WidgetMixin
,BandMixin
Tab widget class
By default, instances of this class have the category “tabwidget” (see eye.connector module).
- close_tab(ed)[source]¶
Close the tab containing the specified widget and return True if it can be
The tab can’t be closed if the widget has a close_file() method which returns True when it is called. This method allows a tab content to reject closing if a file wasn’t saved.
- file_dropped = Signal(str)¶
- last_tab_closed = Signal()¶
Signal last_tab_closed()
This signal is emitted when the last tab of this tab widget has been closed.
- refocus()[source]¶
Give focus to the widget inside the current tab
This slot has signature
refocus()
.
- remove_widget(ed)¶
Close the tab containing the specified widget and return True if it can be
The tab can’t be closed if the widget has a close_file() method which returns True when it is called. This method allows a tab content to reject closing if a file wasn’t saved.
- select_next_tab(rotate=False)[source]¶
Select next tab
- Parameters:
rotate (bool) – if True and the current tab is the last tab, the first tab is selected.
This slot has signature
select_next_tab()
.
- select_next_tab_rotate()[source]¶
Select next tab or first tab if current is the last tab
This slot has signature
select_next_tab_rotate()
.
- select_prev_tab(rotate=False)[source]¶
Select previous tab.
- Parameters:
rotate (bool) – if True and the current tab is the first tab, the last tab is selected.
This slot has signature
select_prev_tab()
.
- select_prev_tab_rotate()[source]¶
Select previous tab or last if current is the first tab
This slot has signature
select_prev_tab_rotate()
.
- setCurrentWidget(widget)[source]¶
Select the tab containing the specified widget
Overrides a Qt method.