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 00000000..220f0207 Binary files /dev/null and b/src/gui/res/image/spinning-wheel.gif differ 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);