diff options
| -rw-r--r-- | src/fbgui.cpp | 9 | ||||
| -rw-r--r-- | src/fbgui.h | 4 | ||||
| -rw-r--r-- | src/javascriptInterface.cpp | 6 | ||||
| -rw-r--r-- | src/javascriptInterface.h | 2 |
4 files changed, 5 insertions, 16 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index bfab8c4..af1a4e7 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -20,26 +20,20 @@ fbgui::fbgui() if (debug) qDebug() << "Application dir path: " << QApplication::applicationDirPath(); checkHost(); - /* Init "browser" */ QWebView* webView = new QWebView(this); webView->load(baseURL); - /* Init JavaScript interface */ javascriptInterface* jsi = new javascriptInterface(webView->page()->mainFrame()); - // this still looks bad.. QObject::connect(jsi, SIGNAL(quitFbgui()), this, SLOT(close())); QObject::connect(webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), jsi, SLOT(attachToDOM())); - /* Init Download Manager */ DownloadManager* dm = new DownloadManager(); QObject::connect(jsi, SIGNAL(requestFile(QString&)), dm, SLOT(downloadFile(QString&))); QObject::connect(dm, SIGNAL(updateProgress(QString, int)), jsi, SLOT(updateProgressBar(QString, int))); - - //setWindowFlags(Qt::Window); + setWindowFlags(Qt::Window); showFullScreen(); - qDebug() << "Width: " << width() << " // Height: " << height(); setCentralWidget(webView); show(); @@ -52,4 +46,3 @@ void fbgui::checkHost() const { exit(EXIT_FAILURE); } } -void fbgui::anim() {} diff --git a/src/fbgui.h b/src/fbgui.h index 09cf459..d1f0852 100644 --- a/src/fbgui.h +++ b/src/fbgui.h @@ -21,10 +21,6 @@ public: private: void checkHost() const; - void anim(); - - QSize size; - }; #endif // FBGUI_H diff --git a/src/javascriptInterface.cpp b/src/javascriptInterface.cpp index 9417edd..cf2f29a 100644 --- a/src/javascriptInterface.cpp +++ b/src/javascriptInterface.cpp @@ -27,7 +27,7 @@ QString javascriptInterface::getSysInfo(QString info) //------------------------------------------------------------------------------------------------------- void javascriptInterface::attachToDOM() { - _parent->addToJavaScriptWindowObject(QString("jsObject"), this); + //_parent->addToJavaScriptWindowObject(QString("jsObject"), this); _parent->addToJavaScriptWindowObject(QString("fbgui"), this); } //------------------------------------------------------------------------------------------------------- @@ -49,13 +49,13 @@ void javascriptInterface::updateProgressBar(QString current, int i) { if (i == 0) return; - QString code = QString("updateProgress(\%1 \%2)").arg(current).arg(i); + QString code = QString("updateProgress(\%1, \%2)").arg(current).arg(i); qDebug() << "To JS: " << code; _parent->evaluateJavaScript(code); } //------------------------------------------------------------------------------------------------------- -void javascriptInterface::quit() +void javascriptInterface::quitGUI() { if (debug) qDebug() << "Quit signal."; emit quitFbgui(); diff --git a/src/javascriptInterface.h b/src/javascriptInterface.h index 8a6529c..0004982 100644 --- a/src/javascriptInterface.h +++ b/src/javascriptInterface.h @@ -32,7 +32,7 @@ public slots: QString getSysInfo(QString info); void startDownload(QString filename); void updateProgressBar(QString current, int i); - void quit(); + void quitGUI(); }; #endif /* JAVASCRIPTINTERFACE_H_ */ |
