-
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 possibility to rename deck and reset time info
Added rename deck dialog when double click deck name Added reset deck to clear all spaced repetition time info of a deck General bug fixes and other minor additions
- Loading branch information
1 parent
db15d42
commit bab7dc5
Showing
6 changed files
with
156 additions
and
92 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,19 +1,19 @@ | ||
import dataclasses | ||
|
||
from PyQt5 import QtCore | ||
import config | ||
|
||
|
||
@dataclasses.dataclass | ||
class Card: | ||
identifier: int | ||
deck_name: str | ||
question: str | ||
_answer: str | ||
|
||
def set_answer(self, answer: str) -> None: | ||
self._answer = answer.replace(QtCore.QStandardPaths.writableLocation( | ||
QtCore.QStandardPaths.AppDataLocation), '<//>') | ||
self._answer = answer.replace( | ||
f'{config.DECKS_DIR}{self.deck_name}', '<//>') | ||
|
||
def get_answer(self) -> str: | ||
return self._answer.replace('<//>', | ||
QtCore.QStandardPaths.writableLocation( | ||
QtCore.QStandardPaths.AppDataLocation)) | ||
f'{config.DECKS_DIR}{self.deck_name}') |
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
Oops, something went wrong.