GSoC Status - Week 7 (Customizable prints)

Tomaz Canabrava tcanabrava at kde.org
Fri Jul 17 11:20:51 PDT 2015


On Fri, Jul 17, 2015 at 3:13 PM, Gehad Elrobey <gehadelrobey at gmail.com>
wrote:

>
>
> On Fri, Jul 17, 2015 at 8:08 PM, Lubomir I. Ivanov <neolit123 at gmail.com>
> wrote:
>
>> On 17 July 2015 at 20:06, Gehad Elrobey <gehadelrobey at gmail.com> wrote:
>> >
>> >
>> > On Tue, Jul 14, 2015 at 1:43 PM, Lubomir I. Ivanov <neolit123 at gmail.com
>> >
>> > wrote:
>> >>
>> >> On 14 July 2015 at 14:38, Gehad Elrobey <gehadelrobey at gmail.com>
>> wrote:
>> >> >
>> >> >
>> >> > On Tue, Jul 14, 2015 at 1:29 PM, Lubomir I. Ivanov <
>> neolit123 at gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On 14 July 2015 at 13:19, Gehad Elrobey <gehadelrobey at gmail.com>
>> wrote:
>> >> >> >
>> >> >> > On Jul 14, 2015 12:15 PM, "Lubomir I. Ivanov" <
>> neolit123 at gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On 14 July 2015 at 00:16, Gehad Elrobey <gehadelrobey at gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> > Should I convert the dive profile to QImage during previewing
>> only
>> >> >> >> > or
>> >> >> >> > should
>> >> >> >> > I convert it during actual printing also which will affect the
>> >> >> >> > printing
>> >> >> >> > quality?
>> >> >> >> >
>> >> >> >>
>> >> >> >> i can't build ATM, but i think the logic here is a bit wrong:
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> https://github.com/Gehadelrobey/subsurface/commit/d5b9e8424f82f4960d44a2f16abda1cbf27d7673
>> >> >> >>
>> >> >> >> "We must pass a QPaintDevice with type QPixmap for previewing and
>> >> >> >> with
>> >> >> >> type QPrinter for actual printing."
>> >> >> >>
>> >> >> >> does that include QPrintPreviewDialog as well? if so that's
>> wrong.
>> >> >> >> you can use a QPixmap if you are rendering an image to be shown
>> in
>> >> >> >> the
>> >> >> >> template edit dialog, but the actual QPrintPreviewDialog contents
>> >> >> >> should be pretty much the same as the printed contents (on a
>> >> >> >> hardcopy
>> >> >> >> or in a PDF).
>> >> >> >>
>> >> >> >
>> >> >> > No, the preview function is used for the QPixmap in the
>> TemplateEdit
>> >> >> > only,
>> >> >> > while the QPrintPreviewDialog uses the actual print() function.
>> >> >>
>> >> >> both the preview and print profiles are in vector for me, which is
>> >> >> good.
>> >> >> also the color and edit seems to be working and the preferred colors
>> >> >> are stored (in the settings/registry(win32), apparently).
>> >> >>
>> >> >> we *might* have to get some user feedback on the colors...i think
>> >> >> storing them globally is a bad idea.
>> >> >> will create a thread on the ML for that.
>> >> >>
>> >> >> 1) the "per-template" vs "global colors" issue..
>> >> >
>> >> >
>> >> > Sorry, what do you mean by global colors? do you mean the
>> almond_colors
>> >> > instance of the color struct?
>> >> >
>> >>
>> >> ignore this for now. just give the colors proper names in the dialog
>> >> (e.g. "Background" etc..)
>> >>
>> >
>> > Hello Lubomir,
>> >
>> > I have fixed the names in the TemplateEdit dialog as you have
>> suggested, I
>> > have also fixed the QPrintPreviewDialog grayscale issue and pushed them
>> to
>> > my branch.
>> >
>>
>> hello Gehad,
>>
>> without looking at the code, the greyscale mode works as expected, but
>> both the Preview and actual Print now razterize everything on Windows
>> (profile and table). we want them in vector graphics on all OSes and
>> Qt versions where possible.
>>
>> perhaps, that's something you've overlooked?
>>
>
> I am forces to render the dive profile on a QImage so that I can convert
> it to grayscale image and then render it on top of the QWebview, Do you
> think there is a way to convert the vector graphics to grayscale?
>


 graphicsview-common.h:QColor getColor(const color_indice_t i, bool
isGrayscale = false);

so, 90% of the time we are using getColor without the isGrayscale boolean,
triggering the false state.
this is where you should do your stuff :)

grep getColor inside qt-ui/profile and see where you should change.




>
> --
> regards,
>
> Gehad
>
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150717/8a41004e/attachment.html>


More information about the subsurface mailing list