Skip to content
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

ENH: Add checkBoxControlsButtonToggleState property to ctkCheckablePushButton #908

Conversation

Sunderlandkyl
Copy link
Contributor

If checkBoxControlsButtonToggleState is enabled then clicking the checkbox also makes the button pushed (for user's convenience) and unpushing the button makes it unchecked, too (to avoid the ambiguous state when the button's checkbox is checked but the button is not pressed down).

The property is disabled for now to preserve the current behavior (for backward compatibility).

Co-authored-by: Kyle Sunderland sunderlandkyl@gmail.com

Replaces #899

Copy link
Member

@jcfr jcfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the relevant test ?

Libs/Widgets/ctkCheckablePushButton.h Outdated Show resolved Hide resolved
Libs/Widgets/ctkCheckablePushButton.h Outdated Show resolved Hide resolved
Libs/Widgets/ctkCheckablePushButton.h Outdated Show resolved Hide resolved
@Sunderlandkyl Sunderlandkyl force-pushed the ctkCheckablePushButton_checkBoxControlsButtonToggleState branch 2 times, most recently from f3a7c2d to 6aefd7d Compare April 20, 2020 23:38
@Sunderlandkyl
Copy link
Contributor Author

Thanks @jcfr. Comments addressed and test updated.

Copy link
Member

@lassoan lassoan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, thanks a lot Kyle, I've just added a minor suggestion for documentation (I am not completely sure that it is correct, so please confirm).

Libs/Widgets/ctkCheckablePushButton.h Outdated Show resolved Hide resolved
…shButton

If checkBoxControlsButtonToggleState is enabled then clicking the checkbox also makes the button pushed (for user's convenience) and unpushing the button makes it unchecked, too (to avoid the ambiguous state when the button's checkbox is checked but the button is not pressed down).

The property is disabled for now to preserve the current behavior (for backward compatibility).

Co-authored-by: Kyle Sunderland <sunderlandkyl@gmail.com>
@Sunderlandkyl Sunderlandkyl force-pushed the ctkCheckablePushButton_checkBoxControlsButtonToggleState branch from 6aefd7d to fadf76b Compare April 21, 2020 00:21
@jcfr jcfr merged commit 33286e5 into commontk:master Apr 21, 2020
@Sunderlandkyl Sunderlandkyl deleted the ctkCheckablePushButton_checkBoxControlsButtonToggleState branch April 21, 2020 02:08
jcfr pushed a commit to Slicer/Slicer that referenced this pull request Apr 21, 2020
List of changes:

```
$ git shortlog 27bc11d..8ec9136
Jean-Christophe Fillion-Robin (1):
      COMP: Fix Qt4 build adding fallback implementation for qUtf8Printable() (commontk/CTK#909)

Kyle Sunderland (1):
      ENH: Add checkBoxControlsButtonToggleState property to ctkCheckablePushButton (commontk/CTK#908)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants