<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 27, 2015 at 10:32 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-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On 27 May 2015 at 20:09, Gehad Elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>> wrote:<br>
><br>
><br>
> On Tue, May 26, 2015 at 12:55 PM, Lubomir I. Ivanov <<a href="mailto:neolit123@gmail.com">neolit123@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On 25 May 2015 at 21:26, Gehad Elrobey <<a href="mailto:gehadelrobey@gmail.com">gehadelrobey@gmail.com</a>> wrote:<br>
>> > Hello Lubomir,<br>
>> ><br>
>> > As GSoC coding period have begun, I wanted to update you with my<br>
>> > progress<br>
>> > till now, I've pushed some more commits to my git branch, I will push<br>
>> > some<br>
>> > more commits on the weekend as I am having my finals exams now. BTW Have<br>
>> > you<br>
>> > managed to build subsurface with Grantlee yet or you still getting the<br>
>> > same<br>
>> > linking error?<br>
>> ><br>
>><br>
>> alright, i'm able to build now.<br>
>><br>
>> please, merge the attached patch into your repository and let me know<br>
>> if you have any issues with it.<br>
>> also remove the NEW_PRINTING macro and CustomPrintDialog (more comments<br>
>> bellow).<br>
>><br>
>> per-commit short reviews. read from bottom to top:<br>
>><br>
>> ---------------<br>
>><br>
>> 9b2701e Add Progress bar to custom print dialog<br>
>><br>
>> see da5ce64<br>
>><br>
>> 3a37e57 Remove unused variable<br>
>><br>
>> should be rebased. the code which it touches is WIP.<br>
>><br>
>> ff97353 Open custom print dialog if NEW_PRINTING is defined<br>
>><br>
>> see da5ce64<br>
>><br>
>> da5ce64 Create the new custom print dialog<br>
>><br>
>> i think you should just modify the current print dialog. adding more<br>
>> files creates noise.<br>
>> it was already discussed that master will have a "broken" printing<br>
>> module while this GSoC task is WIP.<br>
>><br>
><br>
> I though that I ll have to use the macro until the printing work is finished<br>
> so that we can continue building subsurface without breaking the current<br>
> module, I ll fix this.<br>
<br>
</div></div>well, having the code as WIP in master without the macro makes our life easier.<br>
i think we can live with the fact the GSoC will introduce a lot of<br>
changes, and we don't really want to #ifdef everything new.<br>
<span class=""><br></span></blockquote><div><br>fixed and pushed, I also removed the new print dialog and modified the existing one as discussed, and merged the patch you have sent before.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
>> 78fcd53 Add TemplateLayout class<br>
>><br>
>> asked the same before; any comments on why we need a local Dive object?<br>
>> i highly doubt this will reach master as is.<br>
><br>
><br>
> I needs the local dive object as Grantlee::Context is initialized by<br>
> QVariantList<Dive> which contains all selected dives information, I have<br>
> also checked the existing dive class at "models.h" and the class was missing<br>
> many fields that will be needed by the printing module, AFAIK the class in<br>
> models.h is currently used in the dive list view only.<br>
><br>
<br>
</span>i have something else in mind, which may trigger some model.h changes.<br>
<br>
models.h is the correct place to add the class (for now), but it<br>
should not be a model but rather an DiveItem based class, or something<br>
similar.<br>
as you may have noticed DiveItem and TreeItem really think in terms of<br>
Qt widgets (rows, columns, roles) and we don't really need that. we<br>
just need a wrapper class like your Dive class in templatelayout.h,<br>
but it will also need some of the already present code...<br>
<br>
a goal here would be to have object oriented translation targets (e.g.<br>
less tr() calls) and unified text formatting logic (same formatting on<br>
the UI, hard copies and so on).<br>
this may require that we separate the formatting logic in DiveItem<br>
from the actual Qt widget *Item logic.<br>
<br>
ProfilePrintModel::data() is a good example where DiveItem is used as<br>
temporary object because of it's complicated formatting output (e.g.<br>
di.displayDuration()). using this provides the same duration logic for<br>
the UI and the hard copy, yet the DiveItem is not really used as a Qt<br>
widget item, but rather just as a formatter class.<br>
<br></blockquote><div><br>May you please clarify this more as I thing I am missing something, I had a quick look on ProfilePrintModel and what I understand that I have to create a new model for printing, and connect it with the existing diveitem to reuse the existing code, The new class will be responsible for formatting the dive fields to the templating Engine, that's all right?</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">regards,</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div dir="ltr"><div>Gehad</div></div></div></blockquote></div></div>
</div></div>