From 9a087e1874ee56394638440f42996658753a1251 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Mon, 29 May 2017 21:37:15 +0200 Subject: [PATCH] Added protected method GridForm::addRow. Increased settings form size. --- core/gridform.h | 9 +++++++-- core/settingsform.ui | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/gridform.h b/core/gridform.h index 2f833d4..abb39b5 100644 --- a/core/gridform.h +++ b/core/gridform.h @@ -57,8 +57,7 @@ public: connect(m_form, &IForm::recordAdded, [this](){ //service()->save(form()->entity()); - m_tableModel->addRow(form()->entity()); - emit dataChanged(); + addRow(form()->entity()); }); connect(m_form, &IForm::recordUpdated, [this](){ //service()->update(form()->entity()); @@ -224,6 +223,12 @@ protected: } } + void addRow(QSharedPointer entity) + { + m_tableModel->addRow(entity); + emit dataChanged(); + } + void showImportButton() { QHBoxLayout *tbLayout = qobject_cast(this->toolbar()->layout()); diff --git a/core/settingsform.ui b/core/settingsform.ui index 3041060..9675024 100644 --- a/core/settingsform.ui +++ b/core/settingsform.ui @@ -9,8 +9,8 @@ 0 0 - 800 - 600 + 1000 + 700