From 36cb1aad5c7822ca8b0f28c2efc8162588cc7449 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 4 Mar 2017 19:59:40 -0600 Subject: Add reference to Horizon Core lib, and add iface list member --- horizon-qt5.pro | 4 ++++ horizonwizard.cc | 9 ++++++++- horizonwizard.hh | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/horizon-qt5.pro b/horizon-qt5.pro index 19d0731..7b30ca7 100644 --- a/horizon-qt5.pro +++ b/horizon-qt5.pro @@ -24,3 +24,7 @@ HEADERS += \ RESOURCES += \ horizon.qrc + +unix: CONFIG += link_pkgconfig +unix: PKG_CONFIG = PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkgconf +unix: PKGCONFIG += horizon-core diff --git a/horizonwizard.cc b/horizonwizard.cc index 7c123ea..7ab4899 100644 --- a/horizonwizard.cc +++ b/horizonwizard.cc @@ -6,6 +6,10 @@ #include #include "welcomepage.hh" +#ifndef NOT_NATIVE +# include +using Horizon::NetworkInterface; +#endif #include "networkingpage.hh" #include "softwarepage.hh" @@ -52,5 +56,8 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) help.exec(); }); - selected.insert("adelie-base"); + this->selected.insert("adelie-base"); +#ifndef NOT_NATIVE + this->interfaces = NetworkInterface::list_available_ifs(); +#endif } diff --git a/horizonwizard.hh b/horizonwizard.hh index ca7cc03..403da0e 100644 --- a/horizonwizard.hh +++ b/horizonwizard.hh @@ -4,13 +4,15 @@ #include #include #include +#include + +#include class HorizonWizard : public QWizard { public: enum { Page_Welcome, /* introduction */ Page_Partition, /* partitioning */ - Page_NetworkDetect, /* detect interfaces/carriers */ Page_Networking, /* network type selection */ Page_Network_SimpleWireless, /* simple -> wifi */ Page_Network_SimpleWired, /* simple -> wired */ @@ -26,6 +28,7 @@ public: HorizonWizard(QWidget *parent = 0); std::set selected; + std::vector interfaces; }; #endif // HORIZONWIZARD_HH -- cgit v1.2.3-70-g09d2