Prototype for customizable printing support.

Gehad Elrobey gehadelrobey at gmail.com
Wed Apr 15 15:14:48 PDT 2015


Hello all,

As we are approaching gsoc community bonding period so I thought that a
small prototype may be the best way to discuss my thoughts with the
community.
I sent a group of patches with a very small but full working prototype.

- I added Grantlee library to subsurface code base (thanks for the cmake
build environment it made my life much easier as I don't know qmake at all)
- I create a simple Grantlee template that prints two dives per page.
- the TemplateLayout class iterates the selected dives and interface with
Grantlee backend.
- QWebview and QPainter are used to render the html file living in a
QTemporaryFile object.
- finally I added the "print using templates" option in the print dialog.

Note: I tested this on Linux only, so there may be problems on other
platforms.
also many exceptions still need to be handled this is only a fast prototype
for discussion.

So you may test this and tell me what do you think?

-- 
regards,
Gehad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Create-two-dives-per-page-grantlee-template.patch
Type: text/x-patch
Size: 2606 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Add-Printer-class-that-holds-the-rendering-logic.patch
Type: text/x-patch
Size: 4962 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Integration-with-subsurface-printing-dialog.patch
Type: text/x-patch
Size: 7766 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Use-the-existing-QPrinter-in-printer.cpp.patch
Type: text/x-patch
Size: 6661 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-CMAKE-Require-Grantlee-library.patch
Type: text/x-patch
Size: 3452 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Add-TemplateLayout-class.patch
Type: text/x-patch
Size: 8053 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-Handle-QTemporaryFile-generated-by-template.patch
Type: text/x-patch
Size: 2172 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-Add-dyanmic-paths-to-Grantlee-plugins.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Organize-Imports.patch
Type: text/x-patch
Size: 1139 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150416/b2416162/attachment-0017.bin>


More information about the subsurface mailing list