All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.gui.QImageIOPlugin Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.gui;

import io.qt.*;


/**
 * 

Defines an interface for writing an image format plugin

*

Java wrapper for Qt class QImageIOPlugin

*/ public abstract class QImageIOPlugin extends io.qt.core.QObject { static { QtJambi_LibraryUtilities.initialize(); } /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QImageIOPlugin.class); @NativeAccess private static final class ConcreteWrapper extends QImageIOPlugin { @NativeAccess private ConcreteWrapper(QPrivateConstructor p) { super(p); } @Override @QtUninvokable public io.qt.gui.QImageIOPlugin.@NonNull Capabilities capabilities(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format){ return new io.qt.gui.QImageIOPlugin.Capabilities(capabilities_native_QIODevice_ptr_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device), QtJambi_LibraryUtilities.internal.checkedNativeId(format))); } @QtUninvokable private native int capabilities_native_QIODevice_ptr_cref_QByteArray_constfct(long __this__nativeId, long device, long format); @Override @QtUninvokable public io.qt.gui.@Nullable QImageIOHandler create(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format){ return create_native_QIODevice_ptr_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device), QtJambi_LibraryUtilities.internal.checkedNativeId(format)); } @QtUninvokable private native io.qt.gui.QImageIOHandler create_native_QIODevice_ptr_cref_QByteArray_constfct(long __this__nativeId, long device, long format); } /** *

Java wrapper for Qt enum QImageIOPlugin::Capability

* * @see Capabilities */ public enum Capability implements QtFlagEnumerator { /** *

Representing QImageIOPlugin::CanRead

*/ CanRead(1), /** *

Representing QImageIOPlugin::CanWrite

*/ CanWrite(2), /** *

Representing QImageIOPlugin::CanReadIncremental

*/ CanReadIncremental(4); static { QtJambi_LibraryUtilities.initialize(); } private Capability(int value) { this.value = value; } /** * {@inheritDoc} */ @Override public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ @Override public @NonNull Capabilities asFlags() { return new Capabilities(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull Capabilities combined(@NonNull Capability 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 Capabilities cleared(@NonNull Capability e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link Capabilities} from the entries. * @param values entries * @return new flag */ public static @NonNull Capabilities flags(@Nullable Capability @NonNull... values) { return new Capabilities(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Capability resolve(int value) { switch (value) { case 1: return CanRead; case 2: return CanWrite; case 4: return CanReadIncremental; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link Capability} */ public static final class Capabilities extends QFlags implements Comparable { private static final long serialVersionUID = 0x956707b38f6e6caeL; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new Capabilities where the flags in args are set. * @param args enum entries */ public Capabilities(@Nullable Capability @NonNull... args){ super(args); } /** * Creates a new Capabilities with given value. * @param value */ public Capabilities(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new Capabilities */ @Override public final @NonNull Capabilities combined(@StrictNonNull Capability e){ return new Capabilities(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ @Override public final @NonNull Capabilities setFlag(@Nullable Capability e){ return setFlag(e, true); } /** * Sets or clears the flag flag * @param e enum entry * @param on set (true) or clear (false) * @return this */ @Override public final @NonNull Capabilities setFlag(@Nullable Capability 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 Capabilities. * @return array of enum entries */ @Override public final @NonNull Capability @NonNull[] flags(){ return super.flags(Capability.values()); } /** * {@inheritDoc} */ @Override public final @NonNull Capabilities clone(){ return new Capabilities(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull Capabilities other){ return Integer.compare(value(), other.value()); } } /** *

See QImageIOPlugin::QImageIOPlugin(QObject*)

*/ public QImageIOPlugin(io.qt.core.@Nullable QObject parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QImageIOPlugin instance, io.qt.core.QObject parent); /** *

See QImageIOPlugin::capabilities(QIODevice*,QByteArray)const

*/ @QtUninvokable public abstract io.qt.gui.QImageIOPlugin.@NonNull Capabilities capabilities(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format); @QtUninvokable private native int capabilities_native_QIODevice_ptr_cref_QByteArray_constfct(long __this__nativeId, long device, long format); /** *

See QImageIOPlugin::create(QIODevice*,QByteArray)const

*/ @QtUninvokable public abstract io.qt.gui.@Nullable QImageIOHandler create(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format); @QtUninvokable private native io.qt.gui.QImageIOHandler create_native_QIODevice_ptr_cref_QByteArray_constfct(long __this__nativeId, long device, long format); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QImageIOPlugin(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QImageIOPlugin(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QImageIOPlugin instance, QDeclarativeConstructor constructor); /** *

Overloaded constructor for {@link #QImageIOPlugin(io.qt.core.QObject)} * with parent = null.

*/ public QImageIOPlugin() { this((io.qt.core.QObject)null); } /** *

Overloaded function for {@link #capabilities(io.qt.core.QIODevice, io.qt.core.QByteArray)}.

*/ @QtUninvokable public final io.qt.gui.QImageIOPlugin.@NonNull Capabilities capabilities(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format) { return capabilities(device, new io.qt.core.QByteArray(format)); } /** *

Overloaded function for {@link #create(io.qt.core.QIODevice, io.qt.core.QByteArray)} * with format = new io.qt.core.QByteArray().

*/ @QtUninvokable public final io.qt.gui.@Nullable QImageIOHandler create(io.qt.core.@Nullable QIODevice device) { return create(device, new io.qt.core.QByteArray()); } /** *

Overloaded function for {@link #create(io.qt.core.QIODevice, io.qt.core.QByteArray)}.

*/ @QtUninvokable public final io.qt.gui.@Nullable QImageIOHandler create(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format) { return create(device, new io.qt.core.QByteArray(format)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy