ndgui/NetworkDiscovery
|
the GUI. More...
#include <ndgui.h>
Public Slots | |
void | handleConnectionEstablished (QString ifName) |
handle if a interface is able to connect | |
void | abortBoot (QString msg) |
show abortBoot dialog | |
void | chooseInterfaceDialog (QString msg) |
opens ths chooseInterfaceDialog | |
void | handleAllProcessesFinished () |
determines if we continue the boot sequence or if we show the chooseInterface or abortBoot dialog | |
void | restartSystem () |
restart the system | |
void | shutDownSystem () |
shut down the system | |
void | continueBoot (QString ifName) |
continue the boot sequence | |
void | continueBootWithoutCheck (QString ifName) |
continue the boot sequence without further checking if the connection is still possible. | |
void | tryAgain () |
starts the whole application again. | |
void | startSingleShot () |
starts a singleshot event. | |
void | startNetworkDiscovery () |
start the network discovery | |
void | attachToDOM () |
stellt ein ndgui/fbgui Objekt zur verwendung durch die html bereit. | |
void | loadJQuery () |
load jQuery and js scripts into the page so that all javascript functions will work. | |
void | addInterface (const QString &ifName) |
adds an interface to the DOM tree. Creates its progress bar and it's status label. | |
void | updateIfStatus (const QString &ifName, const QString &status) |
update the status for each interface | |
void | updateStatus (const QString &status) |
updates the over all status | |
void | updateIfProgressBar (const QString &ifName, const int &percent) |
updates the progress bar for each interface. | |
void | notifyCall (QString msg) |
just for debugging. | |
Signals | |
void | initFbgui () |
Public Member Functions | |
ndgui (QMainWindow *parent=0) | |
~ndgui () | |
Q_INVOKABLE QVariantList | getManualConfInterfaces () |
fills the drop down box of the manual interface configuration dialog. | |
Q_INVOKABLE int | ip4_setManualConfiguration (QVariantMap result) |
takes the entered manual configuration dates and delivers it to the networkDiscovery for further actions. | |
Q_INVOKABLE QString | readLogFile () |
read the log file. Log File will be presented inside of a dialog. | |
Q_INVOKABLE QVariantMap | getInterfaceConf (QString ifName) |
return a json formated interface configuration |
the GUI.
This class is responsible for creating and displaying the user interface. It also connects the webView via QWebBridge to javascript functions inside the html files.
ndgui::ndgui | ( | QMainWindow * | parent = 0 | ) |
constructor
ndgui::~ndgui | ( | ) |
destructor
void ndgui::abortBoot | ( | QString | msg | ) | [slot] |
show abortBoot dialog
msg | the message, displayed in the dialog. |
void ndgui::addInterface | ( | const QString & | ifName | ) | [slot] |
adds an interface to the DOM tree. Creates its progress bar and it's status label.
ifName | name of the new interface. |
void ndgui::attachToDOM | ( | ) | [slot] |
stellt ein ndgui/fbgui Objekt zur verwendung durch die html bereit.
void ndgui::chooseInterfaceDialog | ( | QString | msg | ) | [slot] |
opens ths chooseInterfaceDialog
msg | the interfaces as json formated string. will be displayed in a select box. |
void ndgui::continueBoot | ( | QString | ifName | ) | [slot] |
continue the boot sequence
represents the end of the NetworkDiscovery life time. will start the fbgui screen. All networkDiscovery signals will be ignored after this point.
void ndgui::continueBootWithoutCheck | ( | QString | ifName | ) | [slot] |
continue the boot sequence without further checking if the connection is still possible.
QVariantMap ndgui::getInterfaceConf | ( | QString | ifName | ) |
return a json formated interface configuration
ifName | the name of the interface |
QVariantList ndgui::getManualConfInterfaces | ( | ) |
fills the drop down box of the manual interface configuration dialog.
void ndgui::handleAllProcessesFinished | ( | ) | [slot] |
determines if we continue the boot sequence or if we show the chooseInterface or abortBoot dialog
if we have a user choice (_userChoice = true) than networkDiscovery will emit a allProcessesFinished signal if all processes are done. This method determines if user will see an abort boot dialog (no interface names in the ifNameList list) or an choose interface dialog (one or more interface names in the list (add with handleConnectionEstablished)).
void ndgui::handleConnectionEstablished | ( | QString | ifName | ) | [slot] |
handle if a interface is able to connect
if we have a user choice (_userChoice = true) than networkDiscovery will emit connectionEstablished signals. Add the interface name to a _ifNameList. This list holds all interfaces the user can choose out of.
void ndgui::initFbgui | ( | ) | [signal] |
int ndgui::ip4_setManualConfiguration | ( | QVariantMap | jsonArr | ) |
takes the entered manual configuration dates and delivers it to the networkDiscovery for further actions.
jsonArr | a jsonArr which contains the manual entered interface configuration |
void ndgui::loadJQuery | ( | ) | [slot] |
load jQuery and js scripts into the page so that all javascript functions will work.
void ndgui::notifyCall | ( | QString | msg | ) | [slot] |
just for debugging.
QString ndgui::readLogFile | ( | ) |
read the log file. Log File will be presented inside of a dialog.
void ndgui::restartSystem | ( | ) | [slot] |
restart the system
this method will restart the system. triggered through a button click in the gui.
void ndgui::shutDownSystem | ( | ) | [slot] |
shut down the system
this method will restart the system. triggered through a button click in the gui.
void ndgui::startNetworkDiscovery | ( | ) | [slot] |
start the network discovery
main starting point of the whole procedure. disconnect the loadFinished signal with the startNetworkDiscovery and starts the networkDiscovery.
void ndgui::startSingleShot | ( | ) | [slot] |
starts a singleshot event.
is connected to the singleShot event. Triggering this method means that we go on with the main NetworkDiscovery screen. connects the loadFinished signal of the _webView with the startNetworkDiscovery slot and removes the action.
void ndgui::tryAgain | ( | ) | [slot] |
starts the whole application again.
void ndgui::updateIfProgressBar | ( | const QString & | ifName, |
const int & | percent | ||
) | [slot] |
updates the progress bar for each interface.
ifname | the name ot the interface to update |
percent | the progress in percent |
void ndgui::updateIfStatus | ( | const QString & | ifName, |
const QString & | status | ||
) | [slot] |
update the status for each interface
ifName | the name ot the interface to update |
status | the new status of the interface. |
void ndgui::updateStatus | ( | const QString & | status | ) | [slot] |
updates the over all status
status | the new status message |