diff options
author | Louie S <louie@example.com> | 2024-07-23 20:37:48 -0400 |
---|---|---|
committer | Louie S <louie@example.com> | 2024-07-23 20:37:48 -0400 |
commit | c34930425fadfc4083067b9306159cd8e8ecf6c6 (patch) | |
tree | d9c09709f1b9cf7e9bcf098d48c7036044098a7d /src/editGroupForm.cpp | |
parent | f820f439910ef0243e6b9aded293190341b058ac (diff) |
Rearrange source file locations
Diffstat (limited to 'src/editGroupForm.cpp')
-rw-r--r-- | src/editGroupForm.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
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 <QMessageBox> - -#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(); -} |