#ifndef RECEIPTSAVEFORM_H #define RECEIPTSAVEFORM_H #include #include #include #include "data/voucher.h" namespace Ui { class ReceiptSaveForm; } class ReceiptSaveForm : public QDialog { Q_OBJECT public: explicit ReceiptSaveForm(QSharedPointer voucher, QWidget *parent = 0); ~ReceiptSaveForm(); VoucherPtr selectedVoucher(); bool saveAsNew(); private slots: void on_lineEdit_textChanged(const QString &text); void on_radioAdd_toggled(bool checked); private: Ui::ReceiptSaveForm *ui; ObjectBinder m_binder; AutoTableModel *m_voucherModel; bool m_saveAsNew; VoucherPtr m_voucher; // QDialog interface public slots: virtual void accept() override; }; #endif // RECEIPTSAVEFORM_H