-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlotWindow: add an option to get tape measure #3959
Conversation
9140626
to
7b8976a
Compare
Sounds good to me. And to answer to your message about displaying or not start/end points, i think it is not needed, and it's counter intuitive to display them. If you want to mesure something, just display the measure. If you need coords, you already have the tooltip or the status bar. For other stuffs like
If you provide such component, that's something i will integrate directly in flint. |
About the code
|
thanks, don't worry I can do it all. |
* rename TapeMeasureToolButton to RulerToolButton * update icon * allow user to provide the color to be used for the ruler * add implementation of '_disconnectPlot' to improve robustness * define 'format_distance' function to ease redefinition of the format to apply to the distance * remove default implemtation by the PlotWindow * add an example (overkill ?)
@vallsv are you fine with the PR ? Does it fit your needs ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to add the sample code and the RulerToolButton
to the documentation
I haven't cheak the interaction, i have not much time but if think:
I also would like to tune the line style, but i could try to do it later I also think it's not the best idea to use a ROI here, because you need a dedicated roi manager for a single roi, but if it does the job, it's fine. |
I think |
…entation is enought)
Having 'format_distance' not being a 'staticmethod' is not that straightforward sadly. using An alternative to avoid having heavy modifications is the commit '917ff73fb'. This is not very elegant but it will do the job and should allow us to extend the class as we wish. Else I guess we can also do something with metaclasses but again it will be against readability. |
Thanks for the fix. |
Changelog:
add tape measure action
screenshot