code beautifying
This commit is contained in:
parent
857f706443
commit
2a5cf16998
1 changed files with 11 additions and 9 deletions
|
@ -11,8 +11,8 @@
|
||||||
|
|
||||||
#include <utils.h>
|
#include <utils.h>
|
||||||
|
|
||||||
#include <excelreader.h>
|
|
||||||
#include <csvreader.h>
|
#include <csvreader.h>
|
||||||
|
#include <excelreader.h>
|
||||||
#include <posprinter.h>
|
#include <posprinter.h>
|
||||||
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
@ -47,7 +47,8 @@ MainWindow::MainWindow()
|
||||||
ui_.salesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
ui_.salesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||||
setSaleModel();
|
setSaleModel();
|
||||||
|
|
||||||
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::closeAllWindows, Qt::QueuedConnection);
|
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::closeAllWindows,
|
||||||
|
Qt::QueuedConnection);
|
||||||
connect(ui_.newAction, &QAction::triggered, this, [=]() {
|
connect(ui_.newAction, &QAction::triggered, this, [=]() {
|
||||||
if (marketplace_->getSellers().size() == 0 && marketplace_->getSales().size() == 0) {
|
if (marketplace_->getSellers().size() == 0 && marketplace_->getSales().size() == 0) {
|
||||||
return;
|
return;
|
||||||
|
@ -368,7 +369,8 @@ void MainWindow::onCancelSaleButtonClicked([[maybe_unused]] bool checked)
|
||||||
|
|
||||||
QString lastPriceValue(formatCentAsEuroString(0).c_str());
|
QString lastPriceValue(formatCentAsEuroString(0).c_str());
|
||||||
if (ui_.salesView->model()->rowCount() > 0) {
|
if (ui_.salesView->model()->rowCount() > 0) {
|
||||||
lastPriceValue = ui_.salesView->model()->data(ui_.salesView->model()->index(0, 1)).toString();
|
lastPriceValue =
|
||||||
|
ui_.salesView->model()->data(ui_.salesView->model()->index(0, 1)).toString();
|
||||||
}
|
}
|
||||||
ui_.lastPriceLabel1->setText(lastPriceValue);
|
ui_.lastPriceLabel1->setText(lastPriceValue);
|
||||||
ui_.lastPriceLabel2->setText(lastPriceValue);
|
ui_.lastPriceLabel2->setText(lastPriceValue);
|
||||||
|
@ -455,8 +457,9 @@ void MainWindow::onImportSellerExcelActionTriggered()
|
||||||
QMessageBox::StandardButton::Ok, this)
|
QMessageBox::StandardButton::Ok, this)
|
||||||
.exec();
|
.exec();
|
||||||
|
|
||||||
auto filename = QFileDialog::getOpenFileName(this, "Verkäufer importieren", QString(),
|
auto filename = QFileDialog::getOpenFileName(
|
||||||
"Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)");
|
this, "Verkäufer importieren", QString(),
|
||||||
|
"Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)");
|
||||||
|
|
||||||
if (filename.isEmpty())
|
if (filename.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
@ -595,4 +598,3 @@ void MainWindow::updateStatLabel()
|
||||||
|
|
||||||
ui_.statLabel->setText(statistics.c_str());
|
ui_.statLabel->setText(statistics.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue