#ifndef PRINTERMANGER_H
#define PRINTERMANGER_H

#include <QObject>
#include "baseboxprinter.h"
#include "struct_/modelinfo.h"

class PrinterManger : public QObject
{
    Q_OBJECT
public:
    explicit PrinterManger(QObject *parent = nullptr);

    void setPrinter(const QSharedPointer<BaseBoxPrinter> box, const QSharedPointer<BasePackinfoPrinter> packInfo);

    void setPrinterName(const QString & name);
signals:
public slots:
    void printerBox(QSharedPointer<BoxInfo> info);
    void printerBox1(QSharedPointer<BoxInfo> info);
    void printerBoxModel(QSharedPointer<BoxInfo> info,int ModelIndex);

    void printerPack(QSharedPointer<PackInfo> info);
    void printerPackModel(QSharedPointer<PackInfo> info,int ModelIndex);

private:
    void doPrinter(QPrinter & printer,QImage & img);
private:
    QSharedPointer<BaseBoxPrinter> _boxPrinter;
    QSharedPointer<BasePackinfoPrinter> _packPrinter;
    QString _printerName;
};

#endif // PRINTERMANGER_H
