"""
PySide stub files generated by **IceSpringPySideStubs**

Home: https://baijifeilong.github.io/2022/01/06/ice-spring-pyside-stubs/index.html

Github: https://github.com/baijifeilong/IceSpringPySideStubs

PyPI(PySide2): https://pypi.org/project/IceSpringPySideStubs-PySide2

PyPI(PySide6): https://pypi.org/project/IceSpringPySideStubs-PySide6

PyPI(PyQt5): https://pypi.org/project/IceSpringPySideStubs-PyQt5

PyPI(PyQt6): https://pypi.org/project/IceSpringPySideStubs-PyQt6

Generated by BaiJiFeiLong@gmail.com

License: MIT
"""
import typing
from PyQt6 import QtCore
from PyQt6.QtGui import *


class QActionEvent(QtCore.QEvent):
    """
    https://doc.qt.io/qt-6/qactionevent.html

    **Detailed Description**

    Actions can be added to controls, for example by using
    **QWidget::addAction** (). This generates an **ActionAdded**  event, which
    you can handle to provide custom behavior. For example, **QToolBar**
    reimplements **QWidget::actionEvent** () to create **QToolButton** s for the
    actions.

    **See also** **QAction** , **QWidget::addAction** (),
    **QWidget::removeAction** (), and **QWidget::actions** ().
    """

    def __init__(
        self, type: int, action: QAction, before: typing.Optional[QAction] = ...
    ) -> None:
        """
        https://doc.qt.io/qt-6/qactionevent.html#QActionEvent-2

        **QActionEvent::QActionEvent(int type , QAction * action , QAction *
        before = nullptr)**

        Constructs an action event. The **type** can be **ActionChanged** ,
        **ActionAdded** , or **ActionRemoved** .

        **action** is the action that is changed, added, or removed. If **type**
        is ActionAdded, the action is to be inserted before the action
        **before**. If **before** is `nullptr`, the action is appended.
        """
        ...

    def clone(self) -> "QActionEvent":
        ...

    def before(self) -> QAction:
        """
        https://doc.qt.io/qt-6/qactionevent.html#before

        **QAction *QActionEvent::before() const**

        If **type** () is **ActionAdded** , returns the action that should
        appear before **action** (). If this function returns `nullptr`, the
        action should be appended to already existing actions on the same
        widget.

        **See also** **action** () and **QWidget::actions** ().
        """
        ...

    def action(self) -> QAction:
        """
        https://doc.qt.io/qt-6/qactionevent.html#action

        **QAction *QActionEvent::action() const**

        Returns the action that is changed, added, or removed.

        **See also** **before** ().
        """
        ...
