navigation_panel¶
Module Contents¶
Navigation display mode |
|
Navigation item position |
|
Navigation tool tip filter |
|
Navigation item |
|
Navigation panel |
|
Navigation layout |
- class NavigationDisplayMode¶
Bases:
enum.Enum
Navigation display mode
- MINIMAL = 0¶
- COMPACT = 1¶
- EXPAND = 2¶
- MENU = 3¶
- class NavigationItemPosition¶
Bases:
enum.Enum
Navigation item position
- TOP = 0¶
- SCROLL = 1¶
- BOTTOM = 2¶
- class NavigationToolTipFilter(parent: PyQt5.QtWidgets.QWidget, showDelay=300, position=ToolTipPosition.TOP)¶
Bases:
qfluentwidgets.components.widgets.tool_tip.ToolTipFilter
Navigation tool tip filter
- exception RouteKeyError¶
Bases:
Exception
Route key error
- class NavigationItem(routeKey: str, parentRouteKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget)¶
Navigation item
- class NavigationPanel(parent=None, isMinimalEnabled=False)¶
Bases:
PyQt5.QtWidgets.QFrame
Navigation panel
- displayModeChanged¶
- widget(routeKey: str)¶
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
add navigation item
Parameters¶
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- selectable: bool
whether the item is selectable
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent widget should be NavigationTreeWidget
- addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
add custom widget
Parameters¶
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey=None)¶
insert navigation tree item
Parameters¶
- index: int
the insert position of parent widget
- routeKey: str
the unique name of item
- icon: str | QIcon | FluentIconBase
the icon of navigation item
- text: str
the text of navigation item
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- selectable: bool
whether the item is selectable
- tooltip: str
the tooltip of item
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP, tooltip: str = None, parentRouteKey: str = None)¶
insert custom widget
Parameters¶
- index: int
insert position
- routeKey: str
the unique name of item
- widget: NavigationWidget
the custom widget to be added
- onClick: callable
the slot connected to item clicked signal
- position: NavigationItemPosition
where the button is added
- tooltip: str
the tooltip of widget
- parentRouteKey: str
the route key of parent item, the parent item should be NavigationTreeWidget
- addSeparator(position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- position: NavigationPostion
where to add the separator
- insertSeparator(index: int, position=NavigationItemPosition.TOP)¶
add separator
Parameters¶
- index: int
insert position
- position: NavigationPostion
where to add the separator
- setMenuButtonVisible(isVisible: bool)¶
set whether the menu button is visible
- setReturnButtonVisible(isVisible: bool)¶
set whether the return button is visible
- setCollapsible(on: bool)¶
- setExpandWidth(width: int)¶
set the maximum width
- setMinimumExpandWidth(width: int)¶
Set the minimum window width that allows panel to be expanded
- setAcrylicEnabled(isEnabled: bool)¶
- isAcrylicEnabled()¶
whether the acrylic effect is enabled
- expand(useAni=True)¶
expand navigation panel
- collapse()¶
collapse navigation panel
- toggle()¶
toggle navigation panel
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- isCollapsed()¶
- resizeEvent(e: PyQt5.QtGui.QResizeEvent)¶
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- layoutMinHeight()¶
- paintEvent(e)¶