flyout¶
Module Contents¶
Flyout animation type |
|
Flyout view base class |
|
Flyout view |
|
Flyout |
|
Flyout animation manager |
|
Pull up flyout animation manager |
|
Drop down flyout animation manager |
|
Slide left flyout animation manager |
|
Slide right flyout animation manager |
|
Fade in flyout animation manager |
|
Dummy flyout animation manager |
- class FlyoutAnimationType¶
Bases:
enum.Enum
Flyout animation type
- PULL_UP = 0¶
- DROP_DOWN = 1¶
- SLIDE_LEFT = 2¶
- SLIDE_RIGHT = 3¶
- FADE_IN = 4¶
- NONE = 5¶
- class FlyoutViewBase(parent=None)¶
Bases:
PyQt5.QtWidgets.QWidget
Flyout view base class
- abstract addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)¶
- backgroundColor()¶
- borderColor()¶
- paintEvent(e)¶
- class FlyoutView(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=False, parent=None)¶
Bases:
FlyoutViewBase
Flyout view
- closed¶
- addWidget(widget: PyQt5.QtWidgets.QWidget, stretch=0, align=Qt.AlignLeft)¶
add widget to view
- showEvent(e)¶
- class Flyout(view: FlyoutViewBase, parent=None, isDeleteOnClose=True)¶
Bases:
PyQt5.QtWidgets.QWidget
Flyout
- closed¶
- setShadowEffect(blurRadius=35, offset=(0, 8))¶
add shadow to dialog
- closeEvent(e)¶
- showEvent(e)¶
- exec(pos: PyQt5.QtCore.QPoint, aniType=FlyoutAnimationType.PULL_UP)¶
show calendar view
- classmethod make(view: FlyoutViewBase, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True)¶
create and show a flyout
Parameters¶
- view: FlyoutViewBase
flyout view
- target: QWidget | QPoint
the target widget or position to show flyout
- parent: QWidget
parent window
- aniType: FlyoutAnimationType
flyout animation type
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- classmethod create(title: str, content: str, icon: qfluentwidgets.common.icon.FluentIconBase | PyQt5.QtGui.QIcon | str = None, image: str | PyQt5.QtGui.QPixmap | PyQt5.QtGui.QImage = None, isClosable=False, target: PyQt5.QtWidgets.QWidget | PyQt5.QtCore.QPoint = None, parent=None, aniType=FlyoutAnimationType.PULL_UP, isDeleteOnClose=True)¶
create and show a flyout using the default view
Parameters¶
- title: str
the title of teaching tip
- content: str
the content of teaching tip
- icon: InfoBarIcon | FluentIconBase | QIcon | str
the icon of teaching tip
- image: str | QPixmap | QImage
the image of teaching tip
- isClosable: bool
whether to show the close button
- target: QWidget | QPoint
the target widget or position to show flyout
- parent: QWidget
parent window
- aniType: FlyoutAnimationType
flyout animation type
- isDeleteOnClose: bool
whether delete flyout automatically when flyout is closed
- fadeOut()¶
- class FlyoutAnimationManager(flyout: Flyout)¶
Bases:
PyQt5.QtCore.QObject
Flyout animation manager
- managers¶
- classmethod register(name)¶
register menu animation manager
Parameters¶
- name: Any
the name of manager, it should be unique
- abstract exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- abstract position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- classmethod make(aniType: FlyoutAnimationType, flyout: Flyout) FlyoutAnimationManager ¶
mask animation manager
- class PullUpFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Pull up flyout animation manager
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- class DropDownFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Drop down flyout animation manager
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- class SlideLeftFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Slide left flyout animation manager
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- class SlideRightFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Slide right flyout animation manager
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- class FadeInFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Fade in flyout animation manager
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- class DummyFlyoutAnimationManager(flyout: Flyout)¶
Bases:
FlyoutAnimationManager
Dummy flyout animation manager
- exec(pos: PyQt5.QtCore.QPoint)¶
start animation
- position(target: PyQt5.QtWidgets.QWidget)¶
return the top left position relative to the target