-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add QskTickmarksMetrics / QskGraduationMetrics #347
Conversation
src/nodes/QskTickmarksMetrics.h
Outdated
qreal m_minorRatio = 0.7; | ||
qreal m_mediumRatio = 0.85; | ||
qreal m_majorRatio = 1.0; | ||
}; |
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.
@uwerat I was thinking about adding Qt::SizeMode
but this would need more adaptions in the QskTickmarksNode
. What do you think?
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.
Guess setting the length of the ticks as absolute values ( pixels/dp ) is what a user usually want to do.
IIRC the current implementation relates the tick lengths to a metric, that is given as a skin hint. IMHO this does not make much sense anymore as QskTickmarksMetrics allows to pass the tick lengths as skin hint instead.
Guess QskTickmarkMetrics should be usable as skin hint: a) some boilerplate code to make it usable with QVariant ( see qskRegisterIntervalF as an example ) |
Please note that I have been working on the tickmarks in the features/plots branch some time ago. I'm not 100% happy yet with what you find there, but it is much closer to the final result than what you find in master. ( f.e there is a QskScaleRenderer - no QskTickmarksNode anymore ). Please split this merge request into a part that implements QskTickmarksMetrics and another that is using it. Then I can adjust features/plots also using it. |
Please add:
|
I would like to extend the concept of QskTickmarksMetrics to something, where you can configure more metrics of a scale. Having the lengths of the ticks is good enough for the first step, but I would like to start with a different terminology so that additional values can be added later without breaking the meaning of the class name. Unfortunately the term "scale" is heavily used in the context of transformations and "axis" might be a bit too specific for coordinate systems. But there seems to be another good one: "graduation" ( https://en.wikipedia.org/wiki/Graduation_(scale) ) So please rename QskTickmarksMetrics to QskGraduationMetrics. |
QskGraduationMetrics is in master now |
Motivation: Just recently again I needed to be able to style the linear tickmarks sizes for all types (minor, medium, major), therefore here a suggestion of how to make them configurable with the current proportional behavior.
Advantages