#ifndef UPDATEDLG_H #define UPDATEDLG_H #include #include "ui_updatedlg.h" #include #include #include "qnetworkreply.h" class UpdateDlg : public QDialog { Q_OBJECT public: UpdateDlg(QString strContent, QString strVersion, QString url,bool force_update, QDialog *parent = 0); ~UpdateDlg(); public slots: void hideMe(); void closeMe(); void jumpMe(); void cancleMe(); void updateMe(); void on_uploadButton_clicked(); void on_downloadButton_clicked(); void readContent(); void replyFinished(QNetworkReply*); void loadError(QNetworkReply::NetworkError); void loadProgress(qint64 bytesSent, qint64 bytesTotal); private: QNetworkReply *reply; //QProgressBar *progressBar; QFile *file; QString m_url; QString m_newVersion; bool m_ishaveExc; private: Ui::UpdateDlg ui; }; #endif // UPDATEDLG_H