Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QAbstractAnimation class is the base of all animations. More...
Public Types | |
enum | DeletionPolicy { DeleteWhenStopped = 1, KeepWhenStopped = 0 } |
enum | Direction { Backward = 1, Forward = 0 } |
More... | |
enum | State { Paused = 1, Running = 2, Stopped = 0 } |
More... | |
Public Member Functions | |
QAbstractAnimation (QObject parent=null) | |
| |
override void | CreateProxy () |
new int | CurrentLoopTime () |
| |
abstract int | Duration () |
override bool | OnEvent (QEvent @event) |
| |
new QAnimationGroup | Group () |
| |
new void | Pause () |
| |
new void | Resume () |
| |
new void | SetPaused (bool arg1) |
| |
new void | Start (QAbstractAnimation.DeletionPolicy policy=QAbstractAnimation.DeletionPolicy.KeepWhenStopped) |
| |
new void | Stop () |
| |
new int | TotalDuration () |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QAbstractAnimation (System.Type dummy) | |
new void | OnCurrentLoopChanged (int currentLoop) |
| |
new void | OnDirectionChanged (QAbstractAnimation.Direction arg1) |
| |
new void | OnFinished () |
| |
new void | OnStateChanged (QAbstractAnimation.State newState, QAbstractAnimation.State oldState) |
| |
abstract void | UpdateCurrentTime (int currentTime) |
| |
virtual void | UpdateDirection (QAbstractAnimation.Direction direction) |
| |
virtual void | UpdateState (QAbstractAnimation.State newState, QAbstractAnimation.State oldState) |
| |
Protected Member Functions inherited from QtCore.QObject | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent arg1) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent arg1) |
| |
new void | OnDestroyed (QObject arg1=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
new QObject | Sender () |
| |
new int | SenderSignalIndex () |
| |
virtual void | OnTimerEvent (QTimerEvent arg1) |
| |
Properties | |
Slot | Finished |
| |
Slot< QAbstractAnimation.State, QAbstractAnimation.State > | StateChanged |
| |
Slot< System.Int32 > | CurrentLoopChanged |
| |
Slot < QAbstractAnimation.Direction > | DirectionChanged |
| |
new State | state [get] |
| |
new int | LoopCount [get, set] |
| |
new int | CurrentTime [get, set] |
| |
new int | CurrentLoop [get] |
| |
new Direction | direction [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQAbstractAnimationSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
Additional Inherited Members | |
Protected Attributes inherited from QtCore.QObject | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QAbstractAnimation class is the base of all animations.
The class defines the functions for the functionality shared by all animations. By inheriting this class, you can create custom animations that plug into the rest of the animation framework.
The progress of an animation is given by its current time (currentLoopTime()), which is measured in milliseconds from the start of the animation (0) to its end (duration()). The value is updated automatically while the animation is running. It can also be set directly with setCurrentTime().
At any point an animation is in one of three states: Running, Stopped, or Paused–as defined by the State enum. The current state can be changed by calling start(), stop(), pause(), or resume(). An animation will always reset its current time when it is started. If paused, it will continue with the same current time when resumed. When an animation is stopped, it cannot be resumed, but will keep its current time (until started again). QAbstractAnimation will emit stateChanged() whenever its state changes.
An animation can loop any number of times by setting the loopCount property. When an animation's current time reaches its duration(), it will reset the current time and keep running. A loop count of 1 (the default value) means that the animation will run one time. Note that a duration of -1 means that the animation will run until stopped; the current time will increase indefinitely. When the current time equals duration() and the animation is in its final loop, the Stopped state is entered, and the finished() signal is emitted.
QAbstractAnimation provides pure virtual functions used by subclasses to track the progress of the animation: duration() and updateCurrentTime(). The duration() function lets you report a duration for the animation (as discussed above). The animation framework calls updateCurrentTime() when current time has changed. By reimplementing this function, you can track the animation progress. Note that neither the interval between calls nor the number of calls to this function are defined; though, it will normally be 60 updates per second.
By reimplementing updateState(), you can track the animation's state changes, which is particularly useful for animations that are not driven by time.
See also QVariantAnimation, QPropertyAnimation, QAnimationGroup, and The Animation Framework.
This enum describes the direction of the animation when in Running state.
See also direction.
This enum describes the state of the animation.
See also state() and stateChanged().
Paused |
The animation is paused (i.e., temporarily suspended). Calling resume() will resume animation activity. |
Running |
The animation is running. While control is in the event loop, QAbstractAnimation will update its current time at regular intervals, calling updateCurrentTime() when appropriate. |
Stopped |
The animation is not running. This is the initial state of QAbstractAnimation, and the state QAbstractAnimation reenters when finished. The current time remain unchanged until either setCurrentTime() is called, or the animation is started by calling start(). |
|
protected |
QtCore.QAbstractAnimation.QAbstractAnimation | ( | QObject | parent = null | ) |
Constructs the QAbstractAnimation base class, and passes parent to QObject's constructor.
See also QVariantAnimation and QAnimationGroup.
|
virtual |
Reimplemented from QtCore.QObject.
Reimplemented in QtCore.QVariantAnimation, QtCore.QSequentialAnimationGroup, QtCore.QPropertyAnimation, QtCore.QPauseAnimation, QtCore.QParallelAnimationGroup, and QtCore.QAnimationGroup.
new int QtCore.QAbstractAnimation.CurrentLoopTime | ( | ) |
Returns the current time inside the current loop. It can go from 0 to duration().
See also duration() and currentTime.
new void QtCore.QAbstractAnimation.Dispose | ( | ) |
|
pure virtual |
new QAnimationGroup QtCore.QAbstractAnimation.Group | ( | ) |
If this animation is part of a QAnimationGroup, this function returns a pointer to the group; otherwise, it returns 0.
See also QAnimationGroup::addAnimation().
|
protected |
QAbstractAnimation emits this signal whenever the current loop changes. currentLoop is the current loop.
See also currentLoop() and loopCount().
|
protected |
QAbstractAnimation emits this signal whenever the direction has been changed. newDirection is the new direction.
See also direction.
override bool QtCore.QAbstractAnimation.OnEvent | ( | QEvent @ | event | ) |
Reimplemented from QObject::event().
|
protected |
QAbstractAnimation emits this signal after the animation has stopped and has reached the end.
This signal is emitted after stateChanged().
See also stateChanged().
|
protected |
QAbstractAnimation emits this signal whenever the state of the animation has changed from oldState to newState. This signal is emitted after the virtual updateState() function is called.
See also updateState().
new void QtCore.QAbstractAnimation.Pause | ( | ) |
new void QtCore.QAbstractAnimation.Resume | ( | ) |
Resumes the animation after it was paused. When the animation is resumed, it emits the resumed() and stateChanged() signals. The currenttime is not changed.
See also start(), pause(), and state().
new void QtCore.QAbstractAnimation.SetPaused | ( | bool | arg1 | ) |
If paused is true, the animation is paused. If paused is false, the animation is resumed.
See also state(), pause(), and resume().
new void QtCore.QAbstractAnimation.Start | ( | QAbstractAnimation.DeletionPolicy | policy = QAbstractAnimation.DeletionPolicy.KeepWhenStopped | ) |
Starts the animation. The policy argument says whether or not the animation should be deleted when it's done. When the animation starts, the stateChanged() signal is emitted, and state() returns Running. When control reaches the event loop, the animation will run by itself, periodically calling updateCurrentTime() as the animation progresses.
If the animation is currently stopped or has already reached the end, calling start() will rewind the animation and start again from the beginning. When the animation reaches the end, the animation will either stop, or if the loop level is more than 1, it will rewind and continue from the beginning.
If the animation is already running, this function does nothing.
See also stop() and state().
new void QtCore.QAbstractAnimation.Stop | ( | ) |
Stops the animation. When the animation is stopped, it emits the stateChanged() signal, and state() returns Stopped. The current time is not changed.
If the animation stops by itself after reaching the end (i.e., currentLoopTime() == duration() and currentLoop() > loopCount() - 1), the finished() signal is emitted.
See also start() and state().
new int QtCore.QAbstractAnimation.TotalDuration | ( | ) |
Returns the total and effective duration of the animation, including the loop count.
See also duration() and currentTime.
|
static |
|
static |
|
static |
|
static |
|
protectedpure virtual |
This pure virtual function is called every time the animation's currentTime changes.
See also updateState().
Implemented in QtCore.QVariantAnimation, QtCore.QSequentialAnimationGroup, QtCore.QPauseAnimation, and QtCore.QParallelAnimationGroup.
|
protectedvirtual |
This virtual function is called by QAbstractAnimation when the direction of the animation is changed. The direction argument is the new direction.
See also setDirection() and direction().
Reimplemented in QtCore.QSequentialAnimationGroup, and QtCore.QParallelAnimationGroup.
|
protectedvirtual |
This virtual function is called by QAbstractAnimation when the state of the animation is changed from oldState to newState.
See also start(), stop(), pause(), and resume().
Reimplemented in QtCore.QVariantAnimation, QtCore.QSequentialAnimationGroup, QtCore.QPropertyAnimation, and QtCore.QParallelAnimationGroup.
|
get |
This property holds the current loop of the animation.
This property describes the current loop of the animation. By default, the animation's loop count is 1, and so the current loop will always be 0. If the loop count is 2 and the animation runs past its duration, it will automatically rewind and restart at current time 0, and current loop 1, and so on.
When the current loop changes, QAbstractAnimation emits the currentLoopChanged() signal.
|
addremove |
QAbstractAnimation emits this signal whenever the current loop changes. currentLoop is the current loop.
See also currentLoop() and loopCount().
|
getset |
This property holds the current time and progress of the animation.
This property describes the animation's current time. You can change the current time by calling setCurrentTime, or you can call start() and let the animation run, setting the current time automatically as the animation progresses.
The animation's current time starts at 0, and ends at totalDuration().
|
getset |
This property holds the direction of the animation when it is in Running state.
This direction indicates whether the time moves from 0 towards the animation duration, or from the value of the duration and towards 0 after start() has been called.
By default, this property is set to Forward.
|
addremove |
QAbstractAnimation emits this signal whenever the direction has been changed. newDirection is the new direction.
See also direction.
|
getprotected |
|
addremove |
QAbstractAnimation emits this signal after the animation has stopped and has reached the end.
This signal is emitted after stateChanged().
See also stateChanged().
|
getset |
This property holds the loop count of the animation.
This property describes the loop count of the animation as an integer. By default this value is 1, indicating that the animation should run once only, and then stop. By changing it you can let the animation loop several times. With a value of 0, the animation will not run at all, and with a value of -1, the animation will loop forever until stopped. It is not supported to have loop on an animation that has an undefined duration. It will only run once.
|
get |
This property holds state of the animation.
This property describes the current state of the animation. When the animation state changes, QAbstractAnimation emits the stateChanged() signal.
|
addremove |
QAbstractAnimation emits this signal whenever the state of the animation has changed from oldState to newState. This signal is emitted after the virtual updateState() function is called.
See also updateState().
|
staticget |