Commit graph

4 commits

Author SHA1 Message Date
Thomas Lübking
77bcadc5b4 export AnimationEffect::set and ::cancel to script
Also harmonize script parsing - any combination of animationarray
and global animation setting that results in a valid animation is
possible using the global settings as default on the array values

REVIEW: 109212
2013-03-28 19:47:30 +01:00
Martin Gräßlin
85d2f1cb61 Export QEasingCurve to scripted Effects
That allows reference QEasingCurve::Type to be used in the animate
functions.

REVIEW: 107265
2012-11-24 10:19:59 +01:00
Martin Gräßlin
7ad25b663e Adding more declarative way to animate a window in JavaScript
The current API call to animate a window does not feel very JavaScripty.
Therefore a new method "animate" is added to the global scope, which
takes a JavaScript object of the following structure:

{
    window: EffectWindow, /* the window to animate, required */
    duration: int, /* duration in msec, required */
    curve: QEasingCurve.Type, /* global easing curve, optional */
    type: Effect.Attribute, /* for first animation, optional */
    from: FPx2, /* for first animation, optional */
    to: FPx2, /* for first animation, optional */
    delay: int, /* for first animation, optional */
    animations: [ /* additional animations, optional */
        {
        curve: QEasingCurve.Type, /* overrides global */
        type: Effect.Attribute,
        from: FPx2,
        to: FPx2,
        delay: int
        }
    ]
}

At least one animation needs to be specified either on the root level
or in the array of animations. Curve is the only property on root level
which is used in the animations, if not provided.

REVIEW: 107079
2012-11-09 08:05:02 +01:00
Martin Gräßlin
550ac7d2b0 Documentation for global methods and properties of scripted effects
Using Doxygen xml structure which can be converted to MediaWiki using
the xslt from git repo scratch/graesslin/kwin-scripting-api-generator.git
2012-10-28 10:06:00 +01:00