#ifndef BOXTEMLATEONE_H
#define BOXTEMLATEONE_H

#include "baseboxprinter.h"
#include "globalinfo.h"

class BoxTemlateOne : public BaseBoxPrinter
{
public:
    BoxTemlateOne();

    virtual QImage doPrinter(QSharedPointer<BoxInfo> box);//默认码单
    virtual QImage doPrinter1(QSharedPointer<BoxInfo> box);//默认码单2
    virtual QImage doPrinter(QSharedPointer<BoxInfo> box,int ModelIndex);
    virtual QImage Boxmodel();
    virtual QSize printSize();
    QString FindData(QSharedPointer<BoxInfo> box,QString data);

private:
    QSharedPointer<BoxModel> boxM;

private:
    const int MAXWIDTH=100;
    const int MAXHEIGHT=80;
    int FONTHEIGHT=10;
};

class PackTemlateOne : public BasePackinfoPrinter
{
public:
    PackTemlateOne();

    virtual QImage doPrinter(QSharedPointer<PackInfo> pack);
    virtual QImage doPrinter(QSharedPointer<PackInfo> pack,int ModelIndex);
    virtual QImage Packmodel();
    virtual QSize printSize();
    QString FindData(QSharedPointer<PackInfo> pack,QString data);
    QString Find20Data(QSharedPointer<PackInfo> pack,QString data,int index);
private:
    QSharedPointer<PackModel> packM;
private:
    const int MAXWIDTH=100;
    const int MAXHEIGHT=80;
    int FONTHEIGHT=10;
};

#endif // BOXTEMLATEONE_H
