summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2016-09-26 07:02:33 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2016-09-26 07:02:33 -0500
commitca8ac59c94ca6131f35c0789d65601d7a9609be8 (patch)
tree7555c37f988a7056c8c8afd0afc82dc0e098186d
downloadhorizon-qt5-ca8ac59c94ca6131f35c0789d65601d7a9609be8.tar.gz
horizon-qt5-ca8ac59c94ca6131f35c0789d65601d7a9609be8.tar.bz2
horizon-qt5-ca8ac59c94ca6131f35c0789d65601d7a9609be8.tar.xz
horizon-qt5-ca8ac59c94ca6131f35c0789d65601d7a9609be8.zip
Initial public commit
-rw-r--r--.gitignore74
-rw-r--r--horizon-qt5.pro20
-rw-r--r--horizon.qrc6
-rw-r--r--horizonwizard.cc22
-rw-r--r--horizonwizard.hh15
-rw-r--r--main.cc26
-rw-r--r--networkingpage.cc6
-rw-r--r--networkingpage.hh12
-rw-r--r--resources/welcome-high.pngbin0 -> 335538 bytes
-rw-r--r--resources/welcome-low.pngbin0 -> 102763 bytes
-rw-r--r--welcomepage.cc29
-rw-r--r--welcomepage.hh12
12 files changed, 222 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..913d667
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,74 @@
+# This file is used to ignore files which are generated
+# ----------------------------------------------------------------------------
+
+*~
+*.autosave
+*.a
+*.core
+*.moc
+*.o
+*.obj
+*.orig
+*.rej
+*.so
+*.so.*
+*_pch.h.cpp
+*_resource.rc
+*.qm
+.#*
+*.*#
+core
+!core/
+tags
+.DS_Store
+.directory
+*.debug
+Makefile*
+*.prl
+*.app
+moc_*.cpp
+ui_*.h
+qrc_*.cpp
+Thumbs.db
+*.res
+*.rc
+/.qmake.cache
+/.qmake.stash
+
+# qtcreator generated files
+*.pro.user*
+
+# xemacs temporary files
+*.flc
+
+# Vim temporary files
+.*.swp
+
+# Visual Studio generated files
+*.ib_pdb_index
+*.idb
+*.ilk
+*.pdb
+*.sln
+*.suo
+*.vcproj
+*vcproj.*.*.user
+*.ncb
+*.sdf
+*.opensdf
+*.vcxproj
+*vcxproj.*
+
+# MinGW generated files
+*.Debug
+*.Release
+
+# Python byte code
+*.pyc
+
+# Binaries
+# --------
+*.dll
+*.exe
+
+build/
diff --git a/horizon-qt5.pro b/horizon-qt5.pro
new file mode 100644
index 0000000..e1f68ba
--- /dev/null
+++ b/horizon-qt5.pro
@@ -0,0 +1,20 @@
+QT += widgets
+
+CONFIG += c++11
+
+TARGET = horizon-qt5
+
+TEMPLATE = app
+
+SOURCES += main.cc \
+ horizonwizard.cc \
+ welcomepage.cc \
+ networkingpage.cc
+
+HEADERS += \
+ horizonwizard.hh \
+ welcomepage.hh \
+ networkingpage.hh
+
+RESOURCES += \
+ horizon.qrc
diff --git a/horizon.qrc b/horizon.qrc
new file mode 100644
index 0000000..cb44beb
--- /dev/null
+++ b/horizon.qrc
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/wizard_pixmaps">
+ <file>resources/welcome-high.png</file>
+ <file>resources/welcome-low.png</file>
+ </qresource>
+</RCC>
diff --git a/horizonwizard.cc b/horizonwizard.cc
new file mode 100644
index 0000000..4e8e89a
--- /dev/null
+++ b/horizonwizard.cc
@@ -0,0 +1,22 @@
+#include "horizonwizard.hh"
+
+#include "welcomepage.hh"
+#include "networkingpage.hh"
+
+HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent)
+{
+ int scaleFactor = window()->devicePixelRatio();
+
+ setWindowTitle(tr("Adélie Linux System Installation"));
+
+ setFixedSize(QSize(600 * scaleFactor, 450 * scaleFactor));
+
+ setOption(DisabledBackButtonOnLastPage);
+ setOption(HaveHelpButton);
+ setOption(NoCancelButtonOnLastPage);
+
+ setSizeGripEnabled(false);
+
+ setPage(Page_Welcome, new WelcomePage);
+ setPage(Page_Networking, new NetworkingPage);
+}
diff --git a/horizonwizard.hh b/horizonwizard.hh
new file mode 100644
index 0000000..57cb685
--- /dev/null
+++ b/horizonwizard.hh
@@ -0,0 +1,15 @@
+#ifndef HORIZONWIZARD_HH
+#define HORIZONWIZARD_HH
+
+#include <QWizard>
+
+class HorizonWizard : public QWizard
+{
+ enum { Page_Welcome, Page_Partition, Page_Networking, Page_Software,
+ Page_AdvancedSoftware, Page_Startup, Page_Commit, Page_Save,
+ Page_Finished, Page_CustomStart };
+public:
+ HorizonWizard(QWidget *parent = 0);
+};
+
+#endif // HORIZONWIZARD_HH
diff --git a/main.cc b/main.cc
new file mode 100644
index 0000000..a7aabce
--- /dev/null
+++ b/main.cc
@@ -0,0 +1,26 @@
+#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/networkingpage.cc b/networkingpage.cc
new file mode 100644
index 0000000..9d33cc8
--- /dev/null
+++ b/networkingpage.cc
@@ -0,0 +1,6 @@
+#include "networkingpage.hh"
+
+NetworkingPage::NetworkingPage(QWidget *parent) : QWizardPage(parent)
+{
+ setTitle(tr("Network Setup"));
+}
diff --git a/networkingpage.hh b/networkingpage.hh
new file mode 100644
index 0000000..03e1210
--- /dev/null
+++ b/networkingpage.hh
@@ -0,0 +1,12 @@
+#ifndef NETWORKINGPAGE_HH
+#define NETWORKINGPAGE_HH
+
+#include <QWizardPage>
+
+class NetworkingPage : public QWizardPage
+{
+public:
+ NetworkingPage(QWidget *parent = 0);
+};
+
+#endif // NETWORKINGPAGE_HH
diff --git a/resources/welcome-high.png b/resources/welcome-high.png
new file mode 100644
index 0000000..a6fe926
--- /dev/null
+++ b/resources/welcome-high.png
Binary files differ
diff --git a/resources/welcome-low.png b/resources/welcome-low.png
new file mode 100644
index 0000000..af74e88
--- /dev/null
+++ b/resources/welcome-low.png
Binary files differ
diff --git a/welcomepage.cc b/welcomepage.cc
new file mode 100644
index 0000000..c41b7c5
--- /dev/null
+++ b/welcomepage.cc
@@ -0,0 +1,29 @@
+#include "welcomepage.hh"
+
+#include <QLabel>
+#include <QVBoxLayout>
+
+WelcomePage::WelcomePage(QWidget *parent) : QWizardPage(parent)
+{
+ QLabel *descLabel;
+
+ setTitle(tr("Welcome to Adélie Linux"));
+
+ setPixmap(QWizard::WatermarkPixmap,
+ QPixmap(":/wizard_pixmaps/resources/welcome-low.png"));
+ descLabel = new QLabel(
+ tr("This process will only take about 10-15 minutes of "
+ "your time. After you're done, your computer will "
+ "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."));
+ descLabel->setWordWrap(true);
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(descLabel);
+ setLayout(layout);
+}
diff --git a/welcomepage.hh b/welcomepage.hh
new file mode 100644
index 0000000..c9d4981
--- /dev/null
+++ b/welcomepage.hh
@@ -0,0 +1,12 @@
+#ifndef WELCOMEPAGE_HH
+#define WELCOMEPAGE_HH
+
+#include <QWizardPage>
+
+class WelcomePage : public QWizardPage
+{
+public:
+ WelcomePage(QWidget *parent = 0);
+};
+
+#endif // WELCOMEPAGE_HH