From f2ca02a9230621d0968b8df129051e332339b768 Mon Sep 17 00:00:00 2001 From: Louie S Date: Sat, 16 Sep 2023 09:36:14 -0400 Subject: Saving and loading entries working --- entry.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'entry.py') diff --git a/entry.py b/entry.py index 2c01b3f..df3f566 100644 --- a/entry.py +++ b/entry.py @@ -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 -- cgit