forked from teamnwah/openmw-tes3coop
Added all the pages to the wizard
This commit is contained in:
parent
f458f0c6c1
commit
8162f8370b
24 changed files with 324 additions and 82 deletions
|
@ -1,14 +1,29 @@
|
|||
set(WIZARD
|
||||
componentselectionpage.cpp
|
||||
conclusionpage.cpp
|
||||
existinginstallationpage.cpp
|
||||
importpage.cpp
|
||||
installationpage.cpp
|
||||
installationtargetpage.cpp
|
||||
intropage.cpp
|
||||
main.cpp
|
||||
wizard.cpp
|
||||
|
||||
mainwizard.cpp
|
||||
methodselectionpage.cpp
|
||||
)
|
||||
# if(NOT WIN32)
|
||||
# LIST(APPEND WIZARD unshieldthread.cpp)
|
||||
# endif(NOT WIN32)
|
||||
|
||||
set(WIZARD_HEADER
|
||||
wizard.hpp
|
||||
componentselectionpage.hpp
|
||||
conclusionpage.hpp
|
||||
existinginstallationpage.hpp
|
||||
importpage.hpp
|
||||
installationpage.hpp
|
||||
installationtargetpage.hpp
|
||||
intropage.hpp
|
||||
mainwizard.hpp
|
||||
methodselectionpage.hpp
|
||||
)
|
||||
# if(NOT WIN32)
|
||||
# LIST(APPEND WIZARD_HEADER unshieldthread.hpp)
|
||||
|
@ -17,7 +32,15 @@ set(WIZARD_HEADER
|
|||
|
||||
# Headers that must be pre-processed
|
||||
set(WIZARD_HEADER_MOC
|
||||
wizard.hpp
|
||||
componentselectionpage.hpp
|
||||
conclusionpage.hpp
|
||||
existinginstallationpage.hpp
|
||||
importpage.hpp
|
||||
installationpage.hpp
|
||||
installationtargetpage.hpp
|
||||
intropage.hpp
|
||||
mainwizard.hpp
|
||||
methodselectionpage.hpp
|
||||
)
|
||||
|
||||
# if(NOT WIN32)
|
||||
|
@ -28,7 +51,6 @@ set(WIZARD_HEADER_MOC
|
|||
set(WIZARD_UI
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/componentselectionpage.ui
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/conclusionpage.ui
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/configurationpage.ui
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/existinginstallationpage.ui
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/importpage.ui
|
||||
${CMAKE_SOURCE_DIR}/files/ui/wizard/installationpage.ui
|
||||
|
|
7
apps/wizard/componentselectionpage.cpp
Normal file
7
apps/wizard/componentselectionpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "componentselectionpage.hpp"
|
||||
|
||||
Wizard::ComponentSelectionPage::ComponentSelectionPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/componentselectionpage.hpp
Normal file
21
apps/wizard/componentselectionpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef COMPONENTSELECTIONPAGE_HPP
|
||||
#define COMPONENTSELECTIONPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_componentselectionpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class ComponentSelectionPage : public QWizardPage, private Ui::ComponentSelectionPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ComponentSelectionPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // COMPONENTSELECTIONPAGE_HPP
|
7
apps/wizard/conclusionpage.cpp
Normal file
7
apps/wizard/conclusionpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "conclusionpage.hpp"
|
||||
|
||||
Wizard::ConclusionPage::ConclusionPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/conclusionpage.hpp
Normal file
21
apps/wizard/conclusionpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef CONCLUSIONPAGE_HPP
|
||||
#define CONCLUSIONPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_conclusionpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class ConclusionPage : public QWizardPage, private Ui::ConclusionPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConclusionPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // CONCLUSIONPAGE_HPP
|
7
apps/wizard/existinginstallationpage.cpp
Normal file
7
apps/wizard/existinginstallationpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "existinginstallationpage.hpp"
|
||||
|
||||
Wizard::ExistingInstallationPage::ExistingInstallationPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/existinginstallationpage.hpp
Normal file
21
apps/wizard/existinginstallationpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef EXISTINGINSTALLATIONPAGE_HPP
|
||||
#define EXISTINGINSTALLATIONPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_existinginstallationpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class ExistingInstallationPage : public QWizardPage, private Ui::ExistingInstallationPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ExistingInstallationPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // EXISTINGINSTALLATIONPAGE_HPP
|
7
apps/wizard/importpage.cpp
Normal file
7
apps/wizard/importpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "importpage.hpp"
|
||||
|
||||
Wizard::ImportPage::ImportPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/importpage.hpp
Normal file
21
apps/wizard/importpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef IMPORTPAGE_HPP
|
||||
#define IMPORTPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_importpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class ImportPage : public QWizardPage, private Ui::ImportPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ImportPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // IMPORTPAGE_HPP
|
7
apps/wizard/installationpage.cpp
Normal file
7
apps/wizard/installationpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "installationpage.hpp"
|
||||
|
||||
Wizard::InstallationPage::InstallationPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/installationpage.hpp
Normal file
21
apps/wizard/installationpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef INSTALLATIONPAGE_HPP
|
||||
#define INSTALLATIONPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_installationpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class InstallationPage : public QWizardPage, private Ui::InstallationPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstallationPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // INSTALLATIONPAGE_HPP
|
7
apps/wizard/installationtargetpage.cpp
Normal file
7
apps/wizard/installationtargetpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "installationtargetpage.hpp"
|
||||
|
||||
Wizard::InstallationTargetPage::InstallationTargetPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/installationtargetpage.hpp
Normal file
21
apps/wizard/installationtargetpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef INSTALLATIONTARGETPAGE_HPP
|
||||
#define INSTALLATIONTARGETPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_installationtargetpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class InstallationTargetPage : public QWizardPage, private Ui::InstallationTargetPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
InstallationTargetPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // INSTALLATIONTARGETPAGE_HPP
|
7
apps/wizard/intropage.cpp
Normal file
7
apps/wizard/intropage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "intropage.hpp"
|
||||
|
||||
Wizard::IntroPage::IntroPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/intropage.hpp
Normal file
21
apps/wizard/intropage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef INTROPAGE_HPP
|
||||
#define INTROPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_intropage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class IntroPage : public QWizardPage, private Ui::IntroPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IntroPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // INTROPAGE_HPP
|
|
@ -3,6 +3,8 @@
|
|||
#include <QDir>
|
||||
#include <QDebug>
|
||||
|
||||
#include "mainwizard.hpp"
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
#undef MAC_OS_X_VERSION_MIN_REQUIRED
|
||||
// We need to do this because of Qt: https://bugreports.qt-project.org/browse/QTBUG-22154
|
||||
|
@ -39,13 +41,8 @@ int main(int argc, char *argv[])
|
|||
// Support non-latin characters
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
|
||||
// Launcher::MainDialog mainWin;
|
||||
|
||||
// if (mainWin.setup()) {
|
||||
// mainWin.show();
|
||||
// } else {
|
||||
// return 0;
|
||||
// }
|
||||
Wizard::MainWizard wizard;
|
||||
|
||||
wizard.show();
|
||||
return app.exec();
|
||||
}
|
||||
|
|
36
apps/wizard/mainwizard.cpp
Normal file
36
apps/wizard/mainwizard.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
#include "mainwizard.hpp"
|
||||
#include "intropage.hpp"
|
||||
#include "methodselectionpage.hpp"
|
||||
#include "existinginstallationpage.hpp"
|
||||
#include "installationtargetpage.hpp"
|
||||
#include "componentselectionpage.hpp"
|
||||
#include "installationpage.hpp"
|
||||
#include "importpage.hpp"
|
||||
#include "conclusionpage.hpp"
|
||||
|
||||
Wizard::MainWizard::MainWizard(QWidget *parent) :
|
||||
QWizard(parent)
|
||||
{
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
setWizardStyle(QWizard::ModernStyle);
|
||||
#else
|
||||
setWizardStyle(QWizard::ClassicStyle);
|
||||
#endif
|
||||
|
||||
setWindowTitle(tr("OpenMW Wizard"));
|
||||
setupPages();
|
||||
}
|
||||
|
||||
void Wizard::MainWizard::setupPages()
|
||||
{
|
||||
setPage(Page_Intro, new IntroPage);
|
||||
setPage(Page_MethodSelection, new MethodSelectionPage);
|
||||
setPage(Page_ExistingInstallation, new ExistingInstallationPage);
|
||||
setPage(Page_InstallationTarget, new InstallationTargetPage);
|
||||
setPage(Page_ComponentSelection, new ComponentSelectionPage);
|
||||
setPage(Page_Installation, new InstallationPage);
|
||||
setPage(Page_Import, new ImportPage);
|
||||
setPage(Page_Conclusion, new ConclusionPage);
|
||||
setStartId(Page_Intro);
|
||||
}
|
33
apps/wizard/mainwizard.hpp
Normal file
33
apps/wizard/mainwizard.hpp
Normal file
|
@ -0,0 +1,33 @@
|
|||
#ifndef MAINWIZARD_HPP
|
||||
#define MAINWIZARD_HPP
|
||||
|
||||
#include <QWizard>
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class MainWizard : public QWizard
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum {
|
||||
Page_Intro,
|
||||
Page_MethodSelection,
|
||||
Page_ExistingInstallation,
|
||||
Page_InstallationTarget,
|
||||
Page_ComponentSelection,
|
||||
Page_Installation,
|
||||
Page_Import,
|
||||
Page_Conclusion
|
||||
};
|
||||
|
||||
MainWizard(QWidget *parent = 0);
|
||||
|
||||
private:
|
||||
void setupPages();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // MAINWIZARD_HPP
|
7
apps/wizard/methodselectionpage.cpp
Normal file
7
apps/wizard/methodselectionpage.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "methodselectionpage.hpp"
|
||||
|
||||
Wizard::MethodSelectionPage::MethodSelectionPage(QWidget *parent) :
|
||||
QWizardPage(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
21
apps/wizard/methodselectionpage.hpp
Normal file
21
apps/wizard/methodselectionpage.hpp
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef METHODSELECTIONPAGE_HPP
|
||||
#define METHODSELECTIONPAGE_HPP
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
#include "ui_methodselectionpage.h"
|
||||
|
||||
namespace Wizard
|
||||
{
|
||||
|
||||
class MethodSelectionPage : public QWizardPage, private Ui::MethodSelectionPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MethodSelectionPage(QWidget *parent = 0);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // METHODSELECTIONPAGE_HPP
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>WizardPage</class>
|
||||
<widget class="QWizardPage" name="WizardPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>440</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p>OpenMW needs to import settings from the Morrowind configuration file in order to function properly. Select the steps you want to be taken and click Next when you are ready to continue.</p><p><span style=" font-weight:600;">Note:</span> it is possible to import settings later, by re-running this Wizard.</p><p/></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox_2">
|
||||
<property name="text">
|
||||
<string>Import settings from Morrowind.ini</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="text">
|
||||
<string>Import selected add-ons (creates a new Cotent List in the launcher)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -53,16 +53,6 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="explanationLabel">
|
||||
<property name="text">
|
||||
<string>Click Next to continue. If you would like to select a different location, click Browse. </string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue