From c34930425fadfc4083067b9306159cd8e8ecf6c6 Mon Sep 17 00:00:00 2001 From: Louie S Date: Tue, 23 Jul 2024 20:37:48 -0400 Subject: Rearrange source file locations --- src/editGroupForm.cpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 src/editGroupForm.cpp (limited to 'src/editGroupForm.cpp') diff --git a/src/editGroupForm.cpp b/src/editGroupForm.cpp deleted file mode 100644 index 52c45ac..0000000 --- a/src/editGroupForm.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include - -#include "backend/db_sqlite.h" -#include "editGroupForm.h" - -EditGroupForm::EditGroupForm(const Group &g) : - group(g) -{ - // load uic - ui.setupUi(this); - - // set titles - this->setWindowTitle("Edit Group"); - ui.title->setText("Edit Group"); - - // widgets setup - ui.group_name->setText(this->group.name); - ui.group_column->setCurrentIndex(this->group.column); - ui.group_link->setText(this->group.link); -} - -void EditGroupForm::accept() { - this->group.name = ui.group_name->text(); - this->group.column = Group::Column(ui.group_column->currentIndex()); - this->group.link = ui.group_link->text(); - QMessageBox error_message; - BackendDB database; - - if(this->group.name.isEmpty()) { - error_message.setIcon(QMessageBox::Warning); - error_message.setWindowTitle("Error Message"); - error_message.setText("Name cannot be blank"); - error_message.exec(); - return; - } - - database.updateGroup(this->group); - - QDialog::accept(); -} -- cgit