|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
#include "ui_paydvouchersdialog.h"
|
|
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include <QScroller>
|
|
|
|
|
#include <QScrollBar>
|
|
|
|
|
|
|
|
|
|
#include "receiptgenerator.h"
|
|
|
|
|
#include "shopservice.h"
|
|
|
|
@ -47,13 +47,12 @@ PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
|
|
|
|
|
|
|
|
|
ui->tableItems->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
|
|
|
|
|
ui->tableItems->setColumnHidden(0, true);
|
|
|
|
|
ui->tableItems->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
|
|
|
|
|
|
|
|
|
ShopService srv;
|
|
|
|
|
m_voucherModel->setData(srv.paiedVouchers());
|
|
|
|
|
ui->tableVouchers->sortByColumn(0,Qt::AscendingOrder);
|
|
|
|
|
|
|
|
|
|
QScroller::grabGesture(ui->tableVouchers, QScroller::LeftMouseButtonGesture);
|
|
|
|
|
QScroller::grabGesture(ui->tableItems, QScroller::LeftMouseButtonGesture);
|
|
|
|
|
ui->tableVouchers->verticalScrollBar()->setStyleSheet("QScrollBar:vertical { width: 30px; }");
|
|
|
|
|
|
|
|
|
|
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this, &srv](const QModelIndex ¤t, const QModelIndex &) {
|
|
|
|
|
QSharedPointer<Voucher> voucher = m_voucherModel->itemFromIndex(current);
|
|
|
|
|