Printing Support - brainstorm.

Tomaz Canabrava tcanabrava at kde.org
Mon Jul 22 06:39:14 PDT 2013


Lubomir,

Do you have an irc nick?

I didn't see your code yet because I'm at work, but I think I know what's
happening.
Tometimes a little chat is faster than experimentation.

T
Em 22/07/2013 09:28, "Lubomir I. Ivanov" <neolit123 at gmail.com> escreveu:

> On 20 July 2013 21:26, Tomaz Canabrava <tcanabrava at kde.org> wrote:
> > I'v managed to make the call a tiny bit better:
> >
> > how count, calculating heigths()
> > time calculating 0
> >
> > I removed the 'printing' code since I was just worried about the
> > rowHeight() being large - proved that it isn't.
> > I rearranged the code to use proper Qt Models ( subclass of
> > QAbstractItemModel, since it's documented that when you don't use it,
> > you can have issues with slowness ).
> >
> > I think you can get this code now and put it up to speed while I try
> > to finish the planner. :)
> >
> > :)
>
> thanks for the QAbstractItemModel info...things are definitely much faster
> now.
> but i'm returning back the zip package because there is another issue
> related to rowHeights()...
>
> i've started rendering pages with QWidget->render() and QRegions, but
> realized tableView->rowHeight() returns wrong values (always 25px).
> test code can be seen in "MainWindow::onPaintRequested()" (line:110)
> if check see the print preview it is obvious that the first row
> (heading) and the second (data) are not of the same height..
>
> ---
>
> the whole procedure now is in the lines of:
> - create a blank QAbstractModel (TModel)
> - select dives from dive table and add rows for them in model
> (use TModel::addRow so that rows can be inserted at any index, e.g.
> adding a heading row on a new page between data rows)
> - obtain row heights (issue here) and estimate where a new page should
> begin
> 6) ...
> 7) render pages with QRegions
>
> lubomir
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130722/e8861fb9/attachment.html>


More information about the subsurface mailing list