summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
*/
}