Added possibility to add custom widget to GridForm. Small fix in ReportDialog.
This commit is contained in:
+6
-5
@@ -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 ¤t, 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)
|
||||
|
||||
Reference in New Issue
Block a user