Scribus
Open source desktop publishing at your fingertips
upgradechecker.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef UPGRADECHECKER_H
8 #define UPGRADECHECKER_H
9 
10 #include <QFile>
11 #include <QNetworkReply>
12 #include <QObject>
13 #include <QString>
14 #include <QStringList>
15 #include <QNetworkAccessManager>
16 #include <QTextBrowser>
17 
21 class UpgradeChecker : public QObject
22 {
23  Q_OBJECT
24 
25 public:
27  ~UpgradeChecker();
28 
29  void fetch();
30  bool process();
31  void show(bool error);
32  QStringList upgradeData();
33 
34 private slots:
35  void downloadFinished();
36  void downloadReadyRead();
37 
38 protected:
39  void init();
40  virtual void outputText(QString text, bool noLineFeed=false);
41  void reportError(const QString& s);
42  bool writeToConsole;
43  QString version;
44  QString stability;
45  uint major, minor, revision1, revision2;
46  bool isCVS;
47  QString platform;
48  QStringList updates;
49  QString tempFile;
50  bool fin;
51  QNetworkAccessManager* networkManager;
52  QNetworkReply *networkReply;
53  QString message;
54  QFile *rcvdFile;
55  bool errorReported;
56 };
57 
59 {
60  Q_OBJECT
61 
62 public:
63  UpgradeCheckerGUI(QTextBrowser *tb=0);
65 
66 protected:
67  virtual void outputText(QString text, bool noLineFeed=false);
68  QTextBrowser *outputWidget;
69 };
70 
71 
72 #endif
Definition: upgradechecker.h:58
Definition: upgradechecker.h:21