navigation_widget¶
Module Contents¶
Navigation widget |
|
Navigation push button |
|
Navigation tool button |
|
Navigation Separator |
|
Navigation item header for grouping items |
|
Navigation tree item widget |
|
Navigation tree widget base class |
|
Navigation tree widget |
|
Avatar widget |
|
Navigation item info badge manager |
|
Navigation flyout menu |
|
Navigation user card widget |
|
Navigation indicator |
- class NavigationWidget(isSelectable: bool, parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation widget
- clicked¶
- selectedChanged¶
- EXPAND_WIDTH = 312¶
- isCompacted = True¶
- isSelected = False¶
- isPressed = False¶
- isEnter = False¶
- isAboutSelected = False¶
- isSelectable¶
- treeParent = None¶
- nodeDepth = 0¶
- lightTextColor¶
- darkTextColor¶
- lightIndicatorColor¶
- darkIndicatorColor¶
- 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
- setAboutSelected(selected: bool)¶
- indicatorRect()¶
get the indicator geometry
- setIndicatorColor(light, dark)¶
- 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 NavigationItemHeader(text: str, parent=None)¶
Bases:
NavigationWidgetNavigation item header for grouping items
- lightTextColor¶
- darkTextColor¶
- heightAni¶
- text()¶
- setText(text: str)¶
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- mousePressEvent(e)¶
- mouseReleaseEvent(e)¶
- enterEvent(e)¶
- leaveEvent(e)¶
- 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)¶
- treeWidget() → NavigationTreeWidget¶
- 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
- abstract setRememberExpandState(remember: bool)¶
set whether to remember expand state
- abstract saveExpandState()¶
save current expand state
- abstract restoreExpandState(ani=True)¶
restore saved expand state
- 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
- setIndicatorColor(light, dark)¶
set the indicator 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
- setAboutSelected(selected: bool)¶
- setRememberExpandState(remember: bool)¶
set whether to remember expand state
- saveExpandState()¶
save current expand state
- restoreExpandState(ani=True)¶
restore saved expand state
- class NavigationAvatarWidget(name: str, avatar: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, parent=None)¶
Bases:
NavigationWidgetAvatar widget
- name¶
- avatar¶
- 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()¶
- class NavigationUserCard(parent=None)¶
Bases:
NavigationAvatarWidgetNavigation user card widget
- setAvatarIcon(icon: qfluentwidgets.common.icon.FluentIcon)¶
set avatar icon when no image is set
- setAvatarBackgroundColor(light: PyQt5.QtGui.QColor, dark: PyQt5.QtGui.QColor)¶
set avatar background color in light/dark theme mode
- title()¶
get user card title
- setTitle(title: str)¶
set user card title
- subtitle()¶
get user card subtitle
- setSubtitle(subtitle: str)¶
set user card subtitle
- setTitleFontSize(size: int)¶
set title font size
- setSubtitleFontSize(size: int)¶
set subtitle font size
- setAnimationDuration(duration: int)¶
set animation duration in milliseconds
- setCompacted(isCompacted: bool)¶
set whether the widget is compacted
- paintEvent(e)¶
- textOpacity()¶
- subtitleColor()¶
- class NavigationIndicator(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidgetNavigation indicator
- aniFinished¶
- lightColor¶
- darkColor¶
- scaleSlideAni¶
- startAnimation(startRect: PyQt5.QtCore.QRectF, endRect: PyQt5.QtCore.QRectF, useCrossFade=False)¶
Start indicator animation
Parameters¶
- endRect: QRectF
the final geometry of indicator
- useCrossFade: bool
whether to use cross fade animation
- stopAnimation()¶
Stop animation
- setIndicatorColor(light, dark)¶
- paintEvent(e)¶