@@ -45,7 +45,7 @@ ReceiptSaveForm::ReceiptSaveForm(QSharedPointer<Voucher> voucher, QWidget *paren
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(!text.isEmpty());
|
||||
});
|
||||
|
||||
m_binder.setData(new Voucher);
|
||||
m_binder.setData(voucher.data());
|
||||
AddressBookService srvAdb;
|
||||
m_binder.registerBinding(ui->contact, ComboData::createComboData(srvAdb.all()));
|
||||
m_binder.registerBinding(ui->name);
|
||||
@@ -66,6 +66,21 @@ ReceiptSaveForm::~ReceiptSaveForm()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
VoucherPtr ReceiptSaveForm::selectedVoucher()
|
||||
{
|
||||
if (ui->tabVouchers->currentIndex().isValid())
|
||||
{
|
||||
return m_voucherModel->itemFromIndex(ui->tabVouchers->currentIndex());
|
||||
}
|
||||
|
||||
return VoucherPtr();
|
||||
}
|
||||
|
||||
bool ReceiptSaveForm::saveAsNew()
|
||||
{
|
||||
return m_saveAsNew;
|
||||
}
|
||||
|
||||
void ReceiptSaveForm::on_lineEdit_textChanged(const QString &text)
|
||||
{
|
||||
QSortFilterProxyModel proxy;
|
||||
|
||||
Reference in New Issue
Block a user