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

BoundaryRule: add a finished signal or notifying property to trigger QML when it's "done"

    XMLWordPrintable

Details

    • 7673a4d117 (qt/qtdeclarative/dev) 7673a4d117 (qt/tqtc-qtdeclarative/dev)

    Description

      When multiple handlers can drive behavior in multiple ways (e.g. maybe a PinchHandler and a WheelHandler can both be used to change the scale), and a BoundaryRule is used to enforce limits, if minimum/maximumOvershoot properties are set, the BoundaryRule will animate the target property back into range after the handlers are done manipulating it.

      If we apply this combination to rescaling an image (as in QtPDF, or as in qtdeclarative/examples/quick/pointerhandlers/map.qml), we need to know when to do the re-rendering. If the handlers stay within the range that BoundaryRule allows, the image can be re-rendered when the active handler is deactivated; but if the BoundaryRule limits the scale property and allows overshoot, the image re-rendering should perhaps wait until the returnDuration has expired, so that we are sure the scale property is constrained to the maximum or minimum. Otherwise, it becomes possible to "bump" the image rendering size repeatedly beyond the intended limit, by overshooting, because at the moment that the handler is deactivated, the image.scale is beyond the limit that the BoundaryRule is trying to enforce; so that's not a good value to use for re-rendering.

      There may be other such cases, not only for image scaling. Anything that needs to be done conditionally whenever the property is no longer being adjusted and the BoundaryRule is satisfied... so maybe a notifying property to find out whether it's satisfied would be good. Either we can call it something like that (satisfied, inRange, enforced, ...) or well maybe currentOvershoot is good enough... needs investigation.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes