summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
authorJonathan Bauer2011-03-15 22:51:15 +0100
committerJonathan Bauer2011-03-15 22:51:15 +0100
commit1ac39ce6281c9f7da77124a5171829055b2ebf57 (patch)
tree432a8deb8e0b791858b29bf0b3130cdec672cfdd /src/fbgui.cpp
parentremoved (diff)
downloadfbgui-1ac39ce6281c9f7da77124a5171829055b2ebf57.tar.gz
fbgui-1ac39ce6281c9f7da77124a5171829055b2ebf57.tar.xz
fbgui-1ac39ce6281c9f7da77124a5171829055b2ebf57.zip
fbgui.conf default paths checks, update interval modifiable (only in .conf), (re)moved header filename parsing, cleanup, cleanupss
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index 7fc93c8..cd58863 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -14,18 +14,21 @@ QString binPath("");
QString downloadPath(binPath + "/downloads");
QUrl baseURL(DEFAULT_URL);
bool debug = false;
+int updateInterval = DEFAULT_UPDATE_INTERVAL;
//-------------------------------------------------------------------------------------------
fbgui::fbgui()
{
- if (debug) qDebug() << "Application dir path: " << QApplication::applicationDirPath();
+ //grabKeyboard();
- checkHost();
/* Init "browser" */
+ checkHost();
QWebView* webView = new QWebView(this);
webView->load(baseURL);
+
/* Init JavaScript interface */
javascriptInterface* jsi = new javascriptInterface(webView->page()->mainFrame());
QObject::connect(jsi, SIGNAL(quitFbgui()), this, SLOT(close()));
+
QObject::connect(webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
jsi, SLOT(attachToDOM()));
/* Init Download Manager */
@@ -33,7 +36,8 @@ fbgui::fbgui()
QObject::connect(jsi, SIGNAL(requestFile(QString&)), dm, SLOT(downloadFile(QString&)));
QObject::connect(dm, SIGNAL(updateProgress(QString, int)), jsi, SLOT(updateProgressBar(QString, int)));
QObject::connect(dm, SIGNAL(downloadQueueEmpty()), jsi, SLOT(callbackOnDlQueueFinished()));
- setWindowFlags(Qt::Window);
+
+ setAttribute(Qt::WA_QuitOnClose, true);
showFullScreen();
setCentralWidget(webView);
show();