From 82b932b1c4b417b227483bf3208f0741a6c63f22 Mon Sep 17 00:00:00 2001 From: XinyuHou Date: Thu, 5 Feb 2015 15:52:50 +0000 Subject: [PATCH] added download plugin page in wizard #4168 --- src/gui/gui.pro | 9 +- src/gui/res/PluginWizardPageBase.ui | 137 +++++++++++++++++++++++++++ src/gui/res/Synergy.qrc | 1 + src/gui/res/image/spinning-wheel.gif | Bin 0 -> 9689 bytes src/gui/src/PluginWizardPage.cpp | 43 +++++++++ src/gui/src/PluginWizardPage.h | 26 +++++ src/gui/src/SetupWizard.cpp | 3 + src/gui/src/SetupWizard.h | 1 + 8 files changed, 217 insertions(+), 3 deletions(-) create mode 100644 src/gui/res/PluginWizardPageBase.ui create mode 100644 src/gui/res/image/spinning-wheel.gif create mode 100644 src/gui/src/PluginWizardPage.cpp create mode 100644 src/gui/src/PluginWizardPage.h diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 91352f3a..69c2f530 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -14,7 +14,8 @@ FORMS += res/MainWindowBase.ui \ res/HotkeyDialogBase.ui \ res/SettingsDialogBase.ui \ res/SetupWizardBase.ui \ - res/AddClientDialogBase.ui + res/AddClientDialogBase.ui \ + res/PluginWizardPageBase.ui SOURCES += src/main.cpp \ src/MainWindow.cpp \ src/AboutDialog.cpp \ @@ -51,7 +52,8 @@ SOURCES += src/main.cpp \ src/DataDownloader.cpp \ src/AddClientDialog.cpp \ src/CommandProcess.cpp \ - src/WebClient.cpp + src/WebClient.cpp \ + src/PluginWizardPage.cpp HEADERS += src/MainWindow.h \ src/AboutDialog.h \ src/ServerConfig.h \ @@ -89,7 +91,8 @@ HEADERS += src/MainWindow.h \ src/AddClientDialog.h \ src/CommandProcess.h \ src/WebClient.h \ - src/EditionType.h + src/EditionType.h \ + src/PluginWizardPage.h RESOURCES += res/Synergy.qrc RC_FILE = res/win/Synergy.rc macx { diff --git a/src/gui/res/PluginWizardPageBase.ui b/src/gui/res/PluginWizardPageBase.ui new file mode 100644 index 00000000..1b8f5c23 --- /dev/null +++ b/src/gui/res/PluginWizardPageBase.ui @@ -0,0 +1,137 @@ + + + PluginWizardPage + + + + 0 + 0 + 400 + 300 + + + + Setup Synergy + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + TextLabel + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Finalizing, please wait. + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + diff --git a/src/gui/res/Synergy.qrc b/src/gui/res/Synergy.qrc index 2b078107..c9054378 100644 --- a/src/gui/res/Synergy.qrc +++ b/src/gui/res/Synergy.qrc @@ -51,5 +51,6 @@ lang/gui_zh-TW.qm lang/Languages.xml icons/16x16/money.png + image/spinning-wheel.gif diff --git a/src/gui/res/image/spinning-wheel.gif b/src/gui/res/image/spinning-wheel.gif new file mode 100644 index 0000000000000000000000000000000000000000..220f0207169d354365e555b1e89ad0c1295a7914 GIT binary patch literal 9689 zcmb7~dpwi>|NpNYZF8DU+eou(PMcICN$D`hmLxjJDMrJRccBwf&CU*Kq#Rn>oRZWV z9o{9pH^h>JPKq*8q?1ae)7x)-ZtvUg@Avn=>#ysN>$>i*$MbQ2UTfC+xGsxY0jvOC z9szdk+V%0{M>{(^M@Pr#=xASGUr!H@D_5?JzkJ!;+}wTp_Js=<&Ye5=YGOjIR_EvE z0|4;m&6~8ew0ZO9b=|tvP*?Zv-Mg%;tjfwtkx0~W^XADDCmOF`cXM<5Ff~=CRPNii zuePRUY;5fHFMt7-n@D9;lqcMl9IM<+xGC` z!)H&QzI*dV`|R1%p`lW_+{fGd&E(|p(9r$+_j~W&OH2EEdtZ)?g#-snC6czbwx%05E;TgdWM{j$ zxX4RN6s4u_-@pI(;e)ZU@#oKQJv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2<83f*ID^yR5-a|MK&n@WBi)()Uo5>(_kkKl7k(NF9+ zA|s}}v-lvKiBeYJsBKmGpFedN#@Pmqf(JENdJ6#FgyOE4(rzlB$h6m}dpoAVWWE>UdLsz_&x zgXeGbZ7(;*+g>i(L-V*40hor=>mozxNDHP-^-Av)6wqyg9WN^jF~>4nx;1J99b^~= z(TeQjMnEHG28QCEC^I9uS)2f=$7Fi*Hr=yNteJr4)Y4}SNhbSV3PWrDA=^v<2cQO~ zC%X%J&jqny=X1JbSYRvP#_YfxMP0}(3`zkL2T?tP)pCcjy_bs=6~|Es`asqw^KpM6 zGV-5WrR#sJ%h4gw$#6dyD2M142$sF>TTzR2qte&@wBGk4ZP}NWx1^`;alfn7D_oeB z_Id2lET_+-r73j*Jm<((a?4-3UE0%f8Bc*XGvw?=^zLb6iv2h2jq==bIz3QLMp|=u z7AL)!9z^UD6QPYMR-xbFm|S*_a-5X zvsr^?C6b`gIyOAU;GkPmkFEl#tB>h!AmeNPVA=x*+$W8O6Trfat!z49MD}|iHXj@r&5<0 zV;BW`h*g>S@hoU+1Xi_TMS-1r0^+mz>t(CQ(86WrMN8>_7MZuUR`DjI;gGSlCOHif zo;#u_ZEwx(Io2xG_);wyC&Z&wGk52lxqJ}C{h%({ZN*`YyodcjI!vkH?{$XM?f(H9 CnP_hS literal 0 HcmV?d00001 diff --git a/src/gui/src/PluginWizardPage.cpp b/src/gui/src/PluginWizardPage.cpp new file mode 100644 index 00000000..7e29f638 --- /dev/null +++ b/src/gui/src/PluginWizardPage.cpp @@ -0,0 +1,43 @@ +#include "PluginWizardPage.h" +#include "ui_PluginWizardPageBase.h" + +#include + +PluginWizardPage::PluginWizardPage(QWidget *parent) : + QWizardPage(parent), + m_Finished(false) +{ + setupUi(this); + + QMovie *movie = new QMovie(":/res/image/spinning-wheel.gif"); + m_pLabelSpinning->setMovie(movie); + movie->start(); +} + +PluginWizardPage::~PluginWizardPage() +{ +} + +void PluginWizardPage::changeEvent(QEvent *e) +{ + QWizardPage::changeEvent(e); + switch (e->type()) { + case QEvent::LanguageChange: + retranslateUi(this); + break; + default: + break; + } +} + +bool PluginWizardPage::isComplete() const +{ + return m_Finished; +} + +void PluginWizardPage::initializePage() +{ + QWizardPage::initializePage(); + m_Finished = true; + emit completeChanged(); +} diff --git a/src/gui/src/PluginWizardPage.h b/src/gui/src/PluginWizardPage.h new file mode 100644 index 00000000..72adb013 --- /dev/null +++ b/src/gui/src/PluginWizardPage.h @@ -0,0 +1,26 @@ +#ifndef PLUGINWIZARDPAGE_H +#define PLUGINWIZARDPAGE_H + +#include "ui_PluginWizardPageBase.h" +#include + +class PluginWizardPage : public QWizardPage, public Ui::PluginWizardPage { + + Q_OBJECT + +public: + PluginWizardPage(QWidget *parent = 0); + ~PluginWizardPage(); + + void setFinished(bool b) { m_Finished = b; } + + bool isComplete() const; + void initializePage(); + +protected: + void changeEvent(QEvent *e); + +private: + bool m_Finished; +}; +#endif // PLUGINWIZARDPAGE_H diff --git a/src/gui/src/SetupWizard.cpp b/src/gui/src/SetupWizard.cpp index e3d241f2..d3bcdd33 100644 --- a/src/gui/src/SetupWizard.cpp +++ b/src/gui/src/SetupWizard.cpp @@ -21,6 +21,7 @@ #include "EditionType.h" #include "QSynergyApplication.h" #include "QUtility.h" +#include "PluginWizardPage.h" #include @@ -30,6 +31,8 @@ SetupWizard::SetupWizard(MainWindow& mainWindow, bool startMain) : m_Edition(Unknown) { setupUi(this); + m_pPluginPage = new PluginWizardPage(); + addPage(m_pPluginPage); #if defined(Q_OS_MAC) diff --git a/src/gui/src/SetupWizard.h b/src/gui/src/SetupWizard.h index 16a2630a..5f00dd4f 100644 --- a/src/gui/src/SetupWizard.h +++ b/src/gui/src/SetupWizard.h @@ -44,6 +44,7 @@ private: bool m_StartMain; SynergyLocale m_Locale; int m_Edition; + QWizardPage* m_pPluginPage; private slots: void on_m_pRadioButtonActivate_toggled(bool checked);