io.qt.qt3d.animation.QAnimationCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qtjambi-qt3danimation Show documentation
Show all versions of qtjambi-qt3danimation Show documentation
The Qt 3D Animation modules provides a set of prebuilt elements to help you get started with Qt 3D.
package io.qt.qt3d.animation;
import io.qt.*;
/**
* Represents an animation callback object
* Java wrapper for Qt class Qt3DAnimation::QAnimationCallback
*/
public abstract class QAnimationCallback extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
@NativeAccess
private static final class ConcreteWrapper extends QAnimationCallback {
@NativeAccess
private ConcreteWrapper(QPrivateConstructor p) { super(p); }
@Override
@QtUninvokable
public void valueChanged(java.lang.Object value){
valueChanged_native_cref_QVariant(QtJambi_LibraryUtilities.internal.nativeId(this), value);
}
@QtUninvokable
private native void valueChanged_native_cref_QVariant(long __this__nativeId, java.lang.Object value);
}
/**
* Java wrapper for Qt enum Qt3DAnimation::QAnimationCallback::Flag
*
* @see Flags
*/
public enum Flag implements QtFlagEnumerator {
/**
* Representing Qt3DAnimation:: QAnimationCallback:: OnOwningThread
*/
OnOwningThread(0),
/**
* Representing Qt3DAnimation:: QAnimationCallback:: OnThreadPool
*/
OnThreadPool(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private Flag(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Create a QFlags of the enum entry.
* @return QFlags
*/
public @NonNull Flags asFlags() {
return new Flags(value);
}
/**
* Combines this entry with other enum entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Flags combined(@NonNull Flag e) {
return asFlags().setFlag(e, true);
}
/**
* Excludes other enum entry from a flag of this entry.
* @param e enum entry
* @return new flag
*/
public @NonNull Flags cleared(@NonNull Flag e) {
return asFlags().setFlag(e, false);
}
/**
* Creates a new {@link Flags} from the entries.
* @param values entries
* @return new flag
*/
public static @NonNull Flags flags(@Nullable Flag @NonNull... values) {
return new Flags(values);
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull Flag resolve(int value) {
switch (value) {
case 0: return OnOwningThread;
case 1: return OnThreadPool;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* {@link QFlags} type for enum {@link Flag}
*/
public static final class Flags extends QFlags implements Comparable {
private static final long serialVersionUID = 0x92d9bce6c929c1c6L;
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Creates a new Flags where the flags in args
are set.
* @param args enum entries
*/
public Flags(@Nullable Flag @NonNull... args){
super(args);
}
/**
* Creates a new Flags with given value
.
* @param value
*/
public Flags(int value) {
super(value);
}
/**
* Combines this flags with enum entry.
* @param e enum entry
* @return new Flags
*/
@Override
public final @NonNull Flags combined(@StrictNonNull Flag e){
return new Flags(value() | e.value());
}
/**
* Sets the flag e
* @param e enum entry
* @return this
*/
public final @NonNull Flags setFlag(@Nullable Flag e){
return setFlag(e, true);
}
/**
* Sets or clears the flag flag
* @param e enum entry
* @param on set (true) or clear (false)
* @return this
*/
public final @NonNull Flags setFlag(@Nullable Flag e, boolean on){
if (on) {
setValue(value() | e.value());
}else {
setValue(value() & ~e.value());
}
return this;
}
/**
* Returns an array of flag objects represented by this Flags.
* @return array of enum entries
*/
@Override
public final @NonNull Flag @NonNull[] flags(){
return super.flags(Flag.values());
}
/**
* {@inheritDoc}
*/
@Override
public final @NonNull Flags clone(){
return new Flags(value());
}
/**
* {@inheritDoc}
*/
@Override
public final int compareTo(@StrictNonNull Flags other){
return Integer.compare(value(), other.value());
}
}
/**
* See Qt3DAnimation::QAnimationCallback:: QAnimationCallback()
*/
public QAnimationCallback(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QAnimationCallback instance);
/**
* See Qt3DAnimation::QAnimationCallback:: valueChanged(QVariant)
*/
@QtUninvokable
public abstract void valueChanged(java.lang.Object value);
@QtUninvokable
private native void valueChanged_native_cref_QVariant(long __this__nativeId, java.lang.Object value);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QAnimationCallback(QPrivateConstructor p) { super(p); }
}