Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94168

pointer handlers need both gesture-duration and accumulated properties with setters

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      This is a generalization of QTBUG-68941, to which we responded by making PinchHandler.scale be the accumulated scale (for easy binding to Item.scale), while activeScale is the value that resets to 1 each time a gesture begins. We should have followed through and done that with all such properties:

      • PinchHandler.rotation
      • PinchHandler.translation
      • DragHandler.translation

      WheelHandler.rotation is already that way. There's no activeRotation because many wheel events don't have phase: with an old-fashioned wheel mouse, we can't tell when the gesture begins and ends, so I guess activeRotation would tend to stay small (just the value from the previous or current event). But WheelHandler.rotation has a setter, and QTBUG-76379 is asking for PinchHandler.scale to have a way to reset the value.

      So we can generalize that too: each of these properties should have setters. If the UI provides more than one way to translate an item, and if you are using a handler's translation property in a binding, you need to be able to set that property when the item is moved by alternate means. Likewise with rotation.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-94168
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              srutledg Shawn Rutledge
              Reporter:
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes