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