
QColorRampEditor
Source (link to git-repo or to original if based on someone elses unmodified work):
Description:
Use it for any kind of image visualization and color table manipulation.
Ratings, comments and feature requests are wellcome. Last changelog:
Ratings, comments and feature requests are wellcome.
1.4
* Qt5 support in Example
* Fix color setting round error
1.3
* Complete new code
* Add vertical support
* Add value visualization
* Remove normalization
1.2
* normalize ramp input
1.1
* fix delete emit
* get a colortable
* slide move update
* example
1.0
* init release
Ratings & Comments
5 Comments
Very nice widget
Really like this, thank you. One issue is that when I try to use setRamp() (with data I previously got from getRamp()) the layout of the sliders is all wrong.
The ramp is normalized now between 0 and 1, when setting it. But I could not verify your issue.
I tried the latest version but the issue remained for me. I fixed it with the following changes: Quote:
127: qreal pos = ramp[i].first * crec.width();
128: QRect geo(crec.left()-4 + pos, crec.bottom()+2, 9, 16);
I also had to add an 'update()' just before the 'emit rampChanged();' to get the widget to show the new ramp.
Now it works perfectly!
Looks nice :)