diff options
author | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-09-16 09:36:14 -0400 |
commit | f2ca02a9230621d0968b8df129051e332339b768 (patch) | |
tree | 723646b246c29f5bab7d652f7625ffef130b9ff0 /entry.py | |
parent | b4025edf0ac5400d4dd8c418a9a156c44e9c67f8 (diff) |
Saving and loading entries working
Diffstat (limited to 'entry.py')
-rw-r--r-- | entry.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -4,13 +4,15 @@ from PyQt5.QtGui import QFont from PyQt5.QtWidgets import QLabel class Entry: - def __init__(self, parent_id, desc, due = "", due_alt = "", link = ""): + def __init__(self, id, parent_id, desc, due = "", due_alt = "", link = "", done = False, hidden = False): + self.id = id self.parent_id = parent_id self.desc = desc self.due = due self.due_alt = due_alt self.link = link - self.done = False + self.done = done + self.hidden = hidden def buildLayout(self): output = QLabel() @@ -19,7 +21,7 @@ class Entry: output.setText("- ") if(self.due): - output.setText(output.text() + time.strftime("%m/%d/%y: ")) + output.setText(output.text() + "{0}/{1}/{2}: ".format(self.due.month(), self.due.day(), self.due.year())) output.setText(output.text() + self.desc) return output |