-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add import/export capability and other changes
Added error messages for deck creation when using the name of an already existing deck
- Loading branch information
MarcoBenelli
committed
Dec 23, 2021
1 parent
6393559
commit db15d42
Showing
7 changed files
with
125 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import dataclasses | ||
|
||
from PyQt5 import QtCore | ||
|
||
|
||
@dataclasses.dataclass | ||
class Card: | ||
identifier: int | ||
question: str | ||
answer: str | ||
_answer: str | ||
|
||
def set_answer(self, answer: str) -> None: | ||
self._answer = answer.replace(QtCore.QStandardPaths.writableLocation( | ||
QtCore.QStandardPaths.AppDataLocation), '<//>') | ||
|
||
def get_answer(self) -> str: | ||
return self._answer.replace('<//>', | ||
QtCore.QStandardPaths.writableLocation( | ||
QtCore.QStandardPaths.AppDataLocation)) |
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
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