From a8087a7c1b83ae7770f2b1c278d0eb5318b7e33e Mon Sep 17 00:00:00 2001 From: Niklas Date: Wed, 28 Sep 2011 17:44:42 +0200 Subject: added a select field to the manual conf gui. also fixed some bugs in the ip4_manualConf function --- LogReceiver/ndgui.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'LogReceiver/ndgui.h') diff --git a/LogReceiver/ndgui.h b/LogReceiver/ndgui.h index c41cecd..f841cc9 100644 --- a/LogReceiver/ndgui.h +++ b/LogReceiver/ndgui.h @@ -3,10 +3,7 @@ #include #include -#include -#include -#include -#include +#include #include "networkdiscovery.h" @@ -14,10 +11,13 @@ class ndgui: public QMainWindow { Q_OBJECT +Q_PROPERTY(QString manualConfInterfaces READ manualConfInterfaces WRITE setManualConfInterfaces) public: ndgui(QMainWindow *parent = 0); ~ndgui(); + Q_INVOKABLE QVariantList getManualConfInterfaces(); + Q_INVOKABLE int ip4_setManualConfiguration(QVariantMap result); public slots: void handleConnectionEstablished(QString ifName); @@ -39,8 +39,14 @@ public slots: void updateIfStatus(const QString &ifName, const QString &status); void updateStatus(const QString &status); void updateIfProgressBar(const QString &ifName, const int& percent); - void notifyCall(); + void notifyCall(QString msg); + // property functions + void setManualConfInterfaces(QString jsonArray) { + _manualConfInterfaces = jsonArray; + } + QString manualConfInterfaces() const + {return _manualConfInterfaces;} private: @@ -52,6 +58,10 @@ private: QList _ifNameList; // maps interfaceName to its gateway + QList _manConfList; + + QString _manualConfInterfaces; + }; -- cgit v1.2.3-55-g7522