<p dir="ltr"><br>
Em 22/10/2014 12:52, "Dirk Hohndel" <<a href="mailto:dirk@hohndel.org">dirk@hohndel.org</a>> escreveu:<br>
><br>
> So in order to allow people to add simple dives more quickly (without<br>
> having to use the graphical profile editor, if they prefer) I was<br>
> considering what seems like a small change to the UI, but I have no idea<br>
> how to do that.<br>
><br>
> The idea would be to have another input field on the MainTab (I was<br>
> thinking to the right of the "location" input field) and have that be the<br>
> field for the max depth of the dive. The logic would work something like<br>
> this:<br>
> - the field is only shown when we are in ADD DIVE mode or are editing a<br>
>   manually edited dive<br>
> - the field will also be disabled if the profile has been changed to have<br>
>   more points, more 'levels', etc (i.e., if it isn't the standard "drop to<br>
>   depth, stay there for a while, ascend to safety stop, ascend to surface"<br>
>   style)<br>
> - if the user changes the value in this field the profile of course gets<br>
>   updated<br>
><br>
> So all this seems to make sense to me (yell if you disagree). But what I<br>
> have no idea how to do is how to conditionally add / hide that additional<br>
> label and additional input field in the grid layout. The layout is created<br>
> from the .ui file. Location right now spans three columns. How can I<br>
> change this at run time to span two columns and add those fields?</p>
<p dir="ltr">You can add the full dialog in the .ui, and create logic to   .show()  or   .hide()   the fields you wanna conditionally. <br></p>
<p dir="ltr">> /D<br>
> _______________________________________________<br>
> subsurface mailing list<br>
> <a href="mailto:subsurface@subsurface-divelog.org">subsurface@subsurface-divelog.org</a><br>
> <a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</p>