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

Julien Finet julien.finet at kitware.com
Thu May 2 19:12:21 EDT 2013


Hi Miklos,

We recently added ctkSpinBox to further extend QDoubleBox.
In order to have only 1 class to maintain, we decided to have only 1 class
in CTK for spinboxes (therefore ctkSpinBox instead of ctkDoubleSpinBox).
ctkSpinBox could behave as a QSpinBox if the number of decimals is 0.
However I realize it might lead to some issues.

Anyway, I don't think it is incompatible with your change. All you have to
do is to add the invertedControls and invertedAppearance properties to
ctkSpinBox. Then you should be able to make a pull request.

Thanks,
Julien.



On Thu, May 2, 2013 at 5:34 PM, Miklos Espak <espakm at gmail.com> wrote:

> 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
> _______________________________________________
> Ctk-developers mailing list
> Ctk-developers at commontk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20130502/19971b79/attachment.html>


More information about the Ctk-developers mailing list