summaryrefslogtreecommitdiff
path: root/src/add_entry_form.cpp
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2024-03-09 15:56:27 -0500
committerLouie S <louie@example.com>2024-03-09 15:56:27 -0500
commit312ea44966ca5ee65185fc837d15143e7dd59761 (patch)
tree05bdb405e2f0f60f0b5375a0add0b4c762b3fde7 /src/add_entry_form.cpp
parent6914f8a111b89dc512143d001c2abce3f17d48c0 (diff)
Rename group and entry forms
Diffstat (limited to 'src/add_entry_form.cpp')
-rw-r--r--src/add_entry_form.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/add_entry_form.cpp b/src/add_entry_form.cpp
index b08fedc..25a8af2 100644
--- a/src/add_entry_form.cpp
+++ b/src/add_entry_form.cpp
@@ -11,17 +11,21 @@ AddEntryForm::AddEntryForm(int parent_id) :
// load uic
ui.setupUi(this);
+ // set titles
+ this->setWindowTitle("Add Entry");
+ ui.title->setText("Add Entry");
+
// widgets setup
- ui.new_entry_due->setDate(QDate::currentDate());
+ ui.entry_due->setDate(QDate::currentDate());
}
void AddEntryForm::accept() {
- QString desc_text = ui.new_entry_desc->text();
- QDateTime due_text = ui.new_entry_due->date().startOfDay();
- QString due_alt_text = ui.new_entry_due_alt->text();
- QString link_text = ui.new_entry_link->text();
- QString color_text = ui.new_entry_color->text();
- QString highlight_text = ui.new_entry_highlight->text();
+ QString desc_text = ui.entry_desc->text();
+ QDateTime due_text = ui.entry_due->date().startOfDay();
+ QString due_alt_text = ui.entry_due_alt->text();
+ QString link_text = ui.entry_link->text();
+ QString color_text = ui.entry_color->text();
+ QString highlight_text = ui.entry_highlight->text();
QMessageBox error_message;
BackendDB database;
int new_id;
@@ -36,7 +40,7 @@ void AddEntryForm::accept() {
}
// replace due_text with null date if due_checkbox is unchecked
- if(!ui.new_entry_due_checkbox->isChecked())
+ if(!ui.entry_due_checkbox->isChecked())
due_text = QDateTime();
new_id = database.insertEntry(Entry(0, this->parent_id, desc_text, due_text, due_alt_text, link_text, color_text, highlight_text));