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

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

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

import io.qt.*;


/**
 * 

Defines the common image I/O interface for all image formats in Qt

*

Java wrapper for Qt class QImageIOHandler

*/ public abstract class QImageIOHandler extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } @QtPropertyMember(enabled=false) private Object __rcDevice = null; @NativeAccess private static final class ConcreteWrapper extends QImageIOHandler { @NativeAccess private ConcreteWrapper(QPrivateConstructor p) { super(p); } @Override @QtUninvokable public boolean canRead(){ return canRead_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean canRead_native_constfct(long __this__nativeId); @Override @QtUninvokable public io.qt.gui.@Nullable QImage read(){ return read_native_QImage_ptr(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.gui.@Nullable QImage read_native_QImage_ptr(long __this__nativeId); } /** *

Java wrapper for Qt enum QImageIOHandler::ImageOption

*/ public enum ImageOption implements QtEnumerator { /** *

Representing QImageIOHandler::Size

*/ Size(0), /** *

Representing QImageIOHandler::ClipRect

*/ ClipRect(1), /** *

Representing QImageIOHandler::Description

*/ Description(2), /** *

Representing QImageIOHandler::ScaledClipRect

*/ ScaledClipRect(3), /** *

Representing QImageIOHandler::ScaledSize

*/ ScaledSize(4), /** *

Representing QImageIOHandler::CompressionRatio

*/ CompressionRatio(5), /** *

Representing QImageIOHandler::Gamma

*/ Gamma(6), /** *

Representing QImageIOHandler::Quality

*/ Quality(7), /** *

Representing QImageIOHandler::Name

*/ Name(8), /** *

Representing QImageIOHandler::SubType

*/ SubType(9), /** *

Representing QImageIOHandler::IncrementalReading

*/ IncrementalReading(10), /** *

Representing QImageIOHandler::Endianness

*/ Endianness(11), /** *

Representing QImageIOHandler::Animation

*/ Animation(12), /** *

Representing QImageIOHandler::BackgroundColor

*/ BackgroundColor(13), /** *

Representing QImageIOHandler::ImageFormat

*/ ImageFormat(14), /** *

Representing QImageIOHandler::SupportedSubTypes

*/ SupportedSubTypes(15), /** *

Representing QImageIOHandler::OptimizedWrite

*/ OptimizedWrite(16), /** *

Representing QImageIOHandler::ProgressiveScanWrite

*/ ProgressiveScanWrite(17), /** *

Representing QImageIOHandler::ImageTransformation

*/ ImageTransformation(18); static { QtJambi_LibraryUtilities.initialize(); } private ImageOption(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 ImageOption resolve(int value) { switch (value) { case 0: return Size; case 1: return ClipRect; case 2: return Description; case 3: return ScaledClipRect; case 4: return ScaledSize; case 5: return CompressionRatio; case 6: return Gamma; case 7: return Quality; case 8: return Name; case 9: return SubType; case 10: return IncrementalReading; case 11: return Endianness; case 12: return Animation; case 13: return BackgroundColor; case 14: return ImageFormat; case 15: return SupportedSubTypes; case 16: return OptimizedWrite; case 17: return ProgressiveScanWrite; case 18: return ImageTransformation; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QImageIOHandler::Transformation

* * @see Transformations */ public enum Transformation implements QtFlagEnumerator { /** *

Representing QImageIOHandler::TransformationNone

*/ TransformationNone(0), /** *

Representing QImageIOHandler::TransformationMirror

*/ TransformationMirror(1), /** *

Representing QImageIOHandler::TransformationFlip

*/ TransformationFlip(2), /** *

Representing QImageIOHandler::TransformationRotate180

*/ TransformationRotate180(3), /** *

Representing QImageIOHandler::TransformationRotate90

*/ TransformationRotate90(4), /** *

Representing QImageIOHandler::TransformationMirrorAndRotate90

*/ TransformationMirrorAndRotate90(5), /** *

Representing QImageIOHandler::TransformationFlipAndRotate90

*/ TransformationFlipAndRotate90(6), /** *

Representing QImageIOHandler::TransformationRotate270

*/ TransformationRotate270(7); static { QtJambi_LibraryUtilities.initialize(); } private Transformation(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull Transformations asFlags() { return new Transformations(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull Transformations combined(@NonNull Transformation 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 Transformations cleared(@NonNull Transformation e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link Transformations} from the entries. * @param values entries * @return new flag */ public static @NonNull Transformations flags(@Nullable Transformation @NonNull... values) { return new Transformations(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Transformation resolve(int value) { switch (value) { case 0: return TransformationNone; case 1: return TransformationMirror; case 2: return TransformationFlip; case 3: return TransformationRotate180; case 4: return TransformationRotate90; case 5: return TransformationMirrorAndRotate90; case 6: return TransformationFlipAndRotate90; case 7: return TransformationRotate270; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link Transformation} */ public static final class Transformations extends QFlags implements Comparable { private static final long serialVersionUID = 0x15d7fab4012afec4L; static { QtJambi_LibraryUtilities.initialize(); } /** * Creates a new Transformations where the flags in args are set. * @param args enum entries */ public Transformations(@Nullable Transformation @NonNull... args){ super(args); } /** * Creates a new Transformations with given value. * @param value */ public Transformations(int value) { super(value); } /** * Combines this flags with enum entry. * @param e enum entry * @return new Transformations */ @Override public final @NonNull Transformations combined(@StrictNonNull Transformation e){ return new Transformations(value() | e.value()); } /** * Sets the flag e * @param e enum entry * @return this */ public final @NonNull Transformations setFlag(@Nullable Transformation 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 Transformations setFlag(@Nullable Transformation 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 Transformations. * @return array of enum entries */ @Override public final @NonNull Transformation @NonNull[] flags(){ return super.flags(Transformation.values()); } /** * {@inheritDoc} */ @Override public final @NonNull Transformations clone(){ return new Transformations(value()); } /** * {@inheritDoc} */ @Override public final int compareTo(@StrictNonNull Transformations other){ return Integer.compare(value(), other.value()); } } /** *

See QImageIOHandler::QImageIOHandler()

*/ public QImageIOHandler(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QImageIOHandler instance); /** *

See QImageIOHandler::device()const

*/ @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); /** *

See QImageIOHandler::format()const

*/ @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); /** *

See QImageIOHandler::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 QImageIOHandler::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); /** *

See QImageIOHandler::canRead()const

*/ @QtUninvokable public abstract boolean canRead(); @QtUninvokable private native boolean canRead_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::currentImageNumber()const

*/ @QtUninvokable public int currentImageNumber(){ return currentImageNumber_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int currentImageNumber_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::currentImageRect()const

*/ @QtUninvokable public io.qt.core.@NonNull QRect currentImageRect(){ return currentImageRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QRect currentImageRect_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::imageCount()const

*/ @QtUninvokable public int imageCount(){ return imageCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int imageCount_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::jumpToImage(int)

*/ @QtUninvokable public boolean jumpToImage(int imageNumber){ return jumpToImage_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), imageNumber); } @QtUninvokable private native boolean jumpToImage_native_int(long __this__nativeId, int imageNumber); /** *

See QImageIOHandler::jumpToNextImage()

*/ @QtUninvokable public boolean jumpToNextImage(){ return jumpToNextImage_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native boolean jumpToNextImage_native(long __this__nativeId); /** *

See QImageIOHandler::loopCount()const

*/ @QtUninvokable public int loopCount(){ return loopCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int loopCount_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::nextImageDelay()const

*/ @QtUninvokable public int nextImageDelay(){ return nextImageDelay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native int nextImageDelay_native_constfct(long __this__nativeId); /** *

See QImageIOHandler::option(QImageIOHandler::ImageOption)const

*/ @QtUninvokable public java.lang.Object option(io.qt.gui.QImageIOHandler.@NonNull ImageOption option){ return option_native_QImageIOHandler_ImageOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), option.value()); } @QtUninvokable private native java.lang.Object option_native_QImageIOHandler_ImageOption_constfct(long __this__nativeId, int option); /** *

See QImageIOHandler::read(QImage*)

*/ @QtUninvokable public abstract io.qt.gui.@Nullable QImage read(); @QtUninvokable private native io.qt.gui.@Nullable QImage read_native_QImage_ptr(long __this__nativeId); /** *

See QImageIOHandler::setOption(QImageIOHandler::ImageOption,QVariant)

*/ @QtUninvokable public void setOption(io.qt.gui.QImageIOHandler.@NonNull ImageOption option, java.lang.Object value){ setOption_native_QImageIOHandler_ImageOption_cref_QVariant(QtJambi_LibraryUtilities.internal.nativeId(this), option.value(), value); } @QtUninvokable private native void setOption_native_QImageIOHandler_ImageOption_cref_QVariant(long __this__nativeId, int option, java.lang.Object value); /** *

See QImageIOHandler::supportsOption(QImageIOHandler::ImageOption)const

*/ @QtUninvokable public boolean supportsOption(io.qt.gui.QImageIOHandler.@NonNull ImageOption option){ return supportsOption_native_QImageIOHandler_ImageOption_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), option.value()); } @QtUninvokable private native boolean supportsOption_native_QImageIOHandler_ImageOption_constfct(long __this__nativeId, int option); /** *

See QImageIOHandler::write(QImage)

*/ @QtUninvokable public boolean write(io.qt.gui.@NonNull QImage image){ return write_native_cref_QImage(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(image)); } @QtUninvokable private native boolean write_native_cref_QImage(long __this__nativeId, long image); /** *

See QImageIOHandler::allocateImage(QSize,QImage::Format,QImage*)

*/ public static boolean allocateImage(io.qt.core.@NonNull QSize size, io.qt.gui.QImage.@NonNull Format format, io.qt.gui.@Nullable QImage image){ return allocateImage_native_QSize_QImage_Format_QImage_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(size), format.value(), QtJambi_LibraryUtilities.internal.checkedNativeId(image)); } private native static boolean allocateImage_native_QSize_QImage_Format_QImage_ptr(long size, int format, long image); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QImageIOHandler(QPrivateConstructor p) { super(p); } /** * @see #allocateImage(io.qt.core.QSize, io.qt.gui.QImage.Format, io.qt.gui.QImage) */ public static [email protected] QImage allocateImage([email protected] QSize size, [email protected] Format format){ io.qt.gui.QImage im = new io.qt.gui.QImage(); if(allocateImage(size, format, im)) return im; else return null; } /** *

Overloaded function for {@link #setFormat(io.qt.core.QByteArray)}.

*/ @QtUninvokable public final void setFormat(byte @NonNull[] format) { setFormat(new io.qt.core.QByteArray(format)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy