diff options
author | Jonathan Bauer | 2011-03-06 12:38:47 +0100 |
---|---|---|
committer | Jonathan Bauer | 2011-03-06 12:38:47 +0100 |
commit | 4c130760d46a0e06e867447a39440596e215015c (patch) | |
tree | 7b55e2c6d8fd3cc541571748d46a522b9e87e37b /src/fbgui.cpp | |
parent | main.cpp added (diff) | |
download | fbgui-4c130760d46a0e06e867447a39440596e215015c.tar.gz fbgui-4c130760d46a0e06e867447a39440596e215015c.tar.xz fbgui-4c130760d46a0e06e867447a39440596e215015c.zip |
fixed URL loading from cmdline
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r-- | src/fbgui.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp index 4ae9174..04a6f3b 100644 --- a/src/fbgui.cpp +++ b/src/fbgui.cpp @@ -5,17 +5,26 @@ #include <iostream> #include <QUrl> -fbgui::fbgui(QApplication *parent) +void fbgui::setUrl(QUrl& url) { - // Test if parent is accessible? - qDebug() << "Still alive?"; - qDebug() << "Parent name: " << parent->objectName(); - /* Create the browser and connect to quit() */ - fbb = new fbbrowser(QUrl("http://132.230.4.3/webkitTest.html")); - QObject::connect(fbb, SIGNAL(killApp()), parent, SLOT(quit())); - fbb->show(); + qDebug() << "Set URL to: " << url.toString(); + this->_url=url; +} + +void fbgui::start() +{ + _fbb = new fbbrowser(_url); + QObject::connect(_fbb, SIGNAL(killApp()), this->parent(), SLOT(quit())); + _fbb->show(); +} + +fbgui::fbgui() +{ + + _fbb = NULL; + _url = ""; } fbgui::~fbgui() { - delete fbb; + delete _fbb; } |