Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

upgradechecker.h

Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef UPGRADECHECKER_H
00008 #define UPGRADECHECKER_H
00009 
00010 #include <QFile>
00011 #include <QObject>
00012 #include <QString>
00013 #include <QStringList>
00014 class QHttp;
00015 class QHttpResponseHeader;
00016 
00017 class ScTextBrowser;
00018 
00022 class UpgradeChecker : public QObject
00023 {
00024     Q_OBJECT
00025     
00026 public:
00027     UpgradeChecker();
00028     ~UpgradeChecker();
00029     
00030     void fetch();
00031     bool process();
00032     void show(bool error);
00033     QStringList upgradeData();
00034     
00035 public slots:
00036     void abort();
00037     
00038 private slots:
00039     void requestFinished(int requestId, bool error);
00040     void responseHeaderReceived(const QHttpResponseHeader &responseHeader);
00041     void done(bool);
00042     
00043 protected:
00044     void init();
00045     virtual void outputText(QString text, bool noLineFeed=false);
00046     void reportError(const QString& s);
00047     bool writeToConsole;
00048     QString version;
00049     QString stability;
00050     uint major, minor, revision1, revision2;
00051     bool isCVS;
00052     QString platform;
00053     QStringList updates;
00054     QString tempFile;
00055     bool fin;
00056     QHttp* getter;
00057     int getterID;
00058     QString message;
00059     int httpGetId;
00060     bool httpRequestAborted;
00061     QFile *rcvdFile;
00062     bool errorReported;
00063     bool userAbort;
00064 };
00065 
00066 class UpgradeCheckerGUI : public UpgradeChecker
00067 {
00068     Q_OBJECT
00069     
00070 public:
00071     UpgradeCheckerGUI(ScTextBrowser *tb=0);
00072     ~UpgradeCheckerGUI();
00073     
00074 protected:
00075     virtual void outputText(QString text, bool noLineFeed=false);
00076     ScTextBrowser *outputWidget;
00077 };
00078 
00079 
00080 #endif
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.