-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
21 changed files
with
536 additions
and
510 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
- Zoom in/Zoom out (idk) | ||
- Statistics (alive cells, dead cells, cells died, cells born) | ||
- Make class for Pattern or naah | ||
- Full Language Translate | ||
- Pattern Saving from the state | ||
- Statistics! | ||
- Border annoys | ||
- Border annoys | ||
- Fix unittest tempfiles not creating at all | ||
- Add notice about focusing |
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
22 changes: 12 additions & 10 deletions
22
src/conways_game_of_life/ConfigManager/QtPropertyJsonConverter.py
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,15 +1,17 @@ | ||
from PySide6.QtGui import QColor | ||
|
||
|
||
def to_property_type(value): | ||
if (isinstance(value, list) or isinstance(value, tuple)) and len(value) == 3: | ||
value = QColor(value[0], value[1], value[2]) | ||
def deserialize_property(obj): | ||
if isinstance(obj, dict) and '__qcolor__' in obj: | ||
rgba = obj['rgba'] | ||
return QColor(*rgba) | ||
return obj | ||
|
||
return value | ||
|
||
|
||
def to_json_type(value): | ||
if isinstance(value, QColor): | ||
value = (value.red(), value.green(), value.blue()) | ||
|
||
return value | ||
def serialize_property(obj): | ||
if isinstance(obj, QColor): | ||
return { | ||
'__qcolor__': True, | ||
'rgba': (obj.red(), obj.green(), obj.blue(), obj.alpha()) | ||
} | ||
return obj |
Oops, something went wrong.