code formatting
This commit is contained in:
parent
d677dfd628
commit
acc3095e60
23 changed files with 215 additions and 215 deletions
|
@ -17,10 +17,10 @@
|
|||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
ReportDialog::ReportDialog(QWidget* parent, Qt::WindowFlags f) : QDialog(parent, f)
|
||||
ReportDialog::ReportDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
|
||||
{
|
||||
ui_.setupUi(this);
|
||||
market_ = dynamic_cast<MainWindow*>(parent)->getMarketplace();
|
||||
market_ = dynamic_cast<MainWindow *>(parent)->getMarketplace();
|
||||
model_ = std::make_unique<ReportModel>(market_, ui_.reportView);
|
||||
ui_.reportView->setModel(model_.get());
|
||||
ui_.reportView->hideColumn(0);
|
||||
|
@ -76,7 +76,7 @@ void ReportDialog::onPrintReportButtonClicked()
|
|||
int height = printer.height();
|
||||
int width = printer.width();
|
||||
const double ENTRIES_PER_PAGE = 51;
|
||||
const auto& sellers = market_->getSellers();
|
||||
const auto &sellers = market_->getSellers();
|
||||
unsigned int numPages = std::ceil(sellers.size() / ENTRIES_PER_PAGE);
|
||||
|
||||
painter.begin(&printer);
|
||||
|
@ -136,7 +136,7 @@ void ReportDialog::onPrintReportButtonClicked()
|
|||
QString content("Einzelteile ohne Nummer\n=======================\n\n");
|
||||
unsigned int lines{0};
|
||||
unsigned int pages{1};
|
||||
for (const auto& article : specialSeller->getArticles(true)) {
|
||||
for (const auto &article : specialSeller->getArticles(true)) {
|
||||
content += QString("- %1:").arg(article->getDescription().substr(0, 45).c_str(), -45);
|
||||
content += QString("%1\n").arg(article->getPriceAsString().c_str(), 11);
|
||||
++lines;
|
||||
|
@ -201,7 +201,7 @@ void ReportDialog::onPrintSellerReceiptButtonClicked()
|
|||
return;
|
||||
|
||||
auto indexes = selModel->selectedRows();
|
||||
auto& seller = market_->getSellers().at(indexes[0].row());
|
||||
auto &seller = market_->getSellers().at(indexes[0].row());
|
||||
|
||||
auto printerDevice =
|
||||
convertToPosPrinterDevice(posPrinterDevice.toStdString(), posPrinterEndpoint.toStdString());
|
||||
|
@ -220,8 +220,8 @@ void ReportDialog::onPrintSellerReceiptButtonClicked()
|
|||
settings.value("global/commune", "Dettingen").toString().toStdString());
|
||||
}
|
||||
|
||||
void ReportDialog::onReportViewSelectionChanged(const QItemSelection& selected,
|
||||
[[maybe_unused]] const QItemSelection& deselected)
|
||||
void ReportDialog::onReportViewSelectionChanged(const QItemSelection &selected,
|
||||
[[maybe_unused]] const QItemSelection &deselected)
|
||||
{
|
||||
if (selected.size() > 0) {
|
||||
ui_.printSellerReceiptButton->setEnabled(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue