On Sun, Mar 8, 2015 at 12:11 AM, Lubomir I. Ivanov <[email protected]> wrote:
> On 7 March 2015 at 23:47, Lubomir I. Ivanov <[email protected]> wrote: > > > > one thing to figure out is how are we going to embed the profile > pictures... > > if we are capturing the output of a QWebPage then we first need to > > show the profiles in there. > > for that <img src="data: metatype, base64, theDataGoesHere" /> can be > used. > > now, there is an alternative for all that, but it's tricky... > since we can use QWebFrame::render() on a QPainter that uses the > QPrinter as paint device, in theory we can position a QPicture of the > profile exactly over the already rendered profile HTML frame (e.g. in > your PDF that would be "dive profile area"), but that's only in > theory. > I was thinking of using Grantlee to generate parts of the HTML code, one part for each widget that will be placed in the layout dynamically, we can also insert the profile photos dynamically as the HTML code. So the Qt class will call Grantlee many times to fill in the <div> s (or widgets in the main layout) dynamically and generate the full html code that can be rendered by QWebPage and printed. -- regards, Gehad
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
