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

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

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

import io.qt.*;


/**
 * 

Format independent interface for writing images to files or other devices

*

Java wrapper for Qt class QImageWriter

*/ public class QImageWriter extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } @QtPropertyMember(enabled=false) private Object __rcDevice = null; /** *

Java wrapper for Qt enum QImageWriter::ImageWriterError

*/ public enum ImageWriterError implements QtEnumerator { /** *

Representing QImageWriter::UnknownError

*/ UnknownError(0), /** *

Representing QImageWriter::DeviceError

*/ DeviceError(1), /** *

Representing QImageWriter::UnsupportedFormatError

*/ UnsupportedFormatError(2), /** *

Representing QImageWriter::InvalidImageError

*/ InvalidImageError(3); static { QtJambi_LibraryUtilities.initialize(); } private ImageWriterError(int value) { this.value = value; } /** * {@inheritDoc} */ @Override public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull ImageWriterError resolve(int value) { switch (value) { case 0: return UnknownError; case 1: return DeviceError; case 2: return UnsupportedFormatError; case 3: return InvalidImageError; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QImageWriter::QImageWriter()

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

See QImageWriter::QImageWriter(QIODevice*,QByteArray)

*/ public QImageWriter(io.qt.core.@Nullable QIODevice device, io.qt.core.@NonNull QByteArray format){ super((QPrivateConstructor)null); initialize_native(this, device, format); } private native static void initialize_native(QImageWriter instance, io.qt.core.QIODevice device, io.qt.core.QByteArray format); /** *

See QImageWriter::QImageWriter(QString,QByteArray)

*/ public QImageWriter(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray format){ super((QPrivateConstructor)null); initialize_native(this, fileName, format); } private native static void initialize_native(QImageWriter instance, java.lang.String fileName, io.qt.core.QByteArray format); /** *

See QImageWriter::canWrite()const

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

See QImageWriter::compression()const

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

See QImageWriter::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 QImageWriter::error()const

*/ @QtUninvokable public final io.qt.gui.QImageWriter.@NonNull ImageWriterError error(){ return io.qt.gui.QImageWriter.ImageWriterError.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int error_native_constfct(long __this__nativeId); /** *

See QImageWriter::errorString()const

*/ @QtUninvokable public final java.lang.@NonNull String errorString(){ return errorString_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native java.lang.String errorString_native_constfct(long __this__nativeId); /** *

See QImageWriter::fileName()const

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

See QImageWriter::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 QImageWriter::optimizedWrite()const

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

See QImageWriter::progressiveScanWrite()const

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

See QImageWriter::quality()const

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

See QImageWriter::setCompression(int)

*/ @QtUninvokable public final void setCompression(int compression){ setCompression_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), compression); } @QtUninvokable private native void setCompression_native_int(long __this__nativeId, int compression); /** *

See QImageWriter::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 QImageWriter::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 QImageWriter::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 QImageWriter::setOptimizedWrite(bool)

*/ @QtUninvokable public final void setOptimizedWrite(boolean optimize){ setOptimizedWrite_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), optimize); } @QtUninvokable private native void setOptimizedWrite_native_bool(long __this__nativeId, boolean optimize); /** *

See QImageWriter::setProgressiveScanWrite(bool)

*/ @QtUninvokable public final void setProgressiveScanWrite(boolean progressive){ setProgressiveScanWrite_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), progressive); } @QtUninvokable private native void setProgressiveScanWrite_native_bool(long __this__nativeId, boolean progressive); /** *

See QImageWriter::setQuality(int)

*/ @QtUninvokable public final void setQuality(int quality){ setQuality_native_int(QtJambi_LibraryUtilities.internal.nativeId(this), quality); } @QtUninvokable private native void setQuality_native_int(long __this__nativeId, int quality); /** *

See QImageWriter::setSubType(QByteArray)

*/ @QtUninvokable public final void setSubType(io.qt.core.@NonNull QByteArray type){ setSubType_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(type)); } @QtUninvokable private native void setSubType_native_cref_QByteArray(long __this__nativeId, long type); /** *

See QImageWriter::setText(QString,QString)

*/ @QtUninvokable public final void setText(java.lang.@NonNull String key, java.lang.@NonNull String text){ setText_native_cref_QString_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), key, text); } @QtUninvokable private native void setText_native_cref_QString_cref_QString(long __this__nativeId, java.lang.String key, java.lang.String text); /** *

See QImageWriter::setTransformation(QImageIOHandler::Transformations)

*/ @QtUninvokable public final void setTransformation(io.qt.gui.QImageIOHandler.@NonNull Transformations orientation){ setTransformation_native_QImageIOHandler_Transformations(QtJambi_LibraryUtilities.internal.nativeId(this), orientation.value()); } @QtUninvokable private native void setTransformation_native_QImageIOHandler_Transformations(long __this__nativeId, int orientation); /** *

See QImageWriter::subType()const

*/ @QtUninvokable public final io.qt.core.@NonNull QByteArray subType(){ return subType_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QByteArray subType_native_constfct(long __this__nativeId); /** *

See QImageWriter::supportedSubTypes()const

*/ @QtUninvokable public final io.qt.core.@NonNull QList supportedSubTypes(){ return supportedSubTypes_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QList supportedSubTypes_native_constfct(long __this__nativeId); /** *

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

*/ @QtUninvokable public final 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 QImageWriter::transformation()const

*/ @QtUninvokable public final io.qt.gui.QImageIOHandler.@NonNull Transformations transformation(){ return new io.qt.gui.QImageIOHandler.Transformations(transformation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int transformation_native_constfct(long __this__nativeId); /** *

See QImageWriter::write(QImage)

*/ @QtUninvokable public final 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 QImageWriter::imageFormatsForMimeType(QByteArray)

*/ public static io.qt.core.@NonNull QList imageFormatsForMimeType(io.qt.core.@NonNull QByteArray mimeType){ return imageFormatsForMimeType_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(mimeType)); } private native static io.qt.core.QList imageFormatsForMimeType_native_cref_QByteArray(long mimeType); /** *

See QImageWriter::supportedImageFormats()

*/ public native static io.qt.core.@NonNull QList supportedImageFormats(); /** *

See QImageWriter::supportedMimeTypes()

*/ public native static io.qt.core.@NonNull QList supportedMimeTypes(); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QImageWriter(QPrivateConstructor p) { super(p); } /** *

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

*/ public QImageWriter(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format) { this(device, new io.qt.core.QByteArray(format)); } /** *

Overloaded constructor for {@link #QImageWriter(java.lang.String, io.qt.core.QByteArray)} * with format = new io.qt.core.QByteArray().

*/ public QImageWriter(java.lang.@NonNull String fileName) { this(fileName, new io.qt.core.QByteArray()); } /** *

Overloaded constructor for {@link #QImageWriter(java.lang.String, io.qt.core.QByteArray)}.

*/ public QImageWriter(java.lang.@NonNull String fileName, byte @NonNull[] format) { this(fileName, new io.qt.core.QByteArray(format)); } /** *

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

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

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

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

Overloaded function for {@link #setTransformation(io.qt.gui.QImageIOHandler.Transformations)}.

*/ @QtUninvokable public final void setTransformation(io.qt.gui.QImageIOHandler.@NonNull Transformation @NonNull... orientation) { setTransformation(new io.qt.gui.QImageIOHandler.Transformations(orientation)); } /** *

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

*/ public static io.qt.core.@NonNull QList imageFormatsForMimeType(byte @NonNull[] mimeType) { return imageFormatsForMimeType(new io.qt.core.QByteArray(mimeType)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy