Back to index

scribus-ng  1.3.4.dfsg+svn20071115
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.h>
00011 #include <qhttp.h>
00012 #include <qobject.h>
00013 #include <qstring.h>
00014 #include <qstringlist.h>
00015 
00016 class QWidget;
00017 
00021 class UpgradeChecker : public QObject
00022 {
00023        Q_OBJECT
00024        
00025 public:
00026        UpgradeChecker();
00027        ~UpgradeChecker();
00028        
00029        bool fetch();
00030        bool process(QFile& dataFile);
00031        void show(bool error);
00032        QStringList upgradeData();
00033        
00034 public slots:
00035        void fileStarted(bool error);
00036        void fileFinished(bool error);
00037        void reqStarted(int id);
00038        void reqFinished(int id, bool error);
00039        
00040 protected:
00041        void init();
00042        virtual void outputText(QString text);
00043        bool writeToConsole;
00044        QString version;
00045        QString stability;
00046        uint major, minor, revision1, revision2;
00047        bool isCVS;
00048        QString platform;
00049        QStringList updates;
00050        QString tempFile;
00051        bool fin;
00052        QHttp* getter;
00053        int getterID;
00054        bool retrieveError;
00055        QString message;
00056 };
00057 
00058 class UpgradeCheckerGUI : public UpgradeChecker
00059 {
00060        Q_OBJECT
00061        
00062 public:
00063        UpgradeCheckerGUI(QWidget *widget=0);
00064        ~UpgradeCheckerGUI();
00065        
00066 protected:
00067        virtual void outputText(QString text);
00068        QWidget *outputWidget;
00069 };
00070 
00071 
00072 #endif