navigation_widget¶
Module Contents¶
Navigation widget |
|
Navigation push button |
|
Navigation tool button |
|
Navigation Separator |
|
Navigation tree item widget |
|
Navigation tree widget base class |
|
Navigation tree widget |
|
Avatar widget |
|
Navigation item info badge manager |
|
Navigation flyout menu |
- class NavigationWidget(isSelectable: bool, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation widget
- clicked¶
- selectedChanged¶
- EXPAND_WIDTH = 312¶
- isCompacted = True¶
- isSelected = False¶
- isPressed = False¶
- isEnter = False¶
- isSelectable¶
- treeParent = None¶
- nodeDepth = 0¶
- lightTextColor¶
- darkTextColor¶
- enterEvent(e)¶
- leaveEvent(e)¶
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- click()¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- setSelected(isSelected: bool)¶
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
- textColor()¶
- setLightTextColor(color)¶
set the text color in light theme mode
- setDarkTextColor(color)¶
set the text color in dark theme mode
- setTextColor(light, dark)¶
set the text color in light/dark theme mode
- class NavigationPushButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)¶
Bases:
NavigationWidgetNavigation push button
- text()¶
- setText(text: str)¶
- icon()¶
- setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- paintEvent(e)¶
- class NavigationToolButton(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, parent=None)¶
Bases:
NavigationPushButtonNavigation tool button
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- class NavigationSeparator(parent=None)¶
Bases:
NavigationWidgetNavigation Separator
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- paintEvent(e)¶
- class NavigationTreeItem(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)¶
Bases:
NavigationPushButtonNavigation tree item widget
- itemClicked¶
- rotateAni¶
- setExpanded(isExpanded: bool)¶
- mouseReleaseEvent(e)¶
- paintEvent(e)¶
- getArrowAngle()¶
- setArrowAngle(angle)¶
- arrowAngle¶
- class NavigationTreeWidgetBase(isSelectable: bool, parent=None)¶
Bases:
NavigationWidgetNavigation tree widget base class
- abstract insertChild(index: int, child: NavigationWidget)¶
insert child
Parameters¶
- child: NavigationTreeWidgetBase
child item
- abstract removeChild(child: NavigationWidget)¶
remove child
Parameters¶
- child: NavigationTreeWidgetBase
child item
- isRoot()¶
is root node
- isLeaf()¶
is leaf node
- abstract setExpanded(isExpanded: bool)¶
set the expanded status
Parameters¶
- isExpanded: bool
whether to expand node
- abstract childItems() → list¶
return child items
- class NavigationTreeWidget(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon, text: str, isSelectable: bool, parent=None)¶
Bases:
NavigationTreeWidgetBaseNavigation tree widget
- expanded¶
- treeChildren: List[NavigationTreeWidget] = []¶
- isExpanded = False¶
- itemWidget¶
- vBoxLayout¶
- expandAni¶
- text()¶
- icon()¶
- setText(text)¶
- setIcon(icon: str | PyQt5.QtGui.QIcon | qfluentwidgets.common.icon.FluentIcon)¶
- textColor()¶
- setLightTextColor(color)¶
set the text color in light theme mode
- setDarkTextColor(color)¶
set the text color in dark theme mode
- setTextColor(light, dark)¶
set the text color in light/dark theme mode
- setFont(font: PyQt5.QtGui.QFont)¶
- clone()¶
- suitableWidth()¶
- childItems() → list¶
return child items
- setExpanded(isExpanded: bool, ani=False)¶
set the expanded status
- isRoot()¶
is root node
- isLeaf()¶
is leaf node
- setSelected(isSelected: bool)¶
set whether the button is selected
Parameters¶
- isSelected: bool
whether the button is selected
- mouseReleaseEvent(e)¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- class NavigationAvatarWidget(name: str, avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage, parent=None)¶
Bases:
NavigationWidgetAvatar widget
- name¶
- setName(name: str)¶
- setAvatar(avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage)¶
- paintEvent(e)¶
- class NavigationItemInfoBadgeManager(target: PyQt5.QtWidgets.QWidget, badge: InfoBadge)¶
Bases:
qfluentwidgets.components.widgets.info_badge.InfoBadgeManagerNavigation item info badge manager
- eventFilter(obj, e: PyQt5.QtCore.QEvent)¶
- position()¶
return the position of info badge
- class NavigationFlyoutMenu(tree: NavigationTreeWidget, parent=None)¶
Bases:
qfluentwidgets.components.widgets.scroll_area.ScrollAreaNavigation flyout menu
- expanded¶
- view¶
- treeWidget¶
- treeChildren = []¶
- vBoxLayout¶
- visibleTreeNodes()¶