2016-04-07 22:22:53 +02:00
|
|
|
#ifndef RECEIPTSAVEFORM_H
|
|
|
|
|
#define RECEIPTSAVEFORM_H
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2016-06-03 15:55:21 +02:00
|
|
|
#include <objectbinder.h>
|
|
|
|
|
#include <autotablemodel.h>
|
|
|
|
|
#include "data/voucher.h"
|
2016-04-07 22:22:53 +02:00
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class ReceiptSaveForm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ReceiptSaveForm : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2016-07-06 21:37:46 +02:00
|
|
|
explicit ReceiptSaveForm(QSharedPointer<Voucher> voucher, QWidget *parent = 0);
|
2016-04-07 22:22:53 +02:00
|
|
|
~ReceiptSaveForm();
|
|
|
|
|
|
2017-02-21 20:37:38 +01:00
|
|
|
VoucherPtr selectedVoucher();
|
|
|
|
|
bool saveAsNew();
|
|
|
|
|
|
2016-06-03 15:55:21 +02:00
|
|
|
private slots:
|
|
|
|
|
void on_lineEdit_textChanged(const QString &text);
|
|
|
|
|
|
|
|
|
|
void on_radioAdd_toggled(bool checked);
|
|
|
|
|
|
2016-04-07 22:22:53 +02:00
|
|
|
private:
|
|
|
|
|
Ui::ReceiptSaveForm *ui;
|
2016-06-03 15:55:21 +02:00
|
|
|
ObjectBinder m_binder;
|
|
|
|
|
AutoTableModel<Voucher> *m_voucherModel;
|
|
|
|
|
bool m_saveAsNew;
|
2017-02-21 20:37:38 +01:00
|
|
|
VoucherPtr m_voucher;
|
2016-07-06 21:37:46 +02:00
|
|
|
|
|
|
|
|
// QDialog interface
|
|
|
|
|
public slots:
|
|
|
|
|
virtual void accept() override;
|
2016-04-07 22:22:53 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // RECEIPTSAVEFORM_H
|