mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
Python: Remove builtins. namespace use
This commit is contained in:
parent
1fc0c79cbd
commit
45b55b8a8c
1 changed files with 33 additions and 33 deletions
|
|
@ -14,45 +14,45 @@ from collections.abc import Callable
|
|||
from enum import Enum, auto
|
||||
|
||||
class RgbColor:
|
||||
red: builtins.int
|
||||
green: builtins.int
|
||||
blue: builtins.int
|
||||
red: int
|
||||
green: int
|
||||
blue: int
|
||||
|
||||
class RgbaColor:
|
||||
red: builtins.int
|
||||
green: builtins.int
|
||||
blue: builtins.int
|
||||
alpha: builtins.int
|
||||
red: int
|
||||
green: int
|
||||
blue: int
|
||||
alpha: int
|
||||
|
||||
class Color:
|
||||
red: builtins.int
|
||||
green: builtins.int
|
||||
blue: builtins.int
|
||||
alpha: builtins.int
|
||||
red: int
|
||||
green: int
|
||||
blue: int
|
||||
alpha: int
|
||||
def __new__(
|
||||
cls,
|
||||
maybe_value: typing.Optional[
|
||||
builtins.str | RgbaColor | RgbColor | typing.Dict[str, int]
|
||||
str | RgbaColor | RgbColor | typing.Dict[str, int]
|
||||
] = None,
|
||||
) -> "Color": ...
|
||||
def brighter(self, factor: builtins.float) -> "Color": ...
|
||||
def darker(self, factor: builtins.float) -> "Color": ...
|
||||
def transparentize(self, factor: builtins.float) -> "Color": ...
|
||||
def mix(self, other: "Image", factor: builtins.float) -> "Color": ...
|
||||
def with_alpha(self, alpha: builtins.float) -> "Color": ...
|
||||
def __str__(self) -> builtins.str: ...
|
||||
def __eq__(self, other: object) -> builtins.bool: ...
|
||||
def brighter(self, factor: float) -> "Color": ...
|
||||
def darker(self, factor: float) -> "Color": ...
|
||||
def transparentize(self, factor: float) -> "Color": ...
|
||||
def mix(self, other: "Image", factor: float) -> "Color": ...
|
||||
def with_alpha(self, alpha: float) -> "Color": ...
|
||||
def __str__(self) -> str: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class Brush:
|
||||
color: Color
|
||||
def __new__(cls, maybe_value: typing.Optional[Color]) -> "Brush": ...
|
||||
def is_transparent(self) -> builtins.bool: ...
|
||||
def is_opaque(self) -> builtins.bool: ...
|
||||
def brighter(self, factor: builtins.float) -> "Brush": ...
|
||||
def darker(self, factor: builtins.float) -> "Brush": ...
|
||||
def transparentize(self, amount: builtins.float) -> "Brush": ...
|
||||
def with_alpha(self, alpha: builtins.float) -> "Brush": ...
|
||||
def __eq__(self, other: object) -> builtins.bool: ...
|
||||
def is_transparent(self) -> bool: ...
|
||||
def is_opaque(self) -> bool: ...
|
||||
def brighter(self, factor: float) -> "Brush": ...
|
||||
def darker(self, factor: float) -> "Brush": ...
|
||||
def transparentize(self, amount: float) -> "Brush": ...
|
||||
def with_alpha(self, alpha: float) -> "Brush": ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class Image:
|
||||
r"""
|
||||
|
|
@ -60,22 +60,22 @@ class Image:
|
|||
image file on disk, using `Image.load_from_path`.
|
||||
"""
|
||||
|
||||
size: tuple[builtins.int, builtins.int]
|
||||
width: builtins.int
|
||||
height: builtins.int
|
||||
path: typing.Optional[builtins.str]
|
||||
size: tuple[int, int]
|
||||
width: int
|
||||
height: int
|
||||
path: typing.Optional[str]
|
||||
def __new__(
|
||||
cls,
|
||||
) -> "Image": ...
|
||||
@staticmethod
|
||||
def load_from_path(path: builtins.str | os.PathLike[Any] | pathlib.Path) -> "Image":
|
||||
def load_from_path(path: str | os.PathLike[Any] | pathlib.Path) -> "Image":
|
||||
r"""
|
||||
Loads the image from the specified path. Returns None if the image can't be loaded.
|
||||
"""
|
||||
...
|
||||
|
||||
@staticmethod
|
||||
def load_from_svg_data(data: typing.Sequence[builtins.int]) -> "Image":
|
||||
def load_from_svg_data(data: typing.Sequence[int]) -> "Image":
|
||||
r"""
|
||||
Creates a new image from a string that describes the image in SVG format.
|
||||
"""
|
||||
|
|
@ -96,7 +96,7 @@ class Timer:
|
|||
def single_shot(duration: datetime.timedelta, callback: typing.Any) -> None: ...
|
||||
def stop(self) -> None: ...
|
||||
def restart(self) -> None: ...
|
||||
def running(self) -> builtins.bool: ...
|
||||
def running(self) -> bool: ...
|
||||
def set_interval(self, interval: datetime.timedelta) -> None: ...
|
||||
|
||||
def set_xdg_app_id(app_id: str) -> None: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue