From 0193e902466857b2b81e2b35cf172b314a10a6b2 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Sun, 6 Mar 2011 17:10:29 +0100 Subject: baseUrl is now global variable --- src/fbgui.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/fbgui.cpp') diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 25bec8c..2303844 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -3,22 +3,32 @@ #include #include +#include -void fbgui::setUrl(QUrl& url) +QUrl baseUrl; + +// Function not yet used, depends how settings will be loaded. +void fbgui::setOption(QString key, QString value) { - this->_url=url; + if (!_options.contains(key)) + _options.insert(key, value); + else + { + // temp, find a better way for this + _options.remove(key); + _options.insert(key, value); + } } void fbgui::startBrowser() { - _fbb = new fbbrowser(_url); - QObject::connect(_fbb, SIGNAL(killApp()), this->parent(), SLOT(quit())); + _fbb = new fbbrowser(); + QObject::connect(_fbb, SIGNAL(killApp()), this->parent(), SLOT(quit())); } fbgui::fbgui() { - _fbb = NULL; - _url = ""; + _fbb = NULL; } fbgui::~fbgui() { -- cgit v1.2.3-55-g7522