updatedlg.h 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef UPDATEDLG_H
  2. #define UPDATEDLG_H
  3. #include <QWidget>
  4. #include "ui_updatedlg.h"
  5. #include <QDialog>
  6. #include <QFile>
  7. #include "qnetworkreply.h"
  8. class UpdateDlg : public QDialog
  9. {
  10. Q_OBJECT
  11. public:
  12. UpdateDlg(QString strContent, QString strVersion, QString url,bool force_update, QDialog *parent = 0);
  13. ~UpdateDlg();
  14. public slots:
  15. void hideMe();
  16. void closeMe();
  17. void jumpMe();
  18. void cancleMe();
  19. void updateMe();
  20. void on_uploadButton_clicked();
  21. void on_downloadButton_clicked();
  22. void readContent();
  23. void replyFinished(QNetworkReply*);
  24. void loadError(QNetworkReply::NetworkError);
  25. void loadProgress(qint64 bytesSent, qint64 bytesTotal);
  26. private:
  27. QNetworkReply *reply;
  28. //QProgressBar *progressBar;
  29. QFile *file;
  30. QString m_url;
  31. QString m_newVersion;
  32. bool m_ishaveExc;
  33. private:
  34. Ui::UpdateDlg ui;
  35. };
  36. #endif // UPDATEDLG_H