From ef8bf056bb586d9af6013a44a52ed395949e0ad5 Mon Sep 17 00:00:00 2001 From: omamkaz Date: Wed, 26 Jun 2024 08:14:22 +0300 Subject: [PATCH] release 0.6.0 --- Qtica/animations/animation_group.py | 2 +- Qtica/animations/property_animation.py | 2 +- Qtica/core/_IODevice.py | 2 +- Qtica/core/_api.py | 7 ++++--- Qtica/core/_base.py | 5 +++-- Qtica/core/_painter.py | 3 ++- Qtica/core/_qobject.py | 2 -- Qtica/core/widgets/box_layout.py | 5 +++-- Qtica/core/widgets/button.py | 2 +- Qtica/core/widgets/container.py | 3 ++- Qtica/core/widgets/dialog.py | 3 ++- Qtica/core/widgets/widget.py | 7 ++++--- Qtica/core/widgets/window.py | 8 +++----- Qtica/services/_methods.py | 8 +++++--- Qtica/services/clipboard.py | 3 ++- Qtica/utils/alignment.py | 3 +-- Qtica/utils/classes.py | 1 - Qtica/utils/env_var.py | 4 +--- Qtica/utils/exception_handler.py | 2 +- Qtica/utils/key_events.py | 5 ++--- 20 files changed, 39 insertions(+), 38 deletions(-) diff --git a/Qtica/animations/animation_group.py b/Qtica/animations/animation_group.py index 30a4a28..c59b997 100644 --- a/Qtica/animations/animation_group.py +++ b/Qtica/animations/animation_group.py @@ -1,5 +1,5 @@ -from PySide6.QtCore import QParallelAnimationGroup, QSequentialAnimationGroup from ..core import AbstractQObject +from PySide6.QtCore import QParallelAnimationGroup, QSequentialAnimationGroup class SequentialAnimationGroup(AbstractQObject, QSequentialAnimationGroup): diff --git a/Qtica/animations/property_animation.py b/Qtica/animations/property_animation.py index c5e7d0b..513e1c5 100644 --- a/Qtica/animations/property_animation.py +++ b/Qtica/animations/property_animation.py @@ -1,5 +1,5 @@ -from PySide6.QtCore import QPropertyAnimation from ..core import AbstractQObject +from PySide6.QtCore import QPropertyAnimation class PropertyAnimation(AbstractQObject, QPropertyAnimation): diff --git a/Qtica/core/_IODevice.py b/Qtica/core/_IODevice.py index 7f9dbea..ffd9312 100644 --- a/Qtica/core/_IODevice.py +++ b/Qtica/core/_IODevice.py @@ -1,5 +1,5 @@ -from PySide6.QtCore import QIODevice from ._qobject import AbstractQObject +from PySide6.QtCore import QIODevice class AbstractIODevice(AbstractQObject): diff --git a/Qtica/core/_api.py b/Qtica/core/_api.py index 9581c87..5ebc1d2 100644 --- a/Qtica/core/_api.py +++ b/Qtica/core/_api.py @@ -1,9 +1,10 @@ +from .. import enums from typing import Any, Union +from ._base import WidgetsType +from ._declarative import AbstractDec, TrackingDec + from PySide6.QtCore import Qt, QObject from PySide6.QtWidgets import QApplication, QWidget -from ._declarative import AbstractDec, TrackingDec -from ._base import WidgetsType -from .. import enums class Api: diff --git a/Qtica/core/_base.py b/Qtica/core/_base.py index 83c7129..c532db3 100644 --- a/Qtica/core/_base.py +++ b/Qtica/core/_base.py @@ -1,10 +1,11 @@ from typing import Any, Callable, TypeAlias, Union -from PySide6.QtCore import Qt, QObject -from PySide6.QtWidgets import QApplication from ..utils.caseconverter import camelcase, snakecase from .objects import Args, MArgs, Func from .. import enums +from PySide6.QtCore import Qt, QObject +from PySide6.QtWidgets import QApplication + EventsType: TypeAlias = Union[list[tuple[Union[enums.Events, str], Callable[..., Any]]], dict[Union[enums.Events, str], Callable[..., Any]]] diff --git a/Qtica/core/_painter.py b/Qtica/core/_painter.py index 922a9d8..9e178ee 100644 --- a/Qtica/core/_painter.py +++ b/Qtica/core/_painter.py @@ -1,6 +1,7 @@ +from ._declarative import AbstractDec + from PySide6.QtGui import QPaintEvent from PySide6.QtWidgets import QWidget -from ._declarative import AbstractDec class AbstractPainter(AbstractDec): diff --git a/Qtica/core/_qobject.py b/Qtica/core/_qobject.py index c54ccdb..ff61c0c 100644 --- a/Qtica/core/_qobject.py +++ b/Qtica/core/_qobject.py @@ -1,5 +1,3 @@ -#!/usr/bin/python3 - from ._base import AbstractBase from ._declarative import AbstractDec diff --git a/Qtica/core/widgets/box_layout.py b/Qtica/core/widgets/box_layout.py index d3cae77..723a9c2 100644 --- a/Qtica/core/widgets/box_layout.py +++ b/Qtica/core/widgets/box_layout.py @@ -1,8 +1,9 @@ from typing import TypeAlias, Union -from PySide6.QtWidgets import QLayoutItem, QSpacerItem, QWidget, QLayout -from ...utils.alignment import Alignment from .._qobject import AbstractQObject from ..objects import BoxLayoutWrapper +from ...utils.alignment import Alignment + +from PySide6.QtWidgets import QLayoutItem, QSpacerItem, QWidget, QLayout BoxLayoutChildrenType: TypeAlias = list[Union[QWidget, QLayout, BoxLayoutWrapper, Alignment]] diff --git a/Qtica/core/widgets/button.py b/Qtica/core/widgets/button.py index 0bd8454..76e20f9 100644 --- a/Qtica/core/widgets/button.py +++ b/Qtica/core/widgets/button.py @@ -1,5 +1,5 @@ -from PySide6.QtCore import Signal from .widget import AbstractWidget +from PySide6.QtCore import Signal class AbstractButton(AbstractWidget): diff --git a/Qtica/core/widgets/container.py b/Qtica/core/widgets/container.py index 5784bab..ec04896 100644 --- a/Qtica/core/widgets/container.py +++ b/Qtica/core/widgets/container.py @@ -1,7 +1,8 @@ from typing import TypeAlias, Union -from PySide6.QtWidgets import QLayout, QWidget from .widget import AbstractWidget +from PySide6.QtWidgets import QLayout, QWidget + ContainerChildType: TypeAlias = Union[QWidget, QLayout, list[QWidget]] diff --git a/Qtica/core/widgets/dialog.py b/Qtica/core/widgets/dialog.py index 6a99fc4..74b58f5 100644 --- a/Qtica/core/widgets/dialog.py +++ b/Qtica/core/widgets/dialog.py @@ -1,7 +1,8 @@ +from .widget import AbstractWidget + from PySide6.QtWidgets import QApplication, QDialog, QWidget from PySide6.QtCore import QEvent, QObject, QTimer from PySide6.QtGui import QCloseEvent, QShowEvent -from .widget import AbstractWidget class AbstractDialog(AbstractWidget, QDialog): diff --git a/Qtica/core/widgets/widget.py b/Qtica/core/widgets/widget.py index 9e89832..c1c739e 100644 --- a/Qtica/core/widgets/widget.py +++ b/Qtica/core/widgets/widget.py @@ -1,10 +1,11 @@ from typing import TypeAlias, Union -from PySide6.QtWidgets import QGraphicsEffect -from PySide6.QtCore import QAbstractAnimation, QAnimationGroup,QTimer, QVariantAnimation, Qt, Signal from .._base import AbstractBase from .._declarative import AbstractDec -from ..objects import PosEvents, PosEventsRange, PosEventsArg, QStyleSheet from ...utils.key_events import MouseButtons, Modifiers +from ..objects import PosEvents, PosEventsRange, PosEventsArg, QStyleSheet + +from PySide6.QtWidgets import QGraphicsEffect +from PySide6.QtCore import QAbstractAnimation, QAnimationGroup,QTimer, QVariantAnimation, Qt, Signal QssType: TypeAlias = Union[str, dict, QStyleSheet] diff --git a/Qtica/core/widgets/window.py b/Qtica/core/widgets/window.py index 22211a2..28b96ac 100644 --- a/Qtica/core/widgets/window.py +++ b/Qtica/core/widgets/window.py @@ -1,11 +1,9 @@ from typing import Union +from .widget import AbstractWidget + from PySide6.QtCore import Signal from PySide6.QtGui import QShowEvent, QCloseEvent -from PySide6.QtWidgets import ( - QWidget, - QLayout -) -from .widget import AbstractWidget +from PySide6.QtWidgets import QWidget,QLayout class AbstractWindow(AbstractWidget): diff --git a/Qtica/services/_methods.py b/Qtica/services/_methods.py index 65ca9e3..c0fb136 100644 --- a/Qtica/services/_methods.py +++ b/Qtica/services/_methods.py @@ -1,11 +1,13 @@ +import re + from typing import Union from random import random +from ..core import AbstractDialog +from ..utils.maths import deg_to_coordinates + from PySide6.QtCore import Qt from PySide6.QtWidgets import QApplication, QWidget from PySide6.QtGui import QColor, QGuiApplication, QLinearGradient, QPixmap, QScreen, QFontMetrics -from ..utils.maths import deg_to_coordinates -from ..core import AbstractDialog -import re CORNERS = { diff --git a/Qtica/services/clipboard.py b/Qtica/services/clipboard.py index ebff813..4f8a83c 100644 --- a/Qtica/services/clipboard.py +++ b/Qtica/services/clipboard.py @@ -1,9 +1,10 @@ from typing import Union from enum import Enum, auto +from ..utils.caseconverter import camelcase + from PySide6.QtCore import QMimeData from PySide6.QtWidgets import QApplication from PySide6.QtGui import QClipboard, QImage, QPixmap -from ..utils.caseconverter import camelcase class Clipboard: diff --git a/Qtica/utils/alignment.py b/Qtica/utils/alignment.py index 5d98e64..b4f68f5 100644 --- a/Qtica/utils/alignment.py +++ b/Qtica/utils/alignment.py @@ -1,8 +1,7 @@ -#!/usr/bin/python3 +from enum import IntFlag from PySide6.QtCore import Qt from PySide6.QtWidgets import QWidget -from enum import IntFlag class Alignment: diff --git a/Qtica/utils/classes.py b/Qtica/utils/classes.py index 7ea66f8..f2c28ab 100644 --- a/Qtica/utils/classes.py +++ b/Qtica/utils/classes.py @@ -1,4 +1,3 @@ -# coding: utf-8 from enum import EnumMeta from os import path as _os_path from inspect import getfile as _ins_getfile diff --git a/Qtica/utils/env_var.py b/Qtica/utils/env_var.py index ec7df75..ac6aa2f 100644 --- a/Qtica/utils/env_var.py +++ b/Qtica/utils/env_var.py @@ -1,10 +1,8 @@ -#!/usr/bin/python3 - +import os from enum import Enum from typing import Any, Union from ..enums.env_vars import EnvVars -import os class EnvVar: diff --git a/Qtica/utils/exception_handler.py b/Qtica/utils/exception_handler.py index dbb0f95..0b1c927 100644 --- a/Qtica/utils/exception_handler.py +++ b/Qtica/utils/exception_handler.py @@ -1,6 +1,6 @@ from copy import deepcopy -from typing import Callable, Union from ..core.objects import Func +from typing import Callable, Union def TryExc(func: Union[Callable, Func], *default): diff --git a/Qtica/utils/key_events.py b/Qtica/utils/key_events.py index 39ce691..43071af 100644 --- a/Qtica/utils/key_events.py +++ b/Qtica/utils/key_events.py @@ -1,9 +1,8 @@ -#!/usr/bin/python3 - from typing import Any, Union +from string import digits + from PySide6.QtCore import Qt from PySide6.QtGui import QKeyEvent, QKeySequence, QMouseEvent -from string import digits class Modifiers: