From 9fabc0bd3cb496dc77c872993ea2b54cbd2e71bf Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 21 Feb 2012 19:06:08 +0100 Subject: globals in extra class, new javascript interface classes for fbgui and ndgui, various cleanups in ndgui... --- src/fbgui/ndgui.h | 80 +++++++++++++++++-------------------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) (limited to 'src/fbgui/ndgui.h') diff --git a/src/fbgui/ndgui.h b/src/fbgui/ndgui.h index 2e214df..379479d 100644 --- a/src/fbgui/ndgui.h +++ b/src/fbgui/ndgui.h @@ -11,8 +11,6 @@ * General information about OpenSLX can be found under http://openslx.org */ - - #ifndef NDGUI_H #define NDGUI_H @@ -20,80 +18,52 @@ #include #include -#include "fbgui.h" #include "agui.h" +#include "javascriptinterfacendgui.h" #include "networkdiscovery.h" - -extern QString gServerIp; -extern bool gAutoUp; -extern QString gSocketServerPath; -extern QString gPathToDhcpExe; - -class ndgui: public agui -{ - Q_OBJECT +class ndgui: public agui { +Q_OBJECT public: - ndgui(); - ~ndgui(); - Q_INVOKABLE QVariantList getManualConfInterfaces(); - Q_INVOKABLE int ip4_setManualConfiguration(QVariantMap result); - Q_INVOKABLE QString readLogFile(); - Q_INVOKABLE QVariantMap getInterfaceConf(QString ifName); + ndgui(); + ~ndgui(); - void init(); + void init(); public slots: - void handleConnectionEstablished(QString ifName); - void abortBoot(QString msg); - void chooseInterfaceDialog(QString msg); - void handleAllProcessesFinished(); - - void continueBoot(QString ifName); - void continueBootWithoutCheck(QString ifName); - void tryAgain(); + void startNetworkDiscovery(); + void handleConnectionEstablished(QString ifName); + void handleAllProcessesFinished(); + void continueBootWithoutCheck(QString ifName); + void tryAgain(); - void startSingleShot(); - void startNetworkDiscovery(); + /* to delete once the new jsi is tested ... */ +// void addInterface(const QString &ifName); + void continueBoot(QString ifName); - /*test for html gui version*/ - void attachToDOM(); - void loadJQuery(); - void addInterface(const QString &ifName); - void updateIfStatus(const QString &ifName, const QString &status); - void updateStatus(const QString &status); - void updateIfProgressBar(const QString &ifName, const int& percent); - void notifyCall(QString msg); signals: - void initFbgui(); + void initFbgui(); private slots: - void setUserChoiceTrue(); + void setUserChoiceTrue(); private: + void addActions(); - void addActions(); - - QString _tag; - - bool _userChoice; - - bool _started; - - QAction* _allowUserChoice; - - QAction* _tryAgain; - - NetworkDiscovery* _networkDiscovery; + NetworkDiscovery* _networkDiscovery; + JavascriptInterfaceNDGUI* _jsi; - QList _ifNameList; // maps interfaceName to its gateway + QAction* _allowUserChoice; + QAction* _tryAgain; - QList _manConfList; + bool _userChoice;bool _started; - QString _manualConfInterfaces; + QList _ifNameList; // maps interfaceName to its gateway + QList _manConfList; + QString _manualConfInterfaces; }; #endif // NDGUI_H -- cgit v1.2.3-55-g7522