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

Add a BindProperty transformation for boolean Not #413

Merged
merged 3 commits into from
Nov 30, 2014

Conversation

ywwg
Copy link
Member

@ywwg ywwg commented Nov 30, 2014

trying again

}

double transformInverse(double argument) const {
return !argument;
Copy link
Member

Choose a reason for hiding this comment

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

You know how much I love implicit conversion to booleans :P.

@rryan
Copy link
Member

rryan commented Nov 30, 2014

This isn't a bijection so it kind of screws with the concept of the transformer. If you used this on a non-bindproperty connection then it would mess up two-way connections. So-far that's why I've hesitated to do something like this.

@rryan
Copy link
Member

rryan commented Nov 30, 2014

The cases where the reversibility matters are mostly imagined so nevermind :).

ywwg added a commit that referenced this pull request Nov 30, 2014
Add a BindProperty transformation for boolean Not
@ywwg ywwg merged commit a28e19b into mixxxdj:master Nov 30, 2014
@daschuer
Copy link
Member

I think the normal ! operator does not work here, since we use > 0 as true inside Mixxx
See

if (property.type() == QVariant::Bool) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants