summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 22:19:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-03-04 22:19:02 -0600
commiteae5c18992184d0ef4efd8766ee95e26100a53f6 (patch)
tree8d211e5804f7d5303028c51239bfea80a1eee476
parentdb560f0781fef867eb5fa39913b81ddc29ea7d72 (diff)
downloadhorizon-qt5-eae5c18992184d0ef4efd8766ee95e26100a53f6.tar.gz
horizon-qt5-eae5c18992184d0ef4efd8766ee95e26100a53f6.tar.bz2
horizon-qt5-eae5c18992184d0ef4efd8766ee95e26100a53f6.tar.xz
horizon-qt5-eae5c18992184d0ef4efd8766ee95e26100a53f6.zip
Add UI sketch for Wi-Fi page
-rw-r--r--horizon-qt5.pro6
-rw-r--r--horizonwizard.cc2
-rw-r--r--netsimplewifipage.cc63
-rw-r--r--netsimplewifipage.hh20
4 files changed, 89 insertions, 2 deletions
diff --git a/horizon-qt5.pro b/horizon-qt5.pro
index 7b30ca7..98ca621 100644
--- a/horizon-qt5.pro
+++ b/horizon-qt5.pro
@@ -12,7 +12,8 @@ SOURCES += main.cc \
networkingpage.cc \
horizonwizardpage.cc \
softwarepage.cc \
- horizonhelpwindow.cc
+ horizonhelpwindow.cc \
+ netsimplewifipage.cc
HEADERS += \
horizonwizard.hh \
@@ -20,7 +21,8 @@ HEADERS += \
networkingpage.hh \
horizonwizardpage.hh \
softwarepage.hh \
- horizonhelpwindow.hh
+ horizonhelpwindow.hh \
+ netsimplewifipage.hh
RESOURCES += \
horizon.qrc
diff --git a/horizonwizard.cc b/horizonwizard.cc
index 7ab4899..cf9a5aa 100644
--- a/horizonwizard.cc
+++ b/horizonwizard.cc
@@ -11,6 +11,7 @@
using Horizon::NetworkInterface;
#endif
#include "networkingpage.hh"
+#include "netsimplewifipage.hh"
#include "softwarepage.hh"
using std::map;
@@ -44,6 +45,7 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent)
setPage(Page_Welcome, new WelcomePage);
setPage(Page_Networking, new NetworkingPage);
+ setPage(Page_Network_SimpleWireless, new NetworkSimpleWirelessPage);
setPage(Page_Software, new SoftwarePage);
QObject::connect(this, (void (QWizard:: *)(void))&QWizard::helpRequested,
diff --git a/netsimplewifipage.cc b/netsimplewifipage.cc
new file mode 100644
index 0000000..0ca5ee6
--- /dev/null
+++ b/netsimplewifipage.cc
@@ -0,0 +1,63 @@
+#include "netsimplewifipage.hh"
+
+#include <QHBoxLayout>
+#include <QLabel>
+#include <QVBoxLayout>
+
+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);
+
+ 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);
+}
diff --git a/netsimplewifipage.hh b/netsimplewifipage.hh
new file mode 100644
index 0000000..23a6664
--- /dev/null
+++ b/netsimplewifipage.hh
@@ -0,0 +1,20 @@
+#ifndef NETWORKSIMPLEWIRELESSPAGE_HH
+#define NETWORKSIMPLEWIRELESSPAGE_HH
+
+#include "horizonwizardpage.hh"
+
+#include <QComboBox>
+#include <QLineEdit>
+#include <QListView>
+
+class NetworkSimpleWirelessPage : public HorizonWizardPage
+{
+public:
+ NetworkSimpleWirelessPage(QWidget *parent = 0);
+private:
+ QComboBox *securityType;
+ QLineEdit *ssidName, *passphrase;
+ QListView *ssidListView;
+};
+
+#endif // NETWORKSIMPLEWIRELESSPAGE_HH