<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 21, 2014 at 2:09 PM, John Van Ostrand <span dir="ltr"><<a href="mailto:john@vanostrand.com" target="_blank">john@vanostrand.com</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"><div><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On Fri, Nov 21, 2014 at 10:57 AM, 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"><p dir="ltr">This actually seems Nice for every kind of graph besides the main one. Did you managed to do it in a good way? ( we have three graphics items associated with a graph, all of them should move.) </p>
<div class="gmail_quote">Em 21/11/2014 13:51, "John Van Ostrand" <<a href="mailto:john@vanostrand.com" target="_blank">john@vanostrand.com</a>> escreveu:<div><div><br type="attribution"><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">On Fri, Nov 21, 2014 at 10:48 AM, 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"><p dir="ltr">What do you mean by move the graph out of the way? </p>
<div class="gmail_quote">Em 21/11/2014 13:47, "John Van Ostrand" <<a href="mailto:john@vanostrand.com" target="_blank">john@vanostrand.com</a>> escreveu:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">To address the position of the temperature graph on the dive profile window how about allowing the user to move the graph out of the way?<br clear="all"><div><br>-- <br><div><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br></div><br></div></div>
</div></div>
<br></div></div>_______________________________________________<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" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
<br></blockquote></div>
</blockquote></div><br><br></div><div class="gmail_extra">Allowing the user to click on the temperature graph and drag the graph up or down so they can see detail on the dive profile.<br clear="all"><br>-- <br><div><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br></div><br></div></div>
</div></div>
</blockquote></div></div></div>
</blockquote></div><br></div></div></div><div class="gmail_extra">I'm not completely happy about how it was done but it was a minimally invasive method. I'd be open to ideas on how to do it better.<br><br>The work is done inside the temperatureItem where the pos() is 0,0 (relative to temeratiureAxis I thnk). That's what's being adjusted so it may end up negative. It would seem more obvious to adjust it relative to the scene but that was more invasive. If we wanted the ability to move most of the other items maybe there is a way to do it in the scene object where access to that coordinate system is easier. I'm still trying to figure out how to work with objects and Qt and how ProfileWidget2 works.<br><br>The patch also does nothing to store where the item is graphed so that it would remain positioned after a restart. And there needs to be some way of making sure it isn't positioned off-scene which is harder to do when not referencing the scene.<br clear="all"></div></div></blockquote><div><br></div><div>I'm the one that created 99% of that code, so I'm the best one to answer that. :)<br></div>The positions are done in a very dumb way right now, we can save / restore the positions using the Settings but for now, this just doesn't work.<br><br></div><div class="gmail_quote">How the Graphics works:<br><br></div><div class="gmail_quote">Each Graphics has a few necessary components:<br></div><div class="gmail_quote"><br>Horizontal Axis<br>Vertical Axis<br></div><div class="gmail_quote">Data Model ( like a spreadsheet table - almost all data from subsurface comes from the same model )<br></div><div class="gmail_quote">Column on the Model for the Horizontal Axis data<br>Column on the Model for the Vertical Axis data<br><br></div><div class="gmail_quote">then the H/V axis maps the positions for the Data Model and plots it on screen on the paint() method.<br><br></div><div class="gmail_quote">The Horizontal Axis of almost all items is the time line, and is visible<br>The Vertical Axis for most of the items are invisible, but they are there - I need it to specify the size of the graph.<br><br></div><div class="gmail_quote">So, a good way to make things work:<br><br></div><div class="gmail_quote">on mouseHoverEvent() of the graphics: Make the item 'selected', paint with a stronger pen or something.<br></div><div class="gmail_quote">on mouseHoverOut() of the graphics: Make the Axis Invisible, revert to defaults<br></div><div class="gmail_quote">on mouseClick() of the graphics: Make it pseudo-movable<br>on mouseMove() of the graphics: move the Vertical Axis and the Graphics<br>on mouseRelease() of the graphics: make it un-movable again.<br><br></div><div class="gmail_quote">All those methods can be added to any graphic.<br><br></div><div class="gmail_quote"><br><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><span class=""><div class="gmail_extra"><br>-- <br><div><div dir="ltr"><div>John Van Ostrand<br></div><div>At large on sabbatical<br></div><br></div></div>
</div></span></div>
</blockquote></div><br></div></div>