Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 19 lines (14 sloc) 0.533 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "Render.h"
#include "WebPage.h"

Render::Render(WebPage *page, QObject *parent) : Command(page, parent) {
}

void Render::start(QStringList &arguments) {
  QStringList functionArguments(arguments);
  QString imagePath = functionArguments.takeFirst();
  int width = functionArguments.takeFirst().toInt();
  int height = functionArguments.takeFirst().toInt();

  QSize size(width, height);
  page()->setViewportSize(size);

  bool result = page()->render( imagePath );

  emit finished(new Response(result));
}
Something went wrong with that request. Please try again.