[Ctk-developers] ctkSliderWidget, ctkDoubleSlider and ctkDoubleSpinBox invertedControls property

Miklos Espak espakm at gmail.com
Thu May 2 17:34:31 EDT 2013


Hi Julien,

I added an invertedAppearance an invertedControls property to the
ctkDoubleSlider and ctkSliderWidget classes.

The QSlider has already these properties, so most of the code is just
delegation. The QDoubleSpinBox, that was used internally by
ctkSliderWidget, however, does not have an invertedControls property.

So, I derived a ctkDoubleSpinBox from QDoubleSpinBox to implement this
feature. Then, I replaced the spin box of the slider widget from the
Qt one to this one.

All works fine, but I cannot send a pull request, because somebody
else has also replaced the spin box of the sliderwidget with a custom
class (ctkSpinBox), recently.

I pushed my tweak to our fork here:

https://github.com/NifTK/CTK/commit/f1a2e0e62e1c6285810c84685ca945675e9e16fd

Branch name: slider-inverted-properties

Qt has a separate QSpinBox and QDoubleSpinBox class, but as I see, the
ctkSpinBox is already for doubles. I do not know what would be the
best way to resolve this conflict.

Could you please review the change and merge it if you agree?

Thank you,
Miklos



More information about the Ctk-developers mailing list