From e0608b1e0891c5782ffbc291788268e76d494d4e Mon Sep 17 00:00:00 2001 From: Louie S Date: Tue, 12 Mar 2024 18:43:34 -0400 Subject: Implement toggleDone --- src/entryLayout.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 +#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() { -- cgit