#ifndef BUSNESSSETTING_H
#define BUSNESSSETTING_H

#include <QWidget>
#include <QDebug>

namespace Ui {
class BusnessSetting;
}

class BusnessSetting : public QWidget
{
    Q_OBJECT

public:
    explicit BusnessSetting(QWidget *parent = nullptr);
    ~BusnessSetting();

protected:
    void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;

public slots:
    void load(void *);
    void setSpeed(int i) { m_iSpeed = i; }
    void setBurnFormat(QString s) { m_SBurnFormat = s; }
    void setClean(bool b) { m_bClean = b; }
    void setCreateISO(bool b) { m_bCreateISO = b; }
    void setCloseSession(bool b) { m_bCloseSession = b; }
    void setVerficationData(bool b) { m_bVerfication = b; }
    void setOpen(bool b) { m_bOpen = b; }
    void setPreparer(QString s) { m_oPreparer = s; }
    void setPublisher(QString s) { m_oPublisher = s; }
    void setVolumnID(QString s);
    void setCopyright(QString s) { m_oCopyright = s; }
    void setTempPath(QString s) { m_oTemporaryPth = s;}

private:
    void setTemporaryPath(QString);
    void uiAdjust();
    void initTempPathLineEdit();

private slots:
    void slotsChange();
    void slotsBrowse();
    void slotsAccept();

private:
    int         m_iSpeed;
    bool        m_bClean;
    bool        m_bCreateISO;
    bool        m_bCloseSession;
    bool        m_bVerfication;
    bool        m_bOpen;
    void       *m_oCDROM;
    QString     m_oPreparer;
    QString     m_oPublisher;
    QString     m_oVolumnID;
    QString     m_oCopyright;
    QString     m_oTemporaryPth;
    QString     m_oBrowsePath;
    QStringList m_oSpeed;
    QList<int>  m_oSpeeds;
    QString     m_SBurnFormat;
    QList<QString>  m_oBurnFormat;
private:
    Ui::BusnessSetting *ui;
signals:
    void ensureBtnStateChanged(bool);
    void cancelBtnStateChanged(bool);
    void title(QString);
};

#endif // BUSNESSSETTING_H
