mirror of
https://github.com/ioquake/launch.git
synced 2024-11-10 06:31:39 +00:00
Added installation type page to the install wizard. Doesn't do anything yet.
This commit is contained in:
parent
dc4563dd6a
commit
558d673ef0
6 changed files with 98 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "installwizard.h"
|
||||
#include "ui_installwizard.h"
|
||||
#include "installwizard_installtype.h"
|
||||
#include "installwizard_locatepage.h"
|
||||
#include "settings.h"
|
||||
|
||||
|
@ -9,6 +10,7 @@ InstallWizard::InstallWizard(QWidget *parent, Settings *settings) :
|
|||
settings(settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setPage(Page_InstallType, new InstallWizard_InstallType(this));
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
setPage(Page_Locate, new InstallWizard_LocatePage(this, settings));
|
||||
|
|
|
@ -19,6 +19,7 @@ public:
|
|||
|
||||
enum
|
||||
{
|
||||
Page_InstallType,
|
||||
Page_Locate
|
||||
};
|
||||
|
||||
|
|
19
installwizard_installtype.cpp
Normal file
19
installwizard_installtype.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "installwizard_installtype.h"
|
||||
#include "ui_installwizard_installtype.h"
|
||||
|
||||
InstallWizard_InstallType::InstallWizard_InstallType(QWidget *parent) :
|
||||
QWizardPage(parent),
|
||||
ui(new Ui::InstallWizard_InstallType)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#ifndef Q_OS_WIN32
|
||||
ui->rbLocate->setEnabled(false);
|
||||
ui->rbCD->setChecked(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
InstallWizard_InstallType::~InstallWizard_InstallType()
|
||||
{
|
||||
delete ui;
|
||||
}
|
22
installwizard_installtype.h
Normal file
22
installwizard_installtype.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
#ifndef INSTALLWIZARD_INSTALLTYPE_H
|
||||
#define INSTALLWIZARD_INSTALLTYPE_H
|
||||
|
||||
#include <QWizardPage>
|
||||
|
||||
namespace Ui {
|
||||
class InstallWizard_InstallType;
|
||||
}
|
||||
|
||||
class InstallWizard_InstallType : public QWizardPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InstallWizard_InstallType(QWidget *parent = 0);
|
||||
~InstallWizard_InstallType();
|
||||
|
||||
private:
|
||||
Ui::InstallWizard_InstallType *ui;
|
||||
};
|
||||
|
||||
#endif // INSTALLWIZARD_INSTALLTYPE_H
|
48
installwizard_installtype.ui
Normal file
48
installwizard_installtype.ui
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>InstallWizard_InstallType</class>
|
||||
<widget class="QWizardPage" name="InstallWizard_InstallType">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>WizardPage</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Select the installation type</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbLocate">
|
||||
<property name="text">
|
||||
<string>Locate an existing Quake 3: Arena installation</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbCD">
|
||||
<property name="text">
|
||||
<string>Install from CD</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbSteam">
|
||||
<property name="text">
|
||||
<string>Install from Steam</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -16,16 +16,19 @@ SOURCES += main.cpp\
|
|||
mainwindow.cpp \
|
||||
settings.cpp \
|
||||
installwizard.cpp \
|
||||
installwizard_locatepage.cpp
|
||||
installwizard_locatepage.cpp \
|
||||
installwizard_installtype.cpp
|
||||
|
||||
HEADERS += mainwindow.h \
|
||||
settings.h \
|
||||
installwizard.h \
|
||||
installwizard_locatepage.h
|
||||
installwizard_locatepage.h \
|
||||
installwizard_installtype.h
|
||||
|
||||
FORMS += mainwindow.ui \
|
||||
installwizard.ui \
|
||||
installwizard_locatepage.ui
|
||||
installwizard_locatepage.ui \
|
||||
installwizard_installtype.ui
|
||||
|
||||
OTHER_FILES += \
|
||||
README.md \
|
||||
|
|
Loading…
Reference in a new issue