summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-08 02:38:58 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-08 02:38:58 -0600
commit386ff62ca3aba790f9831ee7c194d24f6fb781fe (patch)
tree9bb4233e965f3fe71224fd0a5983c1e631787ae4
parent561db34595bd4181fde3781d3a00bab9a6d1403f (diff)
downloadhorizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.gz
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.bz2
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.tar.xz
horizon-386ff62ca3aba790f9831ee7c194d24f6fb781fe.zip
UI: Import some of the 2016 prototype - welcome to Qt UI development
-rw-r--r--CMakeLists.txt4
-rw-r--r--ui/CMakeLists.txt8
-rw-r--r--ui/qt5/CMakeLists.txt19
-rw-r--r--ui/qt5/horizon.qrc16
-rw-r--r--ui/qt5/horizonhelpwindow.cc29
-rw-r--r--ui/qt5/horizonhelpwindow.hh15
-rw-r--r--ui/qt5/horizonwizard.cc79
-rw-r--r--ui/qt5/horizonwizard.hh41
-rw-r--r--ui/qt5/horizonwizardpage.cc46
-rw-r--r--ui/qt5/horizonwizardpage.hh17
-rw-r--r--ui/qt5/intropage.cc62
-rw-r--r--ui/qt5/intropage.hh12
-rw-r--r--ui/qt5/main.cc24
-rw-r--r--ui/qt5/netsimplewifipage.cc71
-rw-r--r--ui/qt5/netsimplewifipage.hh22
-rw-r--r--ui/qt5/networkingpage.cc74
-rw-r--r--ui/qt5/networkingpage.hh20
-rw-r--r--ui/qt5/resources/intro-help.txt17
-rw-r--r--ui/qt5/resources/intro-high.pngbin0 -> 335538 bytes
-rw-r--r--ui/qt5/resources/intro-low.pngbin0 -> 102763 bytes
-rw-r--r--ui/qt5/resources/network-high.pngbin0 -> 311676 bytes
-rw-r--r--ui/qt5/resources/network-low.pngbin0 -> 98234 bytes
-rw-r--r--ui/qt5/resources/network-start-help.txt11
-rw-r--r--ui/qt5/resources/packages-simple-help.txt19
-rw-r--r--ui/qt5/resources/partition-help.txt5
-rw-r--r--ui/qt5/resources/software-high.pngbin0 -> 287010 bytes
-rw-r--r--ui/qt5/resources/software-low.pngbin0 -> 95747 bytes
27 files changed, 611 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ec75ca..bc07267 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ endif()
option(BUILD_TOOLS "Enable building of tools (Validator, Simulator, etc)" ON)
+option(BUILD_UI "Enable user interface" ON)
## Code Coverage stuff ##
@@ -82,6 +83,9 @@ add_subdirectory(owner)
IF(BUILD_TOOLS)
add_subdirectory(tools)
ENDIF(BUILD_TOOLS)
+IF(BUILD_UI)
+ add_subdirectory(ui)
+ENDIF(BUILD_UI)
IF(INSTALL)
add_subdirectory(fetch)
ENDIF(INSTALL)
diff --git a/ui/CMakeLists.txt b/ui/CMakeLists.txt
new file mode 100644
index 0000000..597de26
--- /dev/null
+++ b/ui/CMakeLists.txt
@@ -0,0 +1,8 @@
+find_package(Qt5 COMPONENTS Widgets)
+
+IF(Qt5_FOUND)
+ option(BUILD_QT "Build the Qt 5 user interface" ON)
+ IF(BUILD_QT)
+ add_subdirectory(qt5)
+ ENDIF(BUILD_QT)
+ENDIF(Qt5_FOUND)
diff --git a/ui/qt5/CMakeLists.txt b/ui/qt5/CMakeLists.txt
new file mode 100644
index 0000000..5620cf7
--- /dev/null
+++ b/ui/qt5/CMakeLists.txt
@@ -0,0 +1,19 @@
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+
+set(UI_SOURCES
+ horizonwizard.cc
+ horizonwizardpage.cc
+ horizonhelpwindow.cc
+ main.cc
+
+ intropage.cc
+ networkingpage.cc
+
+ horizon.qrc)
+add_executable(horizon-qt5 ${UI_SOURCES})
+target_link_libraries(horizon-qt5 Qt5::Widgets)
+
+IF(INSTALL)
+ # add_executable(horizon-run-qt5 ${RUN_QT_SOURCES})
+ENDIF(INSTALL)
diff --git a/ui/qt5/horizon.qrc b/ui/qt5/horizon.qrc
new file mode 100644
index 0000000..a683dc3
--- /dev/null
+++ b/ui/qt5/horizon.qrc
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/wizard_pixmaps">
+ <file>resources/intro-high.png</file>
+ <file>resources/intro-low.png</file>
+ <file>resources/network-low.png</file>
+ <file>resources/network-high.png</file>
+ <file>resources/software-high.png</file>
+ <file>resources/software-low.png</file>
+ </qresource>
+ <qresource prefix="/wizard_help">
+ <file>resources/intro-help.txt</file>
+ <file>resources/partition-help.txt</file>
+ <file>resources/network-start-help.txt</file>
+ <file>resources/packages-simple-help.txt</file>
+ </qresource>
+</RCC>
diff --git a/ui/qt5/horizonhelpwindow.cc b/ui/qt5/horizonhelpwindow.cc
new file mode 100644
index 0000000..e38fefa
--- /dev/null
+++ b/ui/qt5/horizonhelpwindow.cc
@@ -0,0 +1,29 @@
+#include "horizonhelpwindow.hh"
+
+#include <QDialogButtonBox>
+#include <QTextEdit>
+#include <QVBoxLayout>
+
+HorizonHelpWindow::HorizonHelpWindow(QFile *helpFile, QWidget *parent) :
+ QDialog(parent), helpFile(helpFile) {
+ QDialogButtonBox *buttonBox;
+ QTextEdit *helpText;
+ QVBoxLayout *layout;
+
+ setFixedSize(QSize(600, 400));
+ setSizeGripEnabled(false);
+ setWindowTitle("Horizon Help");
+
+ helpText = new QTextEdit(this);
+ helpText->setReadOnly(true);
+ helpText->setHtml(helpFile->readAll().toStdString().c_str());
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
+ connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
+
+ layout = new QVBoxLayout();
+ layout->addWidget(helpText);
+ layout->addWidget(buttonBox);
+
+ setLayout(layout);
+}
diff --git a/ui/qt5/horizonhelpwindow.hh b/ui/qt5/horizonhelpwindow.hh
new file mode 100644
index 0000000..7604861
--- /dev/null
+++ b/ui/qt5/horizonhelpwindow.hh
@@ -0,0 +1,15 @@
+#ifndef HORIZONHELPWINDOW_HH
+#define HORIZONHELPWINDOW_HH
+
+#include <QDialog>
+#include <QFile>
+
+class HorizonHelpWindow : public QDialog {
+ Q_OBJECT
+public:
+ explicit HorizonHelpWindow(QFile *helpFile, QWidget *parent = 0);
+private:
+ QFile *helpFile;
+};
+
+#endif // HORIZONHELPWINDOW_HH
diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc
new file mode 100644
index 0000000..72b4239
--- /dev/null
+++ b/ui/qt5/horizonwizard.cc
@@ -0,0 +1,79 @@
+#include "horizonwizard.hh"
+#include "horizonhelpwindow.hh"
+
+#include <QDebug>
+#include <QFile>
+#include <QMessageBox>
+#include <map>
+#include <string>
+
+#include "intropage.hh"
+#include "networkingpage.hh"
+#include "netsimplewifipage.hh"
+
+using std::map;
+using std::string;
+
+static map<int, string> help_id_map = {
+ {HorizonWizard::Page_Intro, "intro"},
+ {HorizonWizard::Page_Input, "input"},
+ {HorizonWizard::Page_Partition, "partition"},
+#ifdef NON_LIBRE_FIRMWARE
+ {HorizonWizard::Page_Firmware, "firmware"},
+#endif /* NON_LIBRE_FIRMWARE */
+ {HorizonWizard::Page_Network, "network-start"},
+ {HorizonWizard::Page_Network_Iface, "network-iface"},
+ {HorizonWizard::Page_Network_Wireless, "network-wifi"},
+ {HorizonWizard::Page_Network_DHCP, "none"},
+ {HorizonWizard::Page_Network_Portal, "network-portal"},
+ {HorizonWizard::Page_Network_Manual, "network-manual"},
+ {HorizonWizard::Page_DateTime, "datetime"},
+ {HorizonWizard::Page_Hostname, "hostname"},
+ {HorizonWizard::Page_PkgSimple, "packages-simple"},
+ {HorizonWizard::Page_PkgCustom, "packages-custom"},
+ {HorizonWizard::Page_Boot, "startup"},
+ {HorizonWizard::Page_Root, "rootpw"},
+ {HorizonWizard::Page_Accounts, "accounts"},
+#ifndef HAS_INSTALL_ENV
+ {HorizonWizard::Page_Write, "writeout"},
+#else /* HAS_INSTALL_ENV */
+ {HorizonWizard::Page_Commit, "commit"}
+#endif /* !HAS_INSTALL_ENV */
+};
+
+HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) {
+ setWindowTitle(tr("Adélie Linux System Installation"));
+
+ setFixedSize(QSize(650, 450));
+
+ setOption(DisabledBackButtonOnLastPage);
+ setOption(HaveHelpButton);
+ setOption(NoCancelButton);
+
+ setSizeGripEnabled(false);
+
+ setPage(Page_Intro, new IntroPage);
+ setPage(Page_Network, new NetworkingPage);
+
+ QObject::connect(this, static_cast<void (QWizard:: *)(void)>(&QWizard::helpRequested),
+ [=](void) {
+ if(help_id_map.find(currentId()) == help_id_map.end()) {
+ qDebug() << "no help available for " << currentId();
+ QMessageBox nohelp(QMessageBox::Warning,
+ tr("No Help Available"),
+ tr("Help is not available for the current page."
+ " Consult the Installation Guide for more "
+ "information."),
+ QMessageBox::Ok,
+ this);
+ nohelp.exec();
+ return;
+ }
+ string helppath = ":/wizard_help/resources/" +
+ help_id_map.at(currentId()) + "-help.txt";
+ QFile helpfile(helppath.c_str());
+ helpfile.open(QFile::ReadOnly);
+ HorizonHelpWindow help(&helpfile, this);
+ help.exec();
+ });
+}
diff --git a/ui/qt5/horizonwizard.hh b/ui/qt5/horizonwizard.hh
new file mode 100644
index 0000000..c47fb49
--- /dev/null
+++ b/ui/qt5/horizonwizard.hh
@@ -0,0 +1,41 @@
+#ifndef HORIZONWIZARD_HH
+#define HORIZONWIZARD_HH
+
+#include <QWizard>
+#include <string>
+
+class HorizonWizard : public QWizard {
+public:
+ enum {
+ Page_Intro, /* introduction */
+ Page_Input, /* keyboard layout */
+ Page_Partition, /* partitioning */
+#ifdef NON_LIBRE_FIRMWARE
+ Page_Firmware, /* firmware */
+#endif /* NON_LIBRE_FIRMWARE */
+ Page_Network, /* network type selection (DHCP/static) */
+ Page_Network_Iface, /* network interface selection */
+ Page_Network_Wireless, /* wireless */
+ Page_Network_DHCP, /* interstitial for DHCP */
+ Page_Network_Portal, /* shown if captive portal is detected */
+ Page_Network_Manual, /* static addressing */
+ Page_DateTime, /* date and time, TZ, NTP */
+ Page_Hostname, /* hostname */
+ Page_PkgSimple, /* simple package selection */
+ Page_PkgCustom, /* custom package selection */
+ Page_Boot, /* boot loader configuration */
+ Page_Root, /* root passphrase */
+ Page_Accounts, /* user account configuration */
+#ifndef HAS_INSTALL_ENV
+ Page_Write, /* write HorizonScript to disk */
+#else /* HAS_INSTALL_ENV */
+ Page_Commit /* begin install */
+#endif /* !HAS_INSTALL_ENV */
+ };
+
+ HorizonWizard(QWidget *parent = nullptr);
+ /* collected information stored here */
+ std::string keymap;
+};
+
+#endif /* !HORIZONWIZARD_HH */
diff --git a/ui/qt5/horizonwizardpage.cc b/ui/qt5/horizonwizardpage.cc
new file mode 100644
index 0000000..fd02270
--- /dev/null
+++ b/ui/qt5/horizonwizardpage.cc
@@ -0,0 +1,46 @@
+#include "horizonwizardpage.hh"
+
+using std::string;
+
+void HorizonWizardPage::loadWatermark(string page) {
+ QPixmap pixmap;
+ qreal pixelRatio = 0;
+ string path = ":/wizard_pixmaps/resources/";
+ path += page;
+ path += "-";
+
+ if(window()->devicePixelRatioF() == 2.0) {
+ path += "high";
+ pixelRatio = 2.0;
+ } else if(window()->devicePixelRatioF() == 1.0) {
+ path += "low";
+ pixelRatio = 1.0;
+ } else {
+ path += "high";
+ }
+
+ path += ".png";
+
+ pixmap = QPixmap(path.c_str());
+
+ // Handle cases where ratio is not exactly 1.0 or 2.0
+ // Wizard machinary automatically uses FastTransformation, which is
+ // ugly as sin.
+ if(pixelRatio > 1.0) {
+ qreal width = 232 * window()->devicePixelRatioF();
+ qreal height = 380 * window()->devicePixelRatioF();
+ QSize newSize = QSize(width, height);
+
+ pixmap = pixmap.scaled(newSize, Qt::KeepAspectRatio,
+ Qt::SmoothTransformation);
+ pixmap.setDevicePixelRatio(window()->devicePixelRatioF());
+ } else {
+ pixmap.setDevicePixelRatio(pixelRatio);
+ }
+
+ setPixmap(QWizard::WatermarkPixmap, pixmap);
+}
+
+HorizonWizard *HorizonWizardPage::horizonWizard() const {
+ return dynamic_cast<HorizonWizard *>(this->wizard());
+}
diff --git a/ui/qt5/horizonwizardpage.hh b/ui/qt5/horizonwizardpage.hh
new file mode 100644
index 0000000..c9807c3
--- /dev/null
+++ b/ui/qt5/horizonwizardpage.hh
@@ -0,0 +1,17 @@
+#ifndef HORIZONWIZARDPAGE_HH
+#define HORIZONWIZARDPAGE_HH
+
+#include <QWizardPage>
+#include <string>
+
+#include "horizonwizard.hh"
+
+class HorizonWizardPage : public QWizardPage {
+public:
+ HorizonWizardPage(QWidget *parent = 0) : QWizardPage(parent) {}
+
+ void loadWatermark(std::string page);
+ HorizonWizard *horizonWizard() const;
+};
+
+#endif // HORIZONWIZARDPAGE_HH
diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc
new file mode 100644
index 0000000..b67b534
--- /dev/null
+++ b/ui/qt5/intropage.cc
@@ -0,0 +1,62 @@
+#include "intropage.hh"
+
+#include <QLabel>
+#include <QVBoxLayout>
+
+IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) {
+ QLabel *descLabel;
+ QVBoxLayout *layout;
+
+ loadWatermark("intro");
+ setTitle(tr("Welcome to Adélie Linux"));
+
+#ifndef HAS_INSTALL_ENV
+ descLabel = new QLabel(
+ tr("<p>"
+ "Horizon will guide you through creation of a basic "
+ "<code>installfile</code> "
+ "for installing Adélie Linux on another computer."
+ "<p>"
+ "<b>IMPORTANT:</b> Not all advanced settings will "
+ "be available to you. You may be allowed to "
+ "specify an invalid or non-bootable disk layout or "
+ "network configuration. For best results, always "
+ "run System Installation directly on the computer "
+ "you wish to run Adélie Linux."
+ "<p>"
+ "For more information about the "
+ "<code>installfile</code> "
+ "format and syntax, see the "
+ "<a href='https://help.adelielinux.org/html/install/'>"
+ "Adélie Linux Installation Guide</a> on the "
+ "Internet."));
+ descLabel->setOpenExternalLinks(true);
+ descLabel->setTextFormat(Qt::RichText);
+#else
+ descLabel = new QLabel(
+ tr("The streamlined installation process for Adélie "
+ "Linux will only take about 10-15 minutes of your "
+ "time. After you're done, your computer will be "
+ "running the reliable, secure, libre Adélie Linux "
+ "operating system.\n\n"
+
+ "When you're ready to answer a few questions, get "
+ "started by choosing Next. If you'd like more "
+ "information about the installation procedure, "
+ "choose Help at any time.\n\n"
+
+ "If you are unable to use a mouse, you may press "
+ "the Tab key to cycle between the available buttons."
+ " The currently selected button will be highlighted. "
+ "Press the Return key to make your selection."));
+#endif
+ descLabel->setWordWrap(true);
+
+ layout = new QVBoxLayout;
+ layout->addWidget(descLabel);
+ setLayout(layout);
+}
+
+int IntroPage::nextId() const {
+ return HorizonWizard::Page_Input;
+}
diff --git a/ui/qt5/intropage.hh b/ui/qt5/intropage.hh
new file mode 100644
index 0000000..e1ed3d9
--- /dev/null
+++ b/ui/qt5/intropage.hh
@@ -0,0 +1,12 @@
+#ifndef WELCOMEPAGE_HH
+#define WELCOMEPAGE_HH
+
+#include "horizonwizardpage.hh"
+
+class IntroPage : public HorizonWizardPage {
+public:
+ IntroPage(QWidget *parent = 0);
+ int nextId() const;
+};
+
+#endif // WELCOMEPAGE_HH
diff --git a/ui/qt5/main.cc b/ui/qt5/main.cc
new file mode 100644
index 0000000..2fddc23
--- /dev/null
+++ b/ui/qt5/main.cc
@@ -0,0 +1,24 @@
+#include <QApplication>
+#include <QLibraryInfo>
+#include <QTranslator>
+
+#include "horizonwizard.hh"
+
+int main(int argc, char *argv[]) {
+ QApplication app(argc, argv);
+
+ QString translatorFileName = QLatin1String("qt_");
+ translatorFileName += QLocale::system().name();
+ QTranslator *translator = new QTranslator(&app);
+ if(translator->load(translatorFileName,
+ QLibraryInfo::location(
+ QLibraryInfo::TranslationsPath
+ ))) {
+ app.installTranslator(translator);
+ }
+
+ HorizonWizard wizard;
+ wizard.show();
+
+ return app.exec();
+}
diff --git a/ui/qt5/netsimplewifipage.cc b/ui/qt5/netsimplewifipage.cc
new file mode 100644
index 0000000..4ce6eb4
--- /dev/null
+++ b/ui/qt5/netsimplewifipage.cc
@@ -0,0 +1,71 @@
+#include "netsimplewifipage.hh"
+
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QVBoxLayout>
+
+#include <horizon/wirelesscontroller.hh>
+
+NetworkSimpleWirelessPage::NetworkSimpleWirelessPage(QWidget *parent)
+ : HorizonWizardPage(parent)
+{
+ QHBoxLayout *securityLayout;
+ QVBoxLayout *layout;
+ QLabel *descLabel, *securityTypeLabel, *statusLabel;
+
+ loadWatermark("network");
+ setTitle(tr("Wireless Networking Setup"));
+
+ descLabel = new QLabel(tr(
+ "A supported Wi-Fi device has been found in this "
+ "computer. If you connect to the Internet using "
+ "Wi-Fi, select your Access Point below.\n\n"
+
+ "If you don't want to use Wi-Fi, select \"Use Wired "
+ "Connection\" to continue using a wired connection."));
+ descLabel->setWordWrap(true);
+
+ statusLabel = new QLabel(tr("Scanning for networks..."));
+
+ ssidListView = new QListView;
+
+ ssidName = new QLineEdit(this);
+ ssidName->setPlaceholderText(tr("Network Name"));
+ ssidName->hide();
+
+ securityTypeLabel = new QLabel(tr("Security type"));
+
+ securityType = new QComboBox(this);
+ securityType->addItems({tr("None"), tr("WPA2 Personal"),
+ tr("WPA2 Enterprise"), tr("WPA Personal"),
+ tr("WPA Enterprise"), tr("WEP")});
+ securityType->setEnabled(false);
+ securityType->hide();
+
+ passphrase = new QLineEdit(this);
+ passphrase->setEchoMode(QLineEdit::Password);
+ passphrase->setPlaceholderText(tr("Passphrase"));
+ passphrase->hide();
+
+ securityLayout = new QHBoxLayout;
+ securityLayout->addWidget(securityTypeLabel);
+ securityLayout->addWidget(securityType);
+
+ layout = new QVBoxLayout;
+ layout->addWidget(descLabel);
+ layout->addWidget(statusLabel, 0, Qt::AlignCenter);
+ layout->addSpacing(10);
+ layout->addWidget(ssidListView, 0, Qt::AlignCenter);
+ layout->addSpacing(10);
+ layout->addWidget(ssidName);
+ layout->addSpacing(10);
+ layout->addLayout(securityLayout);
+ layout->addSpacing(10);
+ layout->addWidget(passphrase);
+ setLayout(layout);
+}
+
+void NetworkSimpleWirelessPage::initializePage()
+{
+ Horizon::WirelessController::wirelessController()->performScan();
+}
diff --git a/ui/qt5/netsimplewifipage.hh b/ui/qt5/netsimplewifipage.hh
new file mode 100644
index 0000000..3ba3e6a
--- /dev/null
+++ b/ui/qt5/netsimplewifipage.hh
@@ -0,0 +1,22 @@
+#ifndef NETWORKSIMPLEWIRELESSPAGE_HH
+#define NETWORKSIMPLEWIRELESSPAGE_HH
+
+#include "horizonwizardpage.hh"
+
+#include <QComboBox>
+#include <QLineEdit>
+#include <QListView>
+
+class NetworkSimpleWirelessPage : public HorizonWizardPage
+{
+public:
+ NetworkSimpleWirelessPage(QWidget *parent = 0);
+
+ void initializePage();
+private:
+ QComboBox *securityType;
+ QLineEdit *ssidName, *passphrase;
+ QListView *ssidListView;
+};
+
+#endif // NETWORKSIMPLEWIRELESSPAGE_HH
diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc
new file mode 100644
index 0000000..140e9af
--- /dev/null
+++ b/ui/qt5/networkingpage.cc
@@ -0,0 +1,74 @@
+#include "networkingpage.hh"
+#include "horizonwizard.hh"
+
+#include <cstdint>
+#include <QLabel>
+#include <QVBoxLayout>
+
+NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent)
+{
+ QLabel *descLabel;
+ QVBoxLayout *layout;
+
+ loadWatermark("network");
+ setTitle(tr("Networking Setup"));
+
+ descLabel = new QLabel(tr(
+ "If you have a typical network connection where your computer is "
+ "directly connected to the Internet via Ethernet or Wi-Fi using a "
+ "modem or router, choose Automatic. If you need to set a static IP "
+ "address, or you use a VPN or proxy server, choose Manual.\n\n"
+
+ "If you don't want to configure networking or you don't want to use "
+ "this computer on the Internet, choose Skip."));
+ descLabel->setWordWrap(true);
+
+ simple = new QRadioButton(tr("&Automatic - my computer connects to the Internet directly\n"
+ "or via a modem/router."));
+ advanced = new QRadioButton(tr("&Manual - my computer connects to an enterprise network,\n"
+ "or I use a static IP address, VPN, or 802.1X."));
+ skip = new QRadioButton(tr("&Skip - I don't want to connect to a network or the Internet."));
+
+ radioGroup = new QButtonGroup(this);
+ radioGroup->addButton(simple);
+ radioGroup->addButton(advanced);
+ radioGroup->addButton(skip);
+
+ QObject::connect(radioGroup, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked),
+ [=](QAbstractButton *button __attribute__((unused))) {
+ emit completeChanged();
+ });
+
+ layout = new QVBoxLayout;
+ layout->addWidget(descLabel);
+ layout->addSpacing(50);
+ layout->addWidget(simple);
+ layout->addWidget(advanced);
+ layout->addWidget(skip);
+ setLayout(layout);
+}
+
+bool NetworkingPage::isComplete() const
+{
+ return (radioGroup->checkedButton() != nullptr);
+}
+
+int NetworkingPage::nextId() const
+{
+ if(radioGroup->checkedButton() == simple) {
+ /* determine wifi */
+ if(false) {
+ return HorizonWizard::Page_Network_Wireless;
+ } else {
+ if(false) {
+ return HorizonWizard::Page_Network_Iface;
+ } else {
+ return HorizonWizard::Page_Network_DHCP;
+ }
+ }
+ } else if(radioGroup->checkedButton() == advanced) {
+ return HorizonWizard::Page_Network_Manual;
+ } else {
+ return HorizonWizard::Page_DateTime;
+ }
+}
diff --git a/ui/qt5/networkingpage.hh b/ui/qt5/networkingpage.hh
new file mode 100644
index 0000000..3353fb6
--- /dev/null
+++ b/ui/qt5/networkingpage.hh
@@ -0,0 +1,20 @@
+#ifndef NETWORKINGPAGE_HH
+#define NETWORKINGPAGE_HH
+
+#include "horizonwizardpage.hh"
+
+#include <QButtonGroup>
+#include <QRadioButton>
+
+class NetworkingPage : public HorizonWizardPage {
+public:
+ NetworkingPage(QWidget *parent = 0);
+
+ bool isComplete() const;
+ int nextId() const;
+private:
+ QButtonGroup *radioGroup;
+ QRadioButton *simple, *advanced, *skip;
+};
+
+#endif // NETWORKINGPAGE_HH
diff --git a/ui/qt5/resources/intro-help.txt b/ui/qt5/resources/intro-help.txt
new file mode 100644
index 0000000..01a9caa
--- /dev/null
+++ b/ui/qt5/resources/intro-help.txt
@@ -0,0 +1,17 @@
+<h2>Welcome to Adélie Linux!</h2>
+
+<p>This is the <b>Horizon Installation System</b>, which will guide you through the process of installing the Adélie Linux operating system to your computer.</p>
+
+<p>Each step of the installation system has a help screen just like this one, accessible via the 'Help' button in the lower left corner of the screen. If you need more information about an option provided, simply open the Help screen.</p>
+
+
+<hr>
+
+
+<h2>Preparing for the installation</h2>
+
+<p>Please back up all of your data before beginning installation. While every effort is made to ensure that the Adélie Linux installation routines are safe and error-free, we cannot guarantee that your data will be preserved once you start the installation. If you intend on dual-booting your computer with another operating system, such as Mac OS X or Windows, ensure there is adequate disk space available to install Adélie Linux. You will need up to 1 GB for a standard desktop installation, or at least 300 MB for a server installation.</p>
+
+<p>If you plan on connecting to the Internet directly from your Adélie Linux computer without using a router (not common), ensure you have your Internet access credentials (typically a username and password) available before starting installation. Adélie Linux supports connecting to most ADSL and dial-up Internet providers using PPP; and cable, T1, and fibre providers using Ethernet. If you use a static IP address (not common), make sure you have your IP address, subnet, and default gateway and nameserver settings before starting installation.</p>
+
+<p>If your computer came with recovery media, we recommend that you have it available in the very unlikely event you have an issue with Adélie Linux, or your hardware has an incompatibility. This way, you will be able to quickly restore your computer to normal operation.</p>
diff --git a/ui/qt5/resources/intro-high.png b/ui/qt5/resources/intro-high.png
new file mode 100644
index 0000000..a6fe926
--- /dev/null
+++ b/ui/qt5/resources/intro-high.png
Binary files differ
diff --git a/ui/qt5/resources/intro-low.png b/ui/qt5/resources/intro-low.png
new file mode 100644
index 0000000..af74e88
--- /dev/null
+++ b/ui/qt5/resources/intro-low.png
Binary files differ
diff --git a/ui/qt5/resources/network-high.png b/ui/qt5/resources/network-high.png
new file mode 100644
index 0000000..77ef906
--- /dev/null
+++ b/ui/qt5/resources/network-high.png
Binary files differ
diff --git a/ui/qt5/resources/network-low.png b/ui/qt5/resources/network-low.png
new file mode 100644
index 0000000..f8535f3
--- /dev/null
+++ b/ui/qt5/resources/network-low.png
Binary files differ
diff --git a/ui/qt5/resources/network-start-help.txt b/ui/qt5/resources/network-start-help.txt
new file mode 100644
index 0000000..872f606
--- /dev/null
+++ b/ui/qt5/resources/network-start-help.txt
@@ -0,0 +1,11 @@
+<h2>Network Configuration</h2>
+
+<p>This phase of Horizon allows you to configure your network or Internet connection.</p>
+
+<h3>Which option should I choose?</h3>
+
+<ul>
+<li><strong>Most home and small business users will choose Simple.</strong> This will configure your computer to connect to the Internet using Wi-Fi or an Ethernet cable. The Wi-Fi or Ethernet cable must be connected to a switch, router, or modem that allows your computer to configure itself for access the Internet over a standard called DHCP. Almost all modems and routers support this standard. For Wi-Fi connections, you will be able to specify your access point name (SSID) and password, if necessary.<br></li>
+<li>Some users will need to choose Advanced. <strong>You will need to choose Advanced if you use a VPN to connect to the Internet, you use a proxy server, you need to authenticate to your network using 802.1X, or have a static IP address issued by your network administrator or ISP</strong> (uncommon). Horizon will allow you to specify the settings you require to connect to your network and/or the Internet.<br></li>
+<li>If you do not wish to connect to a network or the Internet, you may choose Skip. Note that you will only be able to choose Skip if you have the full installation media for your platform, and some software collections may be unavailable.</li>
+</ul>
diff --git a/ui/qt5/resources/packages-simple-help.txt b/ui/qt5/resources/packages-simple-help.txt
new file mode 100644
index 0000000..762aff5
--- /dev/null
+++ b/ui/qt5/resources/packages-simple-help.txt
@@ -0,0 +1,19 @@
+<h2>Select Software</h2>
+
+<p>This phase of Horizon allows you to choose the software you want to run on your computer.</p>
+
+<h3>Which option should I choose?</h3>
+
+<ul>
+<li><strong>Most users should choose Desktop Software.</strong> This option will install software for everday computing: a Web browser, an email client, a media player, a word processor, and more. You will have the option to add and remove software from the Software Centre once Adélie Linux is installed.<br></li>
+<li>Server Software will allow you to choose "roles" that your computer will perform on a network. <strong>This option will run server software on your computer that may be accessible from the public Internet.</strong> Choose this option only if you are sure you want to run server software on your computer.<br></li>
+<li>If you want to have more control over the packages that are installed on your computer, you may select <strong>Advanced</strong>. This option will allow you to select software to install from a list of packages.</li>
+</ul>
+
+<h3>Which desktop should I choose?</h3>
+
+<ul>
+<li>Adélie Linux strongly recommends that you use the <strong>KDE Plasma 5 desktop</strong>. It is approachable for people new to Linux or computing, and has many ways to customise your experience should you so desire. Please note, however, that some older computers with less than 512 MB RAM may be unable to use KDE Plasma 5. In that case, you may wish to use a different desktop.<br></li>
+<li>If your computer is older or has less than 512 MB RAM, we recommend the <strong>LXQt desktop</strong>.<br></li>
+<li>If you are already familiar with the <strong>XFCE 4</strong> or <strong>OpenBox</strong> environments from other Linux or Unix environments, you may choose either of those options.<br></li>
+</ul>
diff --git a/ui/qt5/resources/partition-help.txt b/ui/qt5/resources/partition-help.txt
new file mode 100644
index 0000000..0f0bf19
--- /dev/null
+++ b/ui/qt5/resources/partition-help.txt
@@ -0,0 +1,5 @@
+<h2>Partitioning the Hard Disk Drive</h2>
+
+Please help the user partition the disk drive here.
+
+Do not ship this content.
diff --git a/ui/qt5/resources/software-high.png b/ui/qt5/resources/software-high.png
new file mode 100644
index 0000000..b58ddf9
--- /dev/null
+++ b/ui/qt5/resources/software-high.png
Binary files differ
diff --git a/ui/qt5/resources/software-low.png b/ui/qt5/resources/software-low.png
new file mode 100644
index 0000000..72ff89d
--- /dev/null
+++ b/ui/qt5/resources/software-low.png
Binary files differ