"""
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
import PyQt5.sip
from PyQt5.QtCore import *


class QTextEncoder(PyQt5.sip.wrapper):
    """
    https://doc.qt.io/qt-5/qtextencoder.html

    **Detailed Description**

    A text encoder converts text from Unicode into an encoded text format using
    a specific codec.

    The encoder converts Unicode into another format, remembering any state that
    is required between calls.

    **See also** **QTextCodec::makeEncoder** () and **QTextDecoder** .
    """

    @typing.overload
    def __init__(self, codec: QTextCodec) -> None:
        """
        https://doc.qt.io/qt-5/qtextencoder.html#QTextEncoder-1

        **QTextEncoder::QTextEncoder(const QTextCodec * codec )**

        Constructs a text encoder for the given **codec**.
        """
        ...

    @typing.overload
    def __init__(
        self,
        codec: QTextCodec,
        flags: typing.Union[QTextCodec.ConversionFlags, QTextCodec.ConversionFlag],
    ) -> None:
        """
        https://doc.qt.io/qt-5/qtextencoder.html#QTextEncoder-2

        **QTextEncoder::QTextEncoder(const QTextCodec * codec ,
        QTextCodec::ConversionFlags flags )**

        Constructs a text encoder for the given **codec** and conversion
        **flags**.

        This function was introduced in Qt 4.7.
        """
        ...

    def fromUnicode(self, str: str) -> QByteArray:
        """
        https://doc.qt.io/qt-5/qtextencoder.html#fromUnicode

        **QByteArray QTextEncoder::fromUnicode(const QString & str )**

        Converts the Unicode string **str** into an encoded **QByteArray** .
        """
        ...
