summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklas Goby2011-02-22 19:21:03 +0100
committerNiklas Goby2011-02-22 19:21:03 +0100
commit59ae8fb9933ccbf0d8e0cb8391e242f127bc8121 (patch)
tree1176f395faeaa846996ae31cda83046af3298108
parentMerge branch 'master' of git.openslx.org:lsfks/master-teamprojekt/fbgui (diff)
downloadfbgui-59ae8fb9933ccbf0d8e0cb8391e242f127bc8121.tar.gz
fbgui-59ae8fb9933ccbf0d8e0cb8391e242f127bc8121.tar.xz
fbgui-59ae8fb9933ccbf0d8e0cb8391e242f127bc8121.zip
it is now possible to see the mac address as well
-rw-r--r--src/fbbrowser.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/fbbrowser.cpp b/src/fbbrowser.cpp
index 7150358..67909f6 100644
--- a/src/fbbrowser.cpp
+++ b/src/fbbrowser.cpp
@@ -105,6 +105,22 @@ void fbbrowser::startDownload_Slot()
void fbbrowser::getMacAddress_Slot()
{
+ QNetworkInterface *qNetI = new QNetworkInterface();
+ QList<QNetworkInterface> list;
+ list=qNetI->allInterfaces();
+ QString str;
+ QString macAddress;
+ for (int i = 0; i < list.size(); ++i) {
+ str = list.at(i).name();
+ macAddress = list.at(i).hardwareAddress();
+ qDebug() << str;
+ qDebug() << macAddress;
+ }
+
+ //TODO:: edit jsFunction name
+ QString code;
+ code = QString("printMacAddress(\"%1\")").arg(macAddress);
+ view->page()->mainFrame()->evaluateJavaScript(code);
}
void fbbrowser::getIpAddress_Slot()
@@ -132,6 +148,7 @@ void fbbrowser::showTime_Slot()
{
qDebug() << "---- call: showTime_Slot";
QString time = QTime::currentTime().toString("hh:mm:ss");
+
//TODO:: edit jsFunction name
QString code;
code = QString("printTime(\"%1\")").arg(time);
@@ -156,6 +173,6 @@ void fbbrowser::getSysInfo()
QString time = QTime::currentTime().toString("hh:mm:ss");
QString date = QDate::currentDate().toString("dd.MM.yyyy");
QList<QHostAddress> ipList = QNetworkInterface::allAddresses();
- QString macAddress = QNetworkInterface::hardwareAddress()
+ QString macAddress = QNetworkInterface::hardwareAddress();
*/
}