Added possibility to add custom widget to GridForm. Small fix in ReportDialog.

This commit is contained in:
2017-06-08 14:21:55 +02:00
parent cf937aee96
commit e5b33fa973
5 changed files with 19 additions and 10 deletions
+6 -5
View File
@@ -24,10 +24,6 @@ IGridForm::IGridForm(QWidget *parent) :
m_columnDialog = new ColumnDialog(this);
connect(m_columnDialog, SIGNAL(accepted()), this, SLOT(columnsAccepted()));
connect(ui->tableView->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex &current, const QModelIndex &){
currentIndexChanged(current);
});
m_varFiller = new VariableFiller();
}
@@ -93,6 +89,11 @@ QWidget *IGridForm::filterWidget()
return ui->filterWidget;
}
QVBoxLayout *IGridForm::mainLayout()
{
return ui->verticalLayout;
}
void IGridForm::enableButtons()
{
ui->btnNew->setEnabled(canAddRecord());
@@ -179,7 +180,7 @@ void IGridForm::on_tableView_clicked(const QModelIndex &)
void IGridForm::on_btnPrint_clicked()
{
ReportDialog *dialog = new ReportDialog(this);
ReportDialog *dialog = new ReportDialog(currentRecordId() != 0, this);
dialog->setAttribute(Qt::WA_DeleteOnClose);
if (m_varFiller != NULL)