more on sellerdialog (deleting still not ok)
This commit is contained in:
parent
ffbf27c1f8
commit
4fdaba01d3
4 changed files with 24 additions and 9 deletions
|
@ -14,6 +14,8 @@ SellerDialog::SellerDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent,
|
|||
ui_.tableView->setColumnHidden(0, true); // hide the uuid
|
||||
connect(ui_.newButton, &QPushButton::clicked, this, &SellerDialog::on_newButton_clicked);
|
||||
connect(ui_.deleteButton, &QPushButton::clicked, this, &SellerDialog::on_deleteButton_clicked);
|
||||
connect(model, &SellerModel::duplicateSellerNo, this,
|
||||
&SellerDialog::on_model_duplicateSellerNo);
|
||||
}
|
||||
|
||||
void SellerDialog::on_newButton_clicked()
|
||||
|
@ -33,7 +35,7 @@ void SellerDialog::on_deleteButton_clicked()
|
|||
if (selModel->hasSelection() == false)
|
||||
return;
|
||||
auto indexes = selModel->selectedRows();
|
||||
|
||||
|
||||
std::sort(indexes.begin(), indexes.end());
|
||||
|
||||
// Deleting the rows, beginning with the last one!
|
||||
|
@ -42,6 +44,13 @@ void SellerDialog::on_deleteButton_clicked()
|
|||
}
|
||||
}
|
||||
|
||||
void SellerDialog::on_model_duplicateSellerNo(const QString& message)
|
||||
{
|
||||
QMessageBox(QMessageBox::Icon::Warning, "Fehler", message, QMessageBox::StandardButton::Ok,
|
||||
this)
|
||||
.exec();
|
||||
}
|
||||
|
||||
void SellerDialog::accept()
|
||||
{
|
||||
Marketplace* market = dynamic_cast<MainWindow*>(parentWidget())->getMarketplace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue