cachewebpage.h 673 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef CACHEWEBPAGE_H
  2. #define CACHEWEBPAGE_H
  3. #include <QtCore>
  4. #include <QThread>
  5. #include "SNCCore_global.h"
  6. class SNCCORESHARED_EXPORT CacheWebPage : public QThread
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit CacheWebPage(QString pageUrl,QString cachePath,QObject *parent = 0);
  11. void abort();
  12. ~CacheWebPage();
  13. signals:
  14. public slots:
  15. protected:
  16. void run();
  17. private:
  18. QString createLocalDirByUrl(QString pageUrl);
  19. void downloadPage();
  20. QStringList getMatchElementFromPage(QString souceText);
  21. void createPageCachePath();
  22. private:
  23. QString pageUrl;
  24. QString cachePath;
  25. bool stop;
  26. };
  27. #endif // CACHEWEBPAGE_H