Implement #3983 - Add page to the wizard with links to buy morrowind

pull/3061/head
tess 3 years ago committed by psi29a
parent 50c57fc9ce
commit 6f7e8d9f59

@ -197,6 +197,7 @@ Programmers
Sylvain Thesnieres (Garvek)
t6
terrorfisch
Tess (tescoShoppah)
thegriglat
Thomas Luppi (Digmaster)
tlmullis

@ -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

@ -1,6 +1,9 @@
#include "methodselectionpage.hpp"
#include "mainwizard.hpp"
#include <QUrl>
#include <QDesktopServices>
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"));
}

@ -17,6 +17,9 @@ namespace Wizard
int nextId() const override;
private slots:
void handleBuyButton();
private:
MainWizard *mWizard;

@ -147,6 +147,83 @@
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Don't have a copy?</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="buyGameLayout">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Maximum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="buyIconLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/icons/tango/48x48/dollar.png&quot;/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QCommandLinkButton" name="buyLinkButton">
<property name="text">
<string>Buy the game</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

@ -4,6 +4,7 @@
<file alias="index.theme">icons/tango/index.theme</file>
<file alias="48x48/folder.png">icons/tango/48x48/folder.png</file>
<file alias="48x48/system-installer.png">icons/tango/48x48/system-installer.png</file>
<file alias="48x48/dollar.png">icons/tango/48x48/dollar.png</file>
</qresource>
<qresource prefix="images">
<file alias="intropage-background.png">images/intropage-background.png</file>

Loading…
Cancel
Save