Rename editpatientform to PatientDetailForm
This commit is contained in:
@@ -32,12 +32,13 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
, mBtnSelect(new QToolButton(this))
|
||||
, mPatTable(new SlideTableView(this))
|
||||
, mModel(nullptr)
|
||||
, mEditPatForm(new EditPatientForm(this))
|
||||
, mEditPatForm(new PatientDetailForm(this))
|
||||
{
|
||||
//init command bar
|
||||
auto layout = new QHBoxLayout();
|
||||
ui->commandWidget->setLayout(layout);
|
||||
initGeneralButtons(layout);
|
||||
|
||||
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
addVerticalLine(layout);
|
||||
initPatEditButtons(layout);
|
||||
@@ -47,7 +48,7 @@ SelectFormWidget::SelectFormWidget(QWidget* parent)
|
||||
contentLayout->setContentsMargins(5, 5, 0, 5);
|
||||
this->ui->contentWidget->setLayout(contentLayout);
|
||||
initTableView(contentLayout);
|
||||
addVerticalLine(layout);
|
||||
addVerticalLine(contentLayout);
|
||||
initDetailPanel(contentLayout);
|
||||
//select default row 0
|
||||
if (mModel->rowCount() > 0)
|
||||
@@ -205,7 +206,7 @@ void SelectFormWidget::initDetailPanel(QHBoxLayout *contentLayout) {// prepare e
|
||||
btnShowEdit->hide();
|
||||
});
|
||||
//btn hide slot
|
||||
connect(mEditPatForm, &EditPatientForm::hideBtnClicked, [=]() {
|
||||
connect(mEditPatForm, &PatientDetailForm::hideBtnClicked, [=]() {
|
||||
mEditPatForm->hide();
|
||||
btnShowEdit->show();
|
||||
});
|
||||
@@ -266,7 +267,7 @@ void SelectFormWidget::initDataModel() {//TODO:单独初始化预防SQL错误
|
||||
}
|
||||
|
||||
void SelectFormWidget::setPatientDetail(const SlideTableView *table, const QSqlTableModel *model,
|
||||
EditPatientForm *edit_patient) const {
|
||||
PatientDetailForm *edit_patient) const {
|
||||
PatientInformation pat;
|
||||
#define ADD_PATIENT_PROPERTY(val)\
|
||||
pat. val = model->data(model->index(table->currentIndex().row(),PatientInformationEnum:: val),Qt::EditRole).toString();
|
||||
|
||||
Reference in New Issue
Block a user