show something in the statusbar.

allow_new_sellers
Martin Brodbeck 4 years ago
parent 5eef98074e
commit 300c883fdc
  1. 11
      src/gui/mainwindow.cpp

@ -2,14 +2,19 @@
#include "sellerdialog.h"
constexpr int STATUSBAR_TIMEOUT = 5000;
MainWindow::MainWindow()
{
ui_.setupUi(this);
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::quit);
connect(ui_.actionEditSeller, &QAction::triggered, this, &MainWindow::on_actionEditSeller_triggered);
connect(ui_.actionEditSeller, &QAction::triggered, this,
&MainWindow::on_actionEditSeller_triggered);
marketplace_ = std::make_unique<Marketplace>();
marketplace_->loadFromDb();
statusBar()->showMessage("Gespeicherte Daten wurden geladen.", STATUSBAR_TIMEOUT);
}
void MainWindow::on_actionEditSeller_triggered()
@ -18,7 +23,11 @@ void MainWindow::on_actionEditSeller_triggered()
int retCode = dialog->exec();
if (retCode == QDialog::Accepted) {
marketplace_->storeToDb();
statusBar()->showMessage("Änderungen an den Verkäufer-Stammdaten gespeichert.",
STATUSBAR_TIMEOUT);
} else {
marketplace_->loadFromDb();
statusBar()->showMessage("Änderungen an den Verkäufer-Stammdaten <b>verworfen</b>.",
STATUSBAR_TIMEOUT);
}
}
Loading…
Cancel
Save