Skip to content
This repository
Newer
Older
100644 19 lines (14 sloc) 0.489 kb
17873240 » nicholaides
2011-05-26 Adding ability to render webpage to a PNG
1 #include "Render.h"
2 #include "WebPage.h"
f80125e6 » mhoran
2012-04-04 Pass the WebPageManager to each command
3 #include "WebPageManager.h"
17873240 » nicholaides
2011-05-26 Adding ability to render webpage to a PNG
4
95732ad7 » jferris
2012-07-08 Split Command into more abstract Command and concrete SocketCommand
5 Render::Render(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
17873240 » nicholaides
2011-05-26 Adding ability to render webpage to a PNG
6 }
7
85dcc729 » jferris
2012-03-16 Pass command arguments to the constructor
8 void Render::start() {
9 QString imagePath = arguments()[0];
10 int width = arguments()[1].toInt();
11 int height = arguments()[2].toInt();
17873240 » nicholaides
2011-05-26 Adding ability to render webpage to a PNG
12
13 QSize size(width, height);
14 page()->setViewportSize(size);
15
16 bool result = page()->render( imagePath );
17
18 emit finished(new Response(result));
19 }
Something went wrong with that request. Please try again.