1 #include "conclusionpage.hpp" 2 3 #include <QDebug> 4 5 #include "mainwizard.hpp" 6 ConclusionPage(QWidget * parent)7Wizard::ConclusionPage::ConclusionPage(QWidget *parent) : 8 QWizardPage(parent) 9 { 10 mWizard = qobject_cast<MainWizard*>(parent); 11 12 setupUi(this); 13 setPixmap(QWizard::WatermarkPixmap, QPixmap(QLatin1String(":/images/intropage-background.png"))); 14 } 15 initializePage()16void Wizard::ConclusionPage::initializePage() 17 { 18 // Write the path to openmw.cfg 19 if (field(QLatin1String("installation.retailDisc")).toBool() == true) { 20 QString path(field(QLatin1String("installation.path")).toString()); 21 mWizard->addInstallation(path); 22 } 23 24 if (!mWizard->mError) 25 { 26 if ((field(QLatin1String("installation.retailDisc")).toBool() == true) 27 || (field(QLatin1String("installation.import-settings")).toBool() == true)) 28 { 29 qDebug() << "IMPORT SETTINGS"; 30 mWizard->runSettingsImporter(); 31 } 32 } 33 34 if (!mWizard->mError) 35 { 36 if (field(QLatin1String("installation.retailDisc")).toBool() == true) 37 { 38 textLabel->setText(tr("<html><head/><body><p>The OpenMW Wizard successfully installed Morrowind on your computer.</p> \ 39 <p>Click Finish to close the Wizard.</p></body></html>")); 40 } else { 41 textLabel->setText(tr("<html><head/><body><p>The OpenMW Wizard successfully modified your existing Morrowind installation.</p> \ 42 <p>Click Finish to close the Wizard.</p></body></html>")); 43 } 44 } else { 45 textLabel->setText(tr("<html><head/><body><p>The OpenMW Wizard failed to install Morrowind on your computer.</p> \ 46 <p>Please report any bugs you might have encountered to our \ 47 <a href=\"https://gitlab.com/OpenMW/openmw/issues\">bug tracker</a>.<br/>Make sure to include the installation log.</p><br/></body></html>")); 48 } 49 } 50 nextId() const51int Wizard::ConclusionPage::nextId() const 52 { 53 return -1; 54 } 55