info_bar ======== .. py:module:: qfluentwidgets.components.widgets.info_bar Module Contents --------------- .. autoapisummary:: qfluentwidgets.components.widgets.info_bar.InfoBarIcon qfluentwidgets.components.widgets.info_bar.InfoBarPosition qfluentwidgets.components.widgets.info_bar.InfoIconWidget qfluentwidgets.components.widgets.info_bar.InfoBar qfluentwidgets.components.widgets.info_bar.InfoBarManager qfluentwidgets.components.widgets.info_bar.TopInfoBarManager qfluentwidgets.components.widgets.info_bar.TopRightInfoBarManager qfluentwidgets.components.widgets.info_bar.BottomRightInfoBarManager qfluentwidgets.components.widgets.info_bar.TopLeftInfoBarManager qfluentwidgets.components.widgets.info_bar.BottomLeftInfoBarManager qfluentwidgets.components.widgets.info_bar.BottomInfoBarManager qfluentwidgets.components.widgets.info_bar.DesktopInfoBarView .. py:class:: InfoBarIcon Bases: :py:obj:`qfluentwidgets.common.icon.FluentIconBase`, :py:obj:`enum.Enum` Info bar icon .. py:attribute:: INFORMATION :value: 'Info' .. py:attribute:: SUCCESS :value: 'Success' .. py:attribute:: WARNING :value: 'Warning' .. py:attribute:: ERROR :value: 'Error' .. py:method:: path(theme=Theme.AUTO) get the path of icon Parameters ---------- theme: Theme the theme of icon * `Theme.Light`: black icon * `Theme.DARK`: white icon * `Theme.AUTO`: icon color depends on `config.theme` .. py:class:: InfoBarPosition Bases: :py:obj:`enum.Enum` Info bar position .. py:attribute:: TOP :value: 0 .. py:attribute:: BOTTOM :value: 1 .. py:attribute:: TOP_LEFT :value: 2 .. py:attribute:: TOP_RIGHT :value: 3 .. py:attribute:: BOTTOM_LEFT :value: 4 .. py:attribute:: BOTTOM_RIGHT :value: 5 .. py:attribute:: NONE :value: 6 .. py:class:: InfoIconWidget(icon: InfoBarIcon, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget` Icon widget .. py:attribute:: icon .. py:method:: paintEvent(e) .. py:class:: InfoBar(icon: Union[InfoBarIcon, qfluentwidgets.common.icon.FluentIconBase, PyQt5.QtGui.QIcon, str], title: str, content: str, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QFrame` Information bar .. py:attribute:: closedSignal .. py:attribute:: title .. py:attribute:: content .. py:attribute:: orient .. py:attribute:: icon .. py:attribute:: duration :value: 1000 .. py:attribute:: isClosable :value: True .. py:attribute:: position .. py:attribute:: titleLabel .. py:attribute:: contentLabel .. py:attribute:: closeButton .. py:attribute:: iconWidget .. py:attribute:: hBoxLayout .. py:attribute:: textLayout .. py:attribute:: widgetLayout .. py:attribute:: opacityEffect .. py:attribute:: opacityAni .. py:attribute:: lightBackgroundColor :value: None .. py:attribute:: darkBackgroundColor :value: None .. py:method:: addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0) add widget to info bar .. py:method:: setCustomBackgroundColor(light, dark) set the custom background color Parameters ---------- light, dark: str | Qt.GlobalColor | QColor background color in light/dark theme mode .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: closeEvent(e) .. py:method:: showEvent(e) .. py:method:: paintEvent(e) .. py:method:: new(icon, title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: info(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: success(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: warning(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: error(title, content, orient=Qt.Horizontal, isClosable=True, duration=1000, position=InfoBarPosition.TOP_RIGHT, parent=None) :classmethod: .. py:method:: desktopView() :classmethod: Returns the desktop container .. py:class:: InfoBarManager Bases: :py:obj:`PyQt5.QtCore.QObject` Info bar manager .. py:attribute:: managers .. py:attribute:: spacing :value: 16 .. py:attribute:: margin :value: 24 .. py:attribute:: infoBars .. py:attribute:: aniGroups .. py:attribute:: slideAnis :value: [] .. py:attribute:: dropAnis :value: [] .. py:method:: add(infoBar: InfoBar) add info bar .. py:method:: remove(infoBar: InfoBar) remove info bar .. py:method:: eventFilter(obj, e: PyQt5.QtCore.QEvent) .. py:method:: register(name) :classmethod: register menu animation manager Parameters ---------- name: Any the name of manager, it should be unique .. py:method:: make(position: InfoBarPosition) :classmethod: mask info bar manager according to the display position .. py:class:: TopInfoBarManager Bases: :py:obj:`InfoBarManager` Top position info bar manager .. py:class:: TopRightInfoBarManager Bases: :py:obj:`InfoBarManager` Top right position info bar manager .. py:class:: BottomRightInfoBarManager Bases: :py:obj:`InfoBarManager` Bottom right position info bar manager .. py:class:: TopLeftInfoBarManager Bases: :py:obj:`InfoBarManager` Top left position info bar manager .. py:class:: BottomLeftInfoBarManager Bases: :py:obj:`InfoBarManager` Bottom left position info bar manager .. py:class:: BottomInfoBarManager Bases: :py:obj:`InfoBarManager` Bottom position info bar manager .. py:class:: DesktopInfoBarView(parent=None) Bases: :py:obj:`PyQt5.QtWidgets.QWidget`