1 |
#include <QApplication> |
#include <QApplication> |
2 |
#include <QDesktopWidget> |
#include <QDesktopWidget> |
3 |
|
#include <QtDebug> |
4 |
|
|
5 |
|
|
6 |
#include <stdexcept> |
#include <stdexcept> |
7 |
|
|
8 |
#include "webview.h" |
#include "webview.h" |
15 |
settings->setAttribute( QWebSettings::PluginsEnabled, true); |
settings->setAttribute( QWebSettings::PluginsEnabled, true); |
16 |
} |
} |
17 |
|
|
18 |
void WebView::start(QString url, QString screenid) { |
void WebView::start(QString& url, QString& screenid) { |
19 |
try { |
try { |
20 |
this->load( QUrl( generateUrl(url, screenid) ) ); |
this->load( QUrl( generateUrl(url, screenid) ) ); |
21 |
} catch (std::exception& e) { |
} catch (std::exception& e) { |
30 |
this->setHtml( str ); |
this->setHtml( str ); |
31 |
} |
} |
32 |
|
|
33 |
QString WebView::generateUrl(QString url, QString screenid) { |
QString WebView::generateUrl(QString& url, QString& screenid) { |
34 |
QDesktopWidget* desktop = QApplication::desktop(); |
QDesktopWidget* desktop = QApplication::desktop(); |
35 |
QRect rect = desktop->screenGeometry(); |
QRect rect = desktop->screenGeometry(); |
36 |
|
|