diff options
| author | Jonathan Bauer | 2011-03-08 13:47:42 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2011-03-08 13:47:42 +0100 |
| commit | 853fdb89190593ed4e904832137a29bf479c1d82 (patch) | |
| tree | 556b9b5068fc3a6fa5080d50d890dbfb1cb4923b | |
| parent | statement not needed, true by default. (diff) | |
| download | fbgui-853fdb89190593ed4e904832137a29bf479c1d82.tar.gz fbgui-853fdb89190593ed4e904832137a29bf479c1d82.tar.xz fbgui-853fdb89190593ed4e904832137a29bf479c1d82.zip | |
sysInfoTest.html as reference on how to call the function properly
| -rw-r--r-- | src/html/sysInfoTest.html | 21 | ||||
| -rw-r--r-- | src/sysInfo.cpp | 6 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/html/sysInfoTest.html b/src/html/sysInfoTest.html new file mode 100644 index 0000000..ab4247c --- /dev/null +++ b/src/html/sysInfoTest.html @@ -0,0 +1,21 @@ + + +<html> +<head> +<script type="text/javascript"> +function getInfo(){ + var tmp = jsObject.getSysInfo(document.form.info.value); + document.form.returnFromQT.value = tmp; +} +</script> +</head> +<body> +<form name="form"> + <p> + <input type="text" name="info"> + <input type="button" name="toQT" value="Request info" + onclick="getInfo()"> + <input type="text" name="returnFromQT"> + </p> +</body> +</html> diff --git a/src/sysInfo.cpp b/src/sysInfo.cpp index b64fdce..8775777 100644 --- a/src/sysInfo.cpp +++ b/src/sysInfo.cpp @@ -3,11 +3,13 @@ #include <QTime> #include <QNetworkInterface> -sysInfo::sysInfo(){} +sysInfo::sysInfo(){ + if (debug) qDebug() << "sysInfo created."; +} sysInfo::~sysInfo(){} QString sysInfo::getInfo(QString& infoName){ if (debug) qDebug() << "sysInfo : getInfo(" << infoName << ")"; - if (infoName == QString("MAC")) + if (infoName == QString("mac")) return getMACAddress(); // still here? --> error return "error"; |
