home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / upgradechecker.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-10-20  |  1.6 KB  |  81 lines

  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 <QObject>
  12. #include <QString>
  13. #include <QStringList>
  14. class QHttp;
  15. class QHttpResponseHeader;
  16.  
  17. class ScTextBrowser;
  18.  
  19. /**
  20.     @author Craig Bradney <cbradney@zip.com.au>
  21. */
  22. class UpgradeChecker : public QObject
  23. {
  24.     Q_OBJECT
  25.     
  26. public:
  27.     UpgradeChecker();
  28.     ~UpgradeChecker();
  29.     
  30.     void fetch();
  31.     bool process();
  32.     void show(bool error);
  33.     QStringList upgradeData();
  34.     
  35. public slots:
  36.     void abort();
  37.     
  38. private slots:
  39.     void requestFinished(int requestId, bool error);
  40.     void responseHeaderReceived(const QHttpResponseHeader &responseHeader);
  41.     void done(bool);
  42.     
  43. protected:
  44.     void init();
  45.     virtual void outputText(QString text, bool noLineFeed=false);
  46.     void reportError(const QString& s);
  47.     bool writeToConsole;
  48.     QString version;
  49.     QString stability;
  50.     uint major, minor, revision1, revision2;
  51.     bool isCVS;
  52.     QString platform;
  53.     QStringList updates;
  54.     QString tempFile;
  55.     bool fin;
  56.     QHttp* getter;
  57.     int getterID;
  58.     QString message;
  59.     int httpGetId;
  60.     bool httpRequestAborted;
  61.     QFile *rcvdFile;
  62.     bool errorReported;
  63.     bool userAbort;
  64. };
  65.  
  66. class UpgradeCheckerGUI : public UpgradeChecker
  67. {
  68.     Q_OBJECT
  69.     
  70. public:
  71.     UpgradeCheckerGUI(ScTextBrowser *tb=0);
  72.     ~UpgradeCheckerGUI();
  73.     
  74. protected:
  75.     virtual void outputText(QString text, bool noLineFeed=false);
  76.     ScTextBrowser *outputWidget;
  77. };
  78.  
  79.  
  80. #endif
  81.