io.qt.gui.QMovie Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Convenience class for playing movies with QImageReader
* Java wrapper for Qt class QMovie
*/
public class QMovie extends io.qt.core.QObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
@QtPropertyMember(enabled=false)
private Object __rcDevice = null;
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QMovie.class);
/**
* Java wrapper for Qt enum QMovie::CacheMode
*/
public enum CacheMode implements QtEnumerator {
/**
* Representing QMovie:: CacheNone
*/
CacheNone(0),
/**
* Representing QMovie:: CacheAll
*/
CacheAll(1);
static {
QtJambi_LibraryUtilities.initialize();
}
private CacheMode(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull CacheMode resolve(int value) {
switch (value) {
case 0: return CacheNone;
case 1: return CacheAll;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QMovie::MovieState
*/
public enum MovieState implements QtEnumerator {
/**
* Representing QMovie:: NotRunning
*/
NotRunning(0),
/**
* Representing QMovie:: Paused
*/
Paused(1),
/**
* Representing QMovie:: Running
*/
Running(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private MovieState(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull MovieState resolve(int value) {
switch (value) {
case 0: return NotRunning;
case 1: return Paused;
case 2: return Running;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QMovie:: error(QImageReader::ImageReaderError)
*/
public final @NonNull Signal1 error = new Signal1<>();
/**
*
*/
public final @NonNull Signal0 finished = new Signal0();
/**
*
*/
public final @NonNull Signal1 frameChanged = new Signal1<>();
/**
*
*/
public final @NonNull Signal1 resized = new Signal1<>();
/**
*
*/
public final @NonNull Signal0 started = new Signal0();
/**
* See QMovie:: stateChanged(QMovie::MovieState)
*/
public final @NonNull Signal1 stateChanged = new Signal1<>();
/**
*
*/
public final @NonNull Signal1 updated = new Signal1<>();
/**
* See QMovie:: QMovie(QIODevice*, QByteArray, QObject*)
*/
public QMovie(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, device, format, parent);
__rcDevice = device;
}
private native static void initialize_native(QMovie instance, io.qt.core.QIODevice device, io.qt.core.QByteArray format, io.qt.core.QObject parent);
/**
*
*/
public QMovie(io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, parent);
}
private native static void initialize_native(QMovie instance, io.qt.core.QObject parent);
/**
* See QMovie:: QMovie(QString, QByteArray, QObject*)
*/
public QMovie(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray format, io.qt.core.@Nullable QObject parent){
super((QPrivateConstructor)null);
initialize_native(this, fileName, format, parent);
}
private native static void initialize_native(QMovie instance, java.lang.String fileName, io.qt.core.QByteArray format, io.qt.core.QObject parent);
/**
* See QMovie:: backgroundColor()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QColor backgroundColor(){
return backgroundColor_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QColor backgroundColor_native_constfct(long __this__nativeId);
/**
* See QMovie:: bindableCacheMode()
*/
@QtPropertyBindable(name="cacheMode")
@QtUninvokable
public final io.qt.core.@NonNull QBindable bindableCacheMode(){
return bindableCacheMode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QBindable bindableCacheMode_native(long __this__nativeId);
/**
*
*/
@QtPropertyBindable(name="speed")
@QtUninvokable
public final io.qt.core.@NonNull QIntBindable bindableSpeed(){
return bindableSpeed_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QIntBindable bindableSpeed_native(long __this__nativeId);
/**
* See QMovie:: currentFrameNumber()const
*/
@QtUninvokable
public final int currentFrameNumber(){
return currentFrameNumber_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int currentFrameNumber_native_constfct(long __this__nativeId);
/**
* See QMovie:: currentImage()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QImage currentImage(){
return currentImage_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QImage currentImage_native_constfct(long __this__nativeId);
/**
* See QMovie:: currentPixmap()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QPixmap currentPixmap(){
return currentPixmap_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QPixmap currentPixmap_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@Nullable QIODevice device(){
return device_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QIODevice device_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final java.lang.@NonNull String fileName(){
return fileName_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String fileName_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QByteArray format(){
return format_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QByteArray format_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int frameCount(){
return frameCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int frameCount_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QRect frameRect(){
return frameRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRect frameRect_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final boolean isValid(){
return isValid_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isValid_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final boolean jumpToFrame(int frameNumber){
return jumpToFrame_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), frameNumber);
}
@QtUninvokable
private native boolean jumpToFrame_native_int(long __this__nativeId, int frameNumber);
/**
*
*/
public final boolean jumpToNextFrame(){
return jumpToNextFrame_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native boolean jumpToNextFrame_native(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.QImageReader.@NonNull ImageReaderError lastError(){
return io.qt.gui.QImageReader.ImageReaderError.resolve(lastError_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int lastError_native_constfct(long __this__nativeId);
/**
* See QMovie:: lastErrorString()const
*/
@QtUninvokable
public final java.lang.@NonNull String lastErrorString(){
return lastErrorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native java.lang.String lastErrorString_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final int loopCount(){
return loopCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int loopCount_native_constfct(long __this__nativeId);
/**
* See QMovie:: nextFrameDelay()const
*/
@QtUninvokable
public final int nextFrameDelay(){
return nextFrameDelay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int nextFrameDelay_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QSize scaledSize(){
return scaledSize_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize scaledSize_native(long __this__nativeId);
/**
* See QMovie:: setBackgroundColor(QColor)
*/
@QtUninvokable
public final void setBackgroundColor(io.qt.gui.@NonNull QColor color){
setBackgroundColor_native_cref_QColor(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(color));
}
@QtUninvokable
private native void setBackgroundColor_native_cref_QColor(long __this__nativeId, long color);
/**
* See QMovie:: setCacheMode(QMovie::CacheMode)
*/
@QtPropertyWriter(name="cacheMode")
@QtUninvokable
public final void setCacheMode(io.qt.gui.QMovie.@NonNull CacheMode mode){
setCacheMode_native_QMovie_CacheMode(QtJambi_LibraryUtilities.internal.nativeId(this), mode.value());
}
@QtUninvokable
private native void setCacheMode_native_QMovie_CacheMode(long __this__nativeId, int mode);
/**
* See QMovie:: setDevice(QIODevice*)
*/
@QtUninvokable
public final void setDevice(io.qt.core.@Nullable QIODevice device){
setDevice_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device));
__rcDevice = device;
}
@QtUninvokable
private native void setDevice_native_QIODevice_ptr(long __this__nativeId, long device);
/**
* See QMovie:: setFileName(QString)
*/
@QtUninvokable
public final void setFileName(java.lang.@NonNull String fileName){
setFileName_native_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), fileName);
}
@QtUninvokable
private native void setFileName_native_cref_QString(long __this__nativeId, java.lang.String fileName);
/**
* See QMovie:: setFormat(QByteArray)
*/
@QtUninvokable
public final void setFormat(io.qt.core.@NonNull QByteArray format){
setFormat_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(format));
}
@QtUninvokable
private native void setFormat_native_cref_QByteArray(long __this__nativeId, long format);
/**
*
*/
public final void setPaused(boolean paused){
setPaused_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), paused);
}
private native void setPaused_native_bool(long __this__nativeId, boolean paused);
/**
* See QMovie:: setScaledSize(QSize)
*/
@QtUninvokable
public final void setScaledSize(io.qt.core.@NonNull QSize size){
setScaledSize_native_cref_QSize(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(size));
}
@QtUninvokable
private native void setScaledSize_native_cref_QSize(long __this__nativeId, long size);
/**
*
*/
@QtPropertyWriter(name="speed")
public final void setSpeed(int percentSpeed){
setSpeed_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), percentSpeed);
}
private native void setSpeed_native_int(long __this__nativeId, int percentSpeed);
/**
*
*/
@QtPropertyReader(name="speed")
@QtUninvokable
public final int speed(){
return speed_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int speed_native_constfct(long __this__nativeId);
/**
* See QMovie:: start()
*/
public final void start(){
start_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void start_native(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.gui.QMovie.@NonNull MovieState state(){
return io.qt.gui.QMovie.MovieState.resolve(state_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int state_native_constfct(long __this__nativeId);
/**
* See QMovie:: stop()
*/
public final void stop(){
stop_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private native void stop_native(long __this__nativeId);
/**
* See QMovie:: supportedFormats()
*/
public native static io.qt.core.@NonNull QList supportedFormats();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QMovie(QPrivateConstructor p) { super(p); }
/**
* Constructor for internal use only.
* It is not allowed to call the declarative constructor from inside Java.
* @hidden
*/
@NativeAccess
protected QMovie(QDeclarativeConstructor constructor) {
super((QPrivateConstructor)null);
initialize_native(this, constructor);
}
@QtUninvokable
private static native void initialize_native(QMovie instance, QDeclarativeConstructor constructor);
/**
* Overloaded constructor for {@link #QMovie(io.qt.core.QIODevice, io.qt.core.QByteArray, io.qt.core.QObject)}
* with parent = null
.
*/
public QMovie(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format) {
this(device, format, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(io.qt.core.QIODevice, io.qt.core.QByteArray, io.qt.core.QObject)}
* with:
* format = new io.qt.core.QByteArray()
* parent = null
*
*/
public QMovie(io.qt.core.@Nullable QIODevice device) {
this(device, new io.qt.core.QByteArray(), (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(io.qt.core.QIODevice, byte[], io.qt.core.QObject)}
* with parent = null
.
*/
public QMovie(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format) {
this(device, format, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(io.qt.core.QIODevice, io.qt.core.QByteArray, io.qt.core.QObject)}.
*/
public QMovie(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format, io.qt.core.@Nullable QObject parent) {
this(device, new io.qt.core.QByteArray(format), parent);
}
/**
* Overloaded constructor for {@link #QMovie(io.qt.core.QObject)}
* with parent = null
.
*/
public QMovie() {
this((io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(java.lang.String, io.qt.core.QByteArray, io.qt.core.QObject)}
* with parent = null
.
*/
public QMovie(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray format) {
this(fileName, format, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(java.lang.String, io.qt.core.QByteArray, io.qt.core.QObject)}
* with:
* format = new io.qt.core.QByteArray()
* parent = null
*
*/
public QMovie(java.lang.@NonNull String fileName) {
this(fileName, new io.qt.core.QByteArray(), (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(java.lang.String, byte[], io.qt.core.QObject)}
* with parent = null
.
*/
public QMovie(java.lang.@NonNull String fileName, byte @NonNull[] format) {
this(fileName, format, (io.qt.core.QObject)null);
}
/**
* Overloaded constructor for {@link #QMovie(java.lang.String, io.qt.core.QByteArray, io.qt.core.QObject)}.
*/
public QMovie(java.lang.@NonNull String fileName, byte @NonNull[] format, io.qt.core.@Nullable QObject parent) {
this(fileName, new io.qt.core.QByteArray(format), parent);
}
/**
* Overloaded function for {@link #setBackgroundColor(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final void setBackgroundColor(io.qt.core.Qt.@NonNull GlobalColor color) {
setBackgroundColor(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #setBackgroundColor(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final void setBackgroundColor(io.qt.gui.@NonNull QRgba64 color) {
setBackgroundColor(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #setBackgroundColor(io.qt.gui.QColor)}.
*/
@QtUninvokable
public final void setBackgroundColor(java.lang.@NonNull String color) {
setBackgroundColor(new io.qt.gui.QColor(color));
}
/**
* Overloaded function for {@link #setFormat(io.qt.core.QByteArray)}.
*/
@QtUninvokable
public final void setFormat(byte @NonNull[] format) {
setFormat(new io.qt.core.QByteArray(format));
}
/**
* @hidden
* Kotlin property getter. In Java use {@link #speed()} instead.
*/
@QtPropertyReader(enabled=false)
@QtUninvokable
public final int getSpeed() {
return speed();
}
}