You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prodejna/shop/receiptgenerator.h

36 lines
708 B
C++

#ifndef RECEIPTGENERATOR_H
#define RECEIPTGENERATOR_H
#include "data/voucher.h"
#include "settings/shopsettings.h"
class ReceiptGenerator
{
public:
ReceiptGenerator();
void setVoucher(const QSharedPointer<Voucher> &voucher);
void setSettings(const ShopSettingsPtr &settings);
void save();
void print();
QString outputFile() const;
void setOutputFile(const QString &outputFile);
private:
static const QString DIACRITIC;
static const QString NON_DIACRITIC;
QSharedPointer<Voucher> m_voucher;
ShopSettingsPtr m_settings;
QString m_outputFile;
QByteArray generate();
QByteArray prepareString(const QString &str);
};
#endif // RECEIPTGENERATOR_H