summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index a48b069..4946944 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -30,7 +30,16 @@ fbgui::fbgui()
createActions();
checkHost();
_webView = new QWebView(this);
- _webView->load(baseURL);
+
+ // initialize filesystem watcher
+ _fileSystemWatcher = new QFileSystemWatcher();
+ // QString path //has to be set to some file or directory
+ // TODO change to the real path
+ _fileSystemWatcher->addPath(QApplication::applicationDirPath() + "/testChange/");
+ // qDebug() << QApplication::applicationDirPath() + "/testChange/";
+ QObject::connect(_fileSystemWatcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(ipReceived()));
+
+ _webView->load(QUrl("qrc:/html/loadAbout.html"));
// debug console split or normal browser
if (debugMode == 1)
@@ -113,3 +122,11 @@ void fbgui::checkHost() const
exit(EXIT_FAILURE);
}
}
+//-------------------------------------------------------------------------------------------
+void fbgui::ipReceived()
+{
+ // TODO reload _webView with the real pbs page
+ // qDebug() << "ip received!";
+ _webView->load(baseURL);
+
+}