|
|
@ -28,6 +28,7 @@ ReceiptLoadForm::ReceiptLoadForm(QWidget *parent) :
|
|
|
|
ui->tabVouchers->setColumnWidth(2, 200);
|
|
|
|
ui->tabVouchers->setColumnWidth(2, 200);
|
|
|
|
|
|
|
|
|
|
|
|
m_itemModel = new AutoTableModel<VoucherItem>(this);
|
|
|
|
m_itemModel = new AutoTableModel<VoucherItem>(this);
|
|
|
|
|
|
|
|
m_itemModel->setCheckboxSelect(true);
|
|
|
|
ui->tabItems->setModel(m_itemModel);
|
|
|
|
ui->tabItems->setModel(m_itemModel);
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui->tabVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, QModelIndex){
|
|
|
|
connect(ui->tabVouchers->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, QModelIndex){
|
|
|
@ -43,6 +44,16 @@ ReceiptLoadForm::~ReceiptLoadForm()
|
|
|
|
delete ui;
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QList<VoucherItemPtr> ReceiptLoadForm::selectedItems()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return m_itemModel->selectedItems();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VoucherPtr ReceiptLoadForm::selectedVoucher()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return m_voucherModel->itemFromIndex(ui->tabVouchers->currentIndex());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ReceiptLoadForm::on_lineEdit_textChanged(const QString &text)
|
|
|
|
void ReceiptLoadForm::on_lineEdit_textChanged(const QString &text)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QSortFilterProxyModel proxy;
|
|
|
|
QSortFilterProxyModel proxy;
|
|
|
|