ImageSize.Preset: Add equality test
This commit is contained in:
parent
31757840f0
commit
c0d9e5c845
|
@ -59,6 +59,14 @@ class ImageSize:
|
|||
if divisor > 2:
|
||||
self.__smooth_transform = False
|
||||
|
||||
def __eq__(self, other: 'ImageSize.Preset'):
|
||||
return (
|
||||
self.__size == other.size
|
||||
and self.__divisor == other.divisor
|
||||
and self.__smooth_transform == other.smooth
|
||||
and self.__pixel_ratio == other.pixel_ratio
|
||||
)
|
||||
|
||||
@property
|
||||
def size(self) -> QSize:
|
||||
return self.__size
|
||||
|
|
Loading…
Reference in a new issue