You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
539 B
C++

#include "formdialog.h"
#include "ui_formdialog.h"
FormDialog::FormDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::FormDialog)
{
ui->setupUi(this);
m_formSet = false;
m_form = NULL;
}
FormDialog::~FormDialog()
{
delete ui;
}
void FormDialog::setForm(IForm *formWidget)
{
if (m_form == NULL)
{
ui->verticalLayout->addWidget(formWidget);
m_form = formWidget;
setGeometry(formWidget->geometry());
}
}
void FormDialog::on_buttonBox_accepted()
{
m_form->saveRecord();
}