io.qt.gui.QImageReader Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Format independent interface for reading images from files or other devices
* Java wrapper for Qt class QImageReader
*/
public class QImageReader extends QtObject
{
static {
QtJambi_LibraryUtilities.initialize();
}
@QtPropertyMember(enabled=false)
private Object __rcDevice = null;
/**
* Java wrapper for Qt enum QImageReader::ImageReaderError
*/
public enum ImageReaderError implements QtEnumerator {
/**
* Representing QImageReader:: UnknownError
*/
UnknownError(0),
/**
* Representing QImageReader:: FileNotFoundError
*/
FileNotFoundError(1),
/**
* Representing QImageReader:: DeviceError
*/
DeviceError(2),
/**
* Representing QImageReader:: UnsupportedFormatError
*/
UnsupportedFormatError(3),
/**
* Representing QImageReader:: InvalidDataError
*/
InvalidDataError(4);
static {
QtJambi_LibraryUtilities.initialize();
}
private ImageReaderError(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 ImageReaderError resolve(int value) {
switch (value) {
case 0: return UnknownError;
case 1: return FileNotFoundError;
case 2: return DeviceError;
case 3: return UnsupportedFormatError;
case 4: return InvalidDataError;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QImageReader:: QImageReader()
*/
public QImageReader(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QImageReader instance);
/**
* See QImageReader:: QImageReader(QIODevice*, QByteArray)
*/
public QImageReader(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(QImageReader instance, io.qt.core.QIODevice device, io.qt.core.QByteArray format);
/**
* See QImageReader:: QImageReader(QString, QByteArray)
*/
public QImageReader(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(QImageReader instance, java.lang.String fileName, io.qt.core.QByteArray format);
/**
* See QImageReader:: autoDetectImageFormat()const
*/
@QtUninvokable
public final boolean autoDetectImageFormat(){
return autoDetectImageFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean autoDetectImageFormat_native_constfct(long __this__nativeId);
/**
* See QImageReader:: autoTransform()const
*/
@QtUninvokable
public final boolean autoTransform(){
return autoTransform_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean autoTransform_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: canRead()const
*/
@QtUninvokable
public final boolean canRead(){
return canRead_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean canRead_native_constfct(long __this__nativeId);
/**
* See QImageReader:: clipRect()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QRect clipRect(){
return clipRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRect clipRect_native_constfct(long __this__nativeId);
/**
* See QImageReader:: currentImageNumber()const
*/
@QtUninvokable
public final int currentImageNumber(){
return currentImageNumber_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int currentImageNumber_native_constfct(long __this__nativeId);
/**
* See QImageReader:: currentImageRect()const
*/
@QtUninvokable
public final 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 QImageReader:: decideFormatFromContent()const
*/
@QtUninvokable
public final boolean decideFormatFromContent(){
return decideFormatFromContent_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean decideFormatFromContent_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: error()const
*/
@QtUninvokable
public final io.qt.gui.QImageReader.@NonNull ImageReaderError error(){
return io.qt.gui.QImageReader.ImageReaderError.resolve(error_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int error_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: 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 QImageReader:: 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 QImageReader:: imageCount()const
*/
@QtUninvokable
public final int imageCount(){
return imageCount_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int imageCount_native_constfct(long __this__nativeId);
/**
* See QImageReader:: imageFormat()const
*/
@QtUninvokable
public final io.qt.gui.QImage.@NonNull Format imageFormat(){
return io.qt.gui.QImage.Format.resolve(imageFormat_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)));
}
@QtUninvokable
private native int imageFormat_native_constfct(long __this__nativeId);
/**
* See QImageReader:: jumpToImage(int)
*/
@QtUninvokable
public final 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 QImageReader:: jumpToNextImage()
*/
@QtUninvokable
public final boolean jumpToNextImage(){
return jumpToNextImage_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean jumpToNextImage_native(long __this__nativeId);
/**
* See QImageReader:: loopCount()const
*/
@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 QImageReader:: nextImageDelay()const
*/
@QtUninvokable
public final int nextImageDelay(){
return nextImageDelay_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native int nextImageDelay_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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);
/**
*
*/
@QtUninvokable
public final io.qt.gui.@NonNull QImage read(){
return read_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QImage read_native(long __this__nativeId);
/**
* See QImageReader:: scaledClipRect()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QRect scaledClipRect(){
return scaledClipRect_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QRect scaledClipRect_native_constfct(long __this__nativeId);
/**
* See QImageReader:: scaledSize()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QSize scaledSize(){
return scaledSize_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize scaledSize_native_constfct(long __this__nativeId);
/**
* See QImageReader:: setAutoDetectImageFormat(bool)
*/
@QtUninvokable
public final void setAutoDetectImageFormat(boolean enabled){
setAutoDetectImageFormat_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enabled);
}
@QtUninvokable
private native void setAutoDetectImageFormat_native_bool(long __this__nativeId, boolean enabled);
/**
* See QImageReader:: setAutoTransform(bool)
*/
@QtUninvokable
public final void setAutoTransform(boolean enabled){
setAutoTransform_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), enabled);
}
@QtUninvokable
private native void setAutoTransform_native_bool(long __this__nativeId, boolean enabled);
/**
* See QImageReader:: 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 QImageReader:: setClipRect(QRect)
*/
@QtUninvokable
public final void setClipRect(io.qt.core.@NonNull QRect rect){
setClipRect_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rect));
}
@QtUninvokable
private native void setClipRect_native_cref_QRect(long __this__nativeId, long rect);
/**
* See QImageReader:: setDecideFormatFromContent(bool)
*/
@QtUninvokable
public final void setDecideFormatFromContent(boolean ignored){
setDecideFormatFromContent_native_bool(QtJambi_LibraryUtilities.internal.nativeId(this), ignored);
}
@QtUninvokable
private native void setDecideFormatFromContent_native_bool(long __this__nativeId, boolean ignored);
/**
* See QImageReader:: 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 QImageReader:: 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 QImageReader:: 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 QImageReader:: 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 QImageReader:: setScaledClipRect(QRect)
*/
@QtUninvokable
public final void setScaledClipRect(io.qt.core.@NonNull QRect rect){
setScaledClipRect_native_cref_QRect(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(rect));
}
@QtUninvokable
private native void setScaledClipRect_native_cref_QRect(long __this__nativeId, long rect);
/**
* See QImageReader:: 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);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QSize size(){
return size_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QSize size_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: 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 QImageReader:: supportsAnimation()const
*/
@QtUninvokable
public final boolean supportsAnimation(){
return supportsAnimation_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean supportsAnimation_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: text(QString)const
*/
@QtUninvokable
public final java.lang.@NonNull String text(java.lang.@NonNull String key){
return text_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), key);
}
@QtUninvokable
private native java.lang.String text_native_cref_QString_constfct(long __this__nativeId, java.lang.String key);
/**
* See QImageReader:: textKeys()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QStringList textKeys(){
return textKeys_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QStringList textKeys_native_constfct(long __this__nativeId);
/**
* See QImageReader:: 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 QImageReader:: allocationLimit()
*/
public native static int allocationLimit();
/**
* See QImageReader:: imageFormat(QIODevice*)
*/
public static io.qt.core.@NonNull QByteArray imageFormat(io.qt.core.@Nullable QIODevice device){
return imageFormat_native_QIODevice_ptr(QtJambi_LibraryUtilities.internal.checkedNativeId(device));
}
private native static io.qt.core.QByteArray imageFormat_native_QIODevice_ptr(long device);
/**
* See QImageReader:: imageFormat(QString)
*/
public native static io.qt.core.@NonNull QByteArray imageFormat(java.lang.@NonNull String fileName);
/**
* See QImageReader:: 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 QImageReader:: setAllocationLimit(int)
*/
public native static void setAllocationLimit(int mbLimit);
/**
* See QImageReader:: supportedImageFormats()
*/
public native static io.qt.core.@NonNull QList supportedImageFormats();
/**
* See QImageReader:: supportedMimeTypes()
*/
public native static io.qt.core.@NonNull QList supportedMimeTypes();
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QImageReader(QPrivateConstructor p) { super(p); }
/**
* Overloaded constructor for {@link #QImageReader(io.qt.core.QIODevice, io.qt.core.QByteArray)}
* with format = new io.qt.core.QByteArray()
.
*/
public QImageReader(io.qt.core.@Nullable QIODevice device) {
this(device, new io.qt.core.QByteArray());
}
/**
* Overloaded constructor for {@link #QImageReader(io.qt.core.QIODevice, io.qt.core.QByteArray)}.
*/
public QImageReader(io.qt.core.@Nullable QIODevice device, byte @NonNull[] format) {
this(device, new io.qt.core.QByteArray(format));
}
/**
* Overloaded constructor for {@link #QImageReader(java.lang.String, io.qt.core.QByteArray)}
* with format = new io.qt.core.QByteArray()
.
*/
public QImageReader(java.lang.@NonNull String fileName) {
this(fileName, new io.qt.core.QByteArray());
}
/**
* Overloaded constructor for {@link #QImageReader(java.lang.String, io.qt.core.QByteArray)}.
*/
public QImageReader(java.lang.@NonNull String fileName, byte @NonNull[] format) {
this(fileName, new io.qt.core.QByteArray(format));
}
/**
* 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));
}
/**
* 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));
}
}