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






<div>
<span style="font-family:monospace"><span style="color:rgb(178,24,178);background-color:rgb(255,255,255)">graphicsview-common.h</span><span style="color:rgb(24,178,178);background-color:rgb(255,255,255)">:</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">QColor </span><span style="font-weight:bold;color:rgb(255,84,84);background-color:rgb(255,255,255)">getColor</span><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">(const color_indice_t i, bool isGrayscale = false);</span><br>
<br></span></div><div><span style="font-family:monospace">so, 90% of the time we are using getColor without the isGrayscale boolean, triggering the false state.<br></span></div><div><span style="font-family:monospace">this is where you should do your stuff :)<br><br></span></div><div><span style="font-family:monospace">grep getColor inside qt-ui/profile and see where you should change.<br><br></span></div><div><span style="font-family:monospace"><br></span></div></div></div></div></div></blockquote><div><br></div><div>I already tried to do this, I also added isGrayscale members in DiveProfileItem, but there are some remaining elements that I couldn't change into grayscale (eg. cylinder pressure curve and numbers on horizontal/vertical axis) please check the screenshot attached, Am I missing something?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><span style="font-family:monospace"></span></div> 


<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span><font color="#888888"><div><br></div><span class="HOEnZb"><font color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr">regards,</div></div><blockquote style="margin:0px 0px 0px 40px;border:medium none;padding:0px"><div><div dir="ltr"><div>Gehad</div></div></div></blockquote></div></div>
</font></span></font></span></div></div><span class="HOEnZb"><font color="#888888">
<br>_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
<br></font></span></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">regards,</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div dir="ltr"><div>Gehad</div></div></div></blockquote></div></div>
</div></div>