From 6f7e8d9f5905cccd550ad7c40195a192c3b9848c Mon Sep 17 00:00:00 2001 From: tess <2687892-TescoShoppah@users.noreply.gitlab.com> Date: Thu, 8 Apr 2021 20:57:50 +0000 Subject: [PATCH] Implement #3983 - Add page to the wizard with links to buy morrowind --- AUTHORS.md | 1 + CHANGELOG.md | 1 + apps/wizard/methodselectionpage.cpp | 13 +++- apps/wizard/methodselectionpage.hpp | 3 + files/ui/wizard/methodselectionpage.ui | 77 ++++++++++++++++++++++ files/wizard/icons/tango/48x48/dollar.png | Bin 0 -> 7395 bytes files/wizard/wizard.qrc | 1 + 7 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 files/wizard/icons/tango/48x48/dollar.png diff --git a/AUTHORS.md b/AUTHORS.md index d2de85747..611d6b9f6 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -197,6 +197,7 @@ Programmers Sylvain Thesnieres (Garvek) t6 terrorfisch + Tess (tescoShoppah) thegriglat Thomas Luppi (Digmaster) tlmullis diff --git a/CHANGELOG.md b/CHANGELOG.md index f8cb55d36..25bcc18e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -123,6 +123,7 @@ Feature #2404: Levelled List can not be placed into a container Feature #2686: Timestamps in openmw.log Feature #3171: OpenMW-CS: Instance drag selection + Feature #3983: Wizard: Add link to buy Morrowind Feature #4894: Consider actors as obstacles for pathfinding Feature #4899: Alpha-To-Coverage Anti-Aliasing for alpha testing Feature #4977: Use the "default icon.tga" when an item's icon is not found diff --git a/apps/wizard/methodselectionpage.cpp b/apps/wizard/methodselectionpage.cpp index e00344af9..37234468b 100644 --- a/apps/wizard/methodselectionpage.cpp +++ b/apps/wizard/methodselectionpage.cpp @@ -1,6 +1,9 @@ #include "methodselectionpage.hpp" #include "mainwizard.hpp" +#include +#include + Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) : QWizardPage(parent) { @@ -11,9 +14,12 @@ Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) : #ifndef OPENMW_USE_UNSHIELD retailDiscRadioButton->setEnabled(false); existingLocationRadioButton->setChecked(true); + buyLinkButton->released(); #endif - + registerField(QLatin1String("installation.retailDisc"), retailDiscRadioButton); + + connect(buyLinkButton, SIGNAL(released()), this, SLOT(handleBuyButton())); } int Wizard::MethodSelectionPage::nextId() const @@ -24,3 +30,8 @@ int Wizard::MethodSelectionPage::nextId() const return MainWizard::Page_ExistingInstallation; } } + +void Wizard::MethodSelectionPage::handleBuyButton() +{ + QDesktopServices::openUrl(QUrl("https://openmw.org/faq/#do_i_need_morrowind")); +} diff --git a/apps/wizard/methodselectionpage.hpp b/apps/wizard/methodselectionpage.hpp index c189ea171..57d551d27 100644 --- a/apps/wizard/methodselectionpage.hpp +++ b/apps/wizard/methodselectionpage.hpp @@ -17,6 +17,9 @@ namespace Wizard int nextId() const override; + private slots: + void handleBuyButton(); + private: MainWizard *mWizard; diff --git a/files/ui/wizard/methodselectionpage.ui b/files/ui/wizard/methodselectionpage.ui index 4d4d66bad..c2dd26052 100644 --- a/files/ui/wizard/methodselectionpage.ui +++ b/files/ui/wizard/methodselectionpage.ui @@ -147,6 +147,83 @@ + + + + Qt::Horizontal + + + + + + + + + Don't have a copy? + + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 20 + 20 + + + + + + + + + 0 + 0 + + + + <html><head/><body><p><img src=":/icons/tango/48x48/dollar.png"/></p></body></html> + + + + + + + Buy the game + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + diff --git a/files/wizard/icons/tango/48x48/dollar.png b/files/wizard/icons/tango/48x48/dollar.png new file mode 100644 index 0000000000000000000000000000000000000000..a14ba2505d1d09b17fc3572af93b15ad7de7abd4 GIT binary patch literal 7395 zcmeHKc|4SB`yXWq$;B%?bwBqLN3gY!5K|BX zfj|;?OH+H`AI`s42?M{*D}IjwfmZ#o$I*prPvn7FY$lB!Km~KdSX3}IluiSILc7LX z+%q;7ubKCetrAp|iXEQ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index.theme icons/tango/48x48/folder.png icons/tango/48x48/system-installer.png + icons/tango/48x48/dollar.png images/intropage-background.png