#ifndef LOGICCOPYIMAGE_H
#define LOGICCOPYIMAGE_H

#include <QObject>
#include <QMutex>

class LogicCopyImage : public QObject
{
    Q_OBJECT
public:
    static LogicCopyImage *instance();
public:
    LogicCopyImage(const LogicCopyImage*)=delete;
    LogicCopyImage *operator =(const LogicCopyImage*)=delete;
public:
    void init(){}
    void destroy() { delete this; }
public:
    bool capacity();
    void updateISOPath(QString);
private:
    explicit LogicCopyImage(QObject *parent = nullptr);
    ~LogicCopyImage();
private slots:
    void slotsDestination(void *);
    void slotsDestinationChange(int i) { m_iDestination = i; }
    void slotsSource(void *);
    void slotsSourceChange(int i) { m_iSource = i; }
    void slotsNoMedium(void *);
    void slotsSetting();
    void slotsCopyImage();
    void slotsCopyData();
private:
    static LogicCopyImage *m_oInstance;
    static QMutex          m_oMutex;
private:
    int                    m_iSource;
    int                    m_iDestination;
    QList<void *>          m_oSources;
    QList<void *>          m_oDestinations;
signals:
    void destination(void *);
    void destination(int);
    void source(void *);
    void source(int);
    void setting(void *);
};
#define COPY_IMGAE LogicCopyImage::instance()
#endif // LOGICCOPYIMAGE_H
