summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-03-12 18:43:34 -0400
committerLouie S <louie@example.com>2024-03-12 18:43:34 -0400
commite0608b1e0891c5782ffbc291788268e76d494d4e (patch)
tree87da44ed017a57b12009f01e5bf5dd6cd5ff3ae3
parentc96d1c12f1fd2a34105305cb560792936c246259 (diff)
Implement toggleDone
-rw-r--r--src/entryLayout.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/entryLayout.cpp b/src/entryLayout.cpp
index 3bf09e6..eff8f1e 100644
--- a/src/entryLayout.cpp
+++ b/src/entryLayout.cpp
@@ -3,6 +3,7 @@
#include <QDebug>
+#include "backend/db_sqlite.h"
#include "editEntryForm.h"
#include "entryLayout.h"
#include "lib.h"
@@ -126,7 +127,11 @@ void EntryLayout::setRules() {
}
void EntryLayout::toggleDone() {
- qDebug() << "WIP";
+ BackendDB database;
+
+ this->entry.done = !this->entry.done;
+ database.updateEntry(this->entry);
+ getMainWindow()->displayWidgets();
}
void EntryLayout::removeEntry() {