#ifdef POPPLER
#include "PDFWidget.hh"
#endif
+#include <QPrinter>
+#include <QPrintDialog>
//#include "Viewer.mpp"
#define prefix_
#ifdef POPPLER
page()->setPluginFactory(new PDFWebPluginFactory (page()->networkAccessManager(), this));
#endif
+ connect(page(), SIGNAL(printRequested(QWebFrame*)), this, SLOT(printRequested()));
load(url);
}
+prefix_ void pykit::Viewer::printRequested()
+{
+ QPrinter printer;
+ QPrintDialog printDialog(&printer, this);
+ if (printDialog.exec() == QPrintDialog::Accepted) {
+ print(&printer);
+ }
+}
+
///////////////////////////////cc.e////////////////////////////////////////
#undef prefix_
//#include "Viewer.mpp"