#ifndef DIALOGPROGRESS_H
#define DIALOGPROGRESS_H

#include <QDialog>

#include <QTimer>

namespace Ui {
class DialogProgress;
}

class DialogProgress : public QDialog
{
    Q_OBJECT

public:
    explicit DialogProgress(QWidget *parent = 0);
    ~DialogProgress();

    virtual void reject();


    void ChangeProgress(int nProgress);

    void Init(int nType=0);

    virtual int exec();

    void DisplayInfo(int nValue);

    void DisplayInfo(QString strInfo);

    void DisplayInfo(int nValue, int nTotal);

    void SendComplete();

    void SetTypeMakeDICOM();
    void SetTypeSendDICOM();

    virtual void keyReleaseEvent(QKeyEvent *event);


    bool IsError();

    void SetAutoRetryDICOMSend(bool bSet);




protected:
    bool m_bAutoRetryDICOMSend;
    bool m_bError;
    int m_nDICOMProgressType;
    QTimer m_TimerDisplay;
    int m_nCount;
    int m_nType;

    int m_nSendCount;
    int m_nSendTotal;
    QString m_strSendInfo;
    bool m_bSendComplete;

    QString m_strErrorInfo;

public slots:
    void OnWorklistComplete();

    void OnWorklistError();

    void OnTimerCalled();

private slots:
    void on_pushButton_Cancel_clicked();

    void on_pushButton_Send_clicked();

private:
    Ui::DialogProgress *ui;
};

#endif // DIALOGPROGRESS_H
