|
|
|
@ -2,6 +2,7 @@
|
|
|
|
|
#include "ui_paydvouchersdialog.h"
|
|
|
|
|
|
|
|
|
|
#include <QFileDialog>
|
|
|
|
|
#include <QScroller>
|
|
|
|
|
|
|
|
|
|
#include "receiptgenerator.h"
|
|
|
|
|
#include "shopservice.h"
|
|
|
|
@ -48,6 +49,9 @@ PaydVouchersDialog::PaydVouchersDialog(QWidget *parent) :
|
|
|
|
|
m_voucherModel->setData(srv.paiedVouchers());
|
|
|
|
|
ui->tableVouchers->sortByColumn(0,Qt::AscendingOrder);
|
|
|
|
|
|
|
|
|
|
QScroller::grabGesture(ui->tableVouchers, QScroller::LeftMouseButtonGesture);
|
|
|
|
|
QScroller::grabGesture(ui->tableItems, QScroller::LeftMouseButtonGesture);
|
|
|
|
|
|
|
|
|
|
connect(ui->tableVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this, &srv](const QModelIndex ¤t, const QModelIndex &) {
|
|
|
|
|
QSharedPointer<Voucher> voucher = m_voucherModel->itemFromIndex(current);
|
|
|
|
|
srv.loadItems(voucher);
|
|
|
|
|