Review Request 122430: add optional properties rangeMax and rangeMin

Marco Martin notmart at gmail.com
Wed Feb 4 17:29:40 UTC 2015



> On Feb. 4, 2015, 5:18 p.m., David Edmundson wrote:
> > src/qmlcontrols/kquickcontrolsaddons/plotter.cpp, line 363
> > <https://git.reviewboard.kde.org/r/122430/diff/1/?file=347017#file347017line363>
> >
> >     to match the docs this possibly wants a || autoRange
> >     
> >     
> >     otherwise it is having an effect; just not a very useful one.

i think is fine, it's storing the value, then if autoRange gets set to false, the value gets used. otherwise becomes a bit tricky guaranteeing the autorange property gets set always before rangemax/min


> On Feb. 4, 2015, 5:18 p.m., David Edmundson wrote:
> > src/qmlcontrols/kquickcontrolsaddons/plotter.cpp, line 808
> > <https://git.reviewboard.kde.org/r/122430/diff/1/?file=347017#file347017line808>
> >
> >     so if you're not in auto range and you set max to be the same as min we'd see the data is just the raw values, not even scaled to the height of the plot.
> >     
> >     Is that what we intend?

pretty much.. scaling to the height of the plot is pretty much what autorange does, so if it's false and tangeMax/min are not set, i don't really know what to do to the data in that case..


> On Feb. 4, 2015, 5:18 p.m., David Edmundson wrote:
> > src/qmlcontrols/kquickcontrolsaddons/plotter.cpp, line 807
> > <https://git.reviewboard.kde.org/r/122430/diff/1/?file=347017#file347017line807>
> >
> >     does it makes sense to 
> >     
> >     if (autoRange)
> >     {
> >       if (m_rangeMax != adjustedMax) {
> >         m_rangeMax = adjustedMax
> >         emit autoMaxChanged()
> >       }
> >     }
> >     
> >     so that when it auto range mode you can retrieve the max and min from the API.

yeah, may be a good idea


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122430/#review75430
-----------------------------------------------------------


On Feb. 4, 2015, 5:07 p.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122430/
> -----------------------------------------------------------
> 
> (Updated Feb. 4, 2015, 5:07 p.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> To be used when autoRange is false, scales the values between two known max and min.
> so if for instance we know all the value coming will be percentage, we can ensure the height of the graph has the same proportion of the percentage compared to 100%
> 
> 
> Diffs
> -----
> 
>   src/qmlcontrols/kquickcontrolsaddons/plotter.h 3a10212 
>   src/qmlcontrols/kquickcontrolsaddons/plotter.cpp 1ea7fad 
> 
> Diff: https://git.reviewboard.kde.org/r/122430/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Marco Martin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150204/67b37789/attachment.html>


More information about the Kde-frameworks-devel mailing list