navigation_bar¶
Module Contents¶
Icon sliding animation |
|
Navigation bar push button |
|
- class IconSlideAnimation(parent=None)¶
Bases:
PyQt5.QtCore.QPropertyAnimationIcon sliding animation
- maxOffset = 6¶
- getOffset()¶
- setOffset(value: float)¶
- slideDown()¶
slide down
- slideUp()¶
slide up
- offset¶
- class NavigationBarPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, selectedIcon=None, parent=None)¶
Bases:
qfluentwidgets.components.navigation.navigation_widget.NavigationPushButtonNavigation bar push button
- iconAni¶
- lightSelectedColor¶
- darkSelectedColor¶
- setSelectedColor(light, dark)¶
- selectedIcon()¶
- setSelectedIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- setSelectedTextVisible(isVisible)¶
- indicatorRect()¶
get the indicator geometry
- paintEvent(e)¶
- class NavigationBar(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidget- indicator¶
- lightSelectedColor¶
- darkSelectedColor¶
- scrollArea¶
- scrollWidget¶
- vBoxLayout¶
- topLayout¶
- bottomLayout¶
- scrollLayout¶
- items: Dict[str, qfluentwidgets.components.navigation.navigation_widget.NavigationWidget]¶
- history¶
- widget(routeKey: str)¶
- addItem(routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)¶
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
- selectable: bool
whether the item is selectable
- selectedIcon: str | QIcon | FluentIconBase
the icon of navigation item in selected state
- position: NavigationItemPosition
where the button is added
- addWidget(routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)¶
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
- insertItem(index: int, routeKey: str, icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIconBase, text: str, onClick=None, selectable=True, selectedIcon=None, position=NavigationItemPosition.TOP)¶
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
- selectable: bool
whether the item is selectable
- selectedIcon: str | QIcon | FluentIconBase
the icon of navigation item in selected state
- position: NavigationItemPosition
where the button is added
- insertWidget(index: int, routeKey: str, widget: qfluentwidgets.components.navigation.navigation_widget.NavigationWidget, onClick=None, position=NavigationItemPosition.TOP)¶
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
- currentItem()¶
- setCurrentItem(routeKey: str)¶
set current selected item
Parameters¶
- routeKey: str
the unique name of item
- setFont(font: PyQt5.QtGui.QFont)¶
set the font of navigation item
- setSelectedTextVisible(isVisible: bool)¶
set whether the text is visible when button is selected
- isSelectedTextVisible()¶
- setSelectedColor(light, dark)¶
set the selected color of all items
- buttons()¶
- isIndicatorAnimationEnabled()¶
- setIndicatorAnimationEnabled(isEnabled: bool)¶