![]()  | 
  
    RabbitCommon v2.3.4
    
   | 
 
Updater. More...
#include <FrmUpdater.h>
 Classes | |
| struct | CONFIG_FILE | 
| struct | CONFIG_INFO | 
| struct | CONFIG_REDIRECT | 
| struct | CONFIG_VERSION | 
Signals | |
| void | sigError () | 
| void | sigFinished () | 
| void | sigDownLoadRedire () | 
Public Member Functions | |
| CFrmUpdater (QVector< QUrl > urls=QVector< QUrl >(), QWidget *parent=nullptr) | |
| CFrmUpdater.   | |
| int | SetVersion (const QString &szVersion) | 
| int | SetTitle (QImage icon=QImage(), const QString &szTitle=QString()) | 
| SetTitle.   | |
| Q_DECL_DEPRECATED int | GenerateUpdateXml () | 
| Update XML file used only to generate programs.   | |
| Q_DECL_DEPRECATED int | GenerateUpdateXml (QCommandLineParser &parser) | 
| int | GenerateUpdateJson () | 
| Generate update json configure file.   | |
| int | GenerateUpdateJson (QCommandLineParser &parser) | 
| Generate update json configure file.   | |
| int | SetInstallAutoStartup (bool bAutoStart=true) | 
| Set install and automation startup.   | |
| int | SetUpdateCallback (pUpdateCallback pCb) | 
| SetUpdateCallback.   | |
Protected Slots | |
| void | slotDownloadError (int nErr, const QString szError) | 
| void | slotDownloadFileFinished (const QString szFile) | 
| void | slotDownloadProgress (qint64 bytesReceived, qint64 bytesTotal) | 
| void | slotButtonClickd (int id) | 
| void | slotCheck () | 
| void | slotDownloadFile () | 
| virtual void | slotCheckConfigFile () | 
| void | slotDownloadSetupFile () | 
| void | slotUpdate () | 
| void | slotStateFinished () | 
| void | on_pbOK_clicked () | 
| void | on_pbClose_clicked () | 
| void | slotShowWindow (QSystemTrayIcon::ActivationReason reason) | 
Protected Member Functions | |
| virtual void | showEvent (QShowEvent *event) override | 
Private Types | |
| enum class | CONFIG_TYPE { VERSION , FILE , VERSION_FILE } | 
Private Slots | |
| void | on_cbPrompt_clicked (bool checked) | 
| void | on_cbHomePage_clicked (bool checked) | 
Private Member Functions | |
| CFrmUpdater (QWidget *parent) | |
| int | CompareVersion (const QString &newVersion, const QString ¤tVersion) | 
| CFrmUpdater::CompareVersion.   | |
| int | InitStateMachine () | 
| Initialization state machine.   | |
| bool | IsDownLoad () | 
| Check file is exist.   | |
| int | CheckRedirectConfigFile () | 
| 检查重定向配置文件   | |
| int | CheckUpdateConfigFile () | 
| 检查更新配置文件   | |
| bool | CheckPrompt (const QString &szVersion) | 
| QString | InstallScript (const QString szDownLoadFile, const QString szApplicationName) | 
| Q_INVOKABLE int | Execute (const QString szFile) | 
| int | GetRedirectFromFile (const QString &szFile, QVector< CONFIG_REDIRECT > &conf) | 
| Get redirect configure from file.   | |
| int | GetConfigFromFile (const QString &szFile, CONFIG_INFO &conf) | 
| json 格式:   | |
| int | GetConfigFromCommandLine (QCommandLineParser &parser, QString &szFile, CONFIG_INFO &info, CONFIG_TYPE &type) | 
| Get configure from command-line.   | |
| int | GenerateUpdateXmlFile (const QString &szFile, const CONFIG_INFO &info, CONFIG_TYPE &type) | 
| int | GenerateJsonFile (const QString &szFile, const CONFIG_INFO &info, CONFIG_TYPE type) | 
| Generate Json File.   | |
Private Attributes | |
| Ui::CFrmUpdater * | ui | 
| bool | m_InstallAutoStartupType | 
| QSystemTrayIcon | m_TrayIcon | 
| QButtonGroup | m_ButtonGroup | 
| QString | m_szCurrentVersion | 
| QFile | m_DownloadFile | 
| bool | m_bDownload | 
| QVector< QUrl > | m_Urls | 
| QSharedPointer< RabbitCommon::CDownload > | m_Download | 
| QStateMachine * | m_StateMachine | 
| QState * | m_pStateDownloadSetupFile | 
| struct CFrmUpdater::CONFIG_INFO | m_Info | 
| CONFIG_FILE | m_ConfigFile | 
| pUpdateCallback | m_pcbUpdate | 
Updater.
Definition at line 76 of file FrmUpdater.h.
      
  | 
  strongprivate | 
Definition at line 190 of file FrmUpdater.h.
      
  | 
  explicit | 
| urls | 重定向配置文件或下载配置文件的下载地址 | 
| parent | 
Definition at line 113 of file FrmUpdater.cpp.
      
  | 
  overridevirtual | 
Definition at line 135 of file FrmUpdater.cpp.
      
  | 
  private | 
Definition at line 1761 of file FrmUpdater.cpp.
      
  | 
  private | 
检查重定向配置文件
重定向配置文件格式:
json format: 
Definition at line 445 of file FrmUpdater.cpp.
      
  | 
  private | 
检查更新配置文件
旧的 xml 格式:
Definition at line 585 of file FrmUpdater.cpp.
      
  | 
  private | 
| newVersion | |
| currentVersion | 
Definition at line 1218 of file FrmUpdater.cpp.
      
  | 
  private | 
Definition at line 994 of file FrmUpdater.cpp.
      
  | 
  private | 
Generate Json File.
| szFile | |
| info | |
| type | 
Definition at line 1363 of file FrmUpdater.cpp.
| int CFrmUpdater::GenerateUpdateJson | ( | ) | 
Generate update json configure file.
Definition at line 1336 of file FrmUpdater.cpp.
| int CFrmUpdater::GenerateUpdateJson | ( | QCommandLineParser & | parser | ) | 
Generate update json configure file.
| parser | QCommandLineParser | 
Definition at line 1344 of file FrmUpdater.cpp.
| int CFrmUpdater::GenerateUpdateXml | ( | ) | 
Update XML file used only to generate programs.
Definition at line 1521 of file FrmUpdater.cpp.
| int CFrmUpdater::GenerateUpdateXml | ( | QCommandLineParser & | parser | ) | 
Definition at line 1529 of file FrmUpdater.cpp.
      
  | 
  private | 
Definition at line 1423 of file FrmUpdater.cpp.
      
  | 
  private | 
Get configure from command-line.
| parser | |
| szFile | |
| info | |
| type | 
Definition at line 1549 of file FrmUpdater.cpp.
      
  | 
  private | 
json 格式:
| os | architecture | platform | 
|---|---|---|
| windows | "i386",x86_64,arm64 | mingw,cygwin | 
| linux | x86,x86_64 | |
| android | armv7, arm64_v8a, x86,x86_64 | |
| macos | x86,x86_64 | 
Definition at line 819 of file FrmUpdater.cpp.
      
  | 
  private | 
Get redirect configure from file.
| szFile | File name | 
| conf | Redirect configure | 
Definition at line 699 of file FrmUpdater.cpp.
      
  | 
  private | 
Initialization state machine.
Definition at line 197 of file FrmUpdater.cpp.
      
  | 
  private | 
Definition at line 1170 of file FrmUpdater.cpp.
      
  | 
  private | 
      
  | 
  privateslot | 
Definition at line 1782 of file FrmUpdater.cpp.
      
  | 
  privateslot | 
Definition at line 1775 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 1315 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 1305 of file FrmUpdater.cpp.
| int CFrmUpdater::SetInstallAutoStartup | ( | bool | bAutoStart = true | ) | 
Set install and automation startup.
| bAutoStart | 
Definition at line 1789 of file FrmUpdater.cpp.
| int CFrmUpdater::SetTitle | ( | QImage | icon = QImage(),  | 
        
| const QString & | szTitle = QString()  | 
        ||
| ) | 
SetTitle.
| icon | |
| szTitle | default is qApp->applicationDisplayName() | 
Definition at line 254 of file FrmUpdater.cpp.
| int CFrmUpdater::SetUpdateCallback | ( | pUpdateCallback | pCb | ) | 
| int CFrmUpdater::SetVersion | ( | const QString & | szVersion | ) | 
Definition at line 268 of file FrmUpdater.cpp.
      
  | 
  overrideprotectedvirtual | 
Definition at line 1743 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 1330 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 283 of file FrmUpdater.cpp.
      
  | 
  protectedvirtualslot | 
Definition at line 409 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 311 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 387 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 324 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 364 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 892 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 1750 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 276 of file FrmUpdater.cpp.
      
  | 
  protectedslot | 
Definition at line 906 of file FrmUpdater.cpp.
      
  | 
  private | 
Definition at line 181 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 176 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 226 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 184 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 180 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 172 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 241 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 188 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 187 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 178 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 174 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 182 of file FrmUpdater.h.
      
  | 
  private | 
Definition at line 171 of file FrmUpdater.h.