-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
35c3dc8
commit 66c0155
Showing
6 changed files
with
4 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
from enum import IntEnum, Enum | ||
from typing import Union | ||
|
||
from .decorators import * | ||
from .widgets import * | ||
from .concurrent import asynchronous | ||
|
||
|
||
def enum2int(enum: Union[Enum, IntEnum]) -> int: | ||
""" | ||
PyQt5 uses IntEnum like object for settings, for example SortOrder while | ||
PyQt6 uses Enum. PyQt5's IntEnum also does not support value attribute. | ||
This function transform both settings objects to int. | ||
Parameters | ||
---------- | ||
enum | ||
IntEnum like object or Enum object with Qt's settings | ||
Returns | ||
------- | ||
Settings transformed to int | ||
""" | ||
return int(enum) if isinstance(enum, int) else enum.value |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters