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

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

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

import io.qt.*;


/**
 * 

Converts between a MIME type and a Uniform Type Identifier (UTI) format

*

Java wrapper for Qt class QUtiMimeConverter

*/ public abstract class QUtiMimeConverter extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } @NativeAccess private static final class ConcreteWrapper extends QUtiMimeConverter { @NativeAccess private ConcreteWrapper(QPrivateConstructor p) { super(p); } @Override @QtUninvokable public java.util.@NonNull List convertFromMime(java.lang.@NonNull String mime, java.lang.Object data, java.lang.@NonNull String uti){ return convertFromMime_native_cref_QString_cref_QVariant_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mime, data, uti); } @QtUninvokable private native java.util.List convertFromMime_native_cref_QString_cref_QVariant_cref_QString_constfct(long __this__nativeId, java.lang.String mime, java.lang.Object data, java.lang.String uti); @Override @QtUninvokable public java.lang.Object convertToMime(java.lang.@NonNull String mime, java.util.@NonNull Collection data, java.lang.@NonNull String uti){ return convertToMime_native_cref_QString_cref_QList_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mime, data, uti); } @QtUninvokable private native java.lang.Object convertToMime_native_cref_QString_cref_QList_cref_QString_constfct(long __this__nativeId, java.lang.String mime, java.util.Collection data, java.lang.String uti); @Override @QtUninvokable public java.lang.@NonNull String mimeForUti(java.lang.@NonNull String uti){ return mimeForUti_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), uti); } @QtUninvokable private native java.lang.String mimeForUti_native_cref_QString_constfct(long __this__nativeId, java.lang.String uti); @Override @QtUninvokable public java.lang.@NonNull String utiForMime(java.lang.@NonNull String mime){ return utiForMime_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mime); } @QtUninvokable private native java.lang.String utiForMime_native_cref_QString_constfct(long __this__nativeId, java.lang.String mime); } /** *

Java wrapper for Qt enum QUtiMimeConverter::HandlerScopeFlag

* * @see HandlerScope */ public enum HandlerScopeFlag implements QtFlagEnumerator { /** *

Representing QUtiMimeConverter::HandlerScopeFlag::DnD

*/ DnD(1), /** *

Representing QUtiMimeConverter::HandlerScopeFlag::Clipboard

*/ Clipboard(2), /** *

Representing QUtiMimeConverter::HandlerScopeFlag::Qt_compatible

*/ Qt_compatible(4), /** *

Representing QUtiMimeConverter::HandlerScopeFlag::Qt3_compatible

*/ Qt3_compatible(8), /** *

Representing QUtiMimeConverter::HandlerScopeFlag::All

*/ All(3), /** *

Representing QUtiMimeConverter::HandlerScopeFlag::AllCompatible

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

See QUtiMimeConverter::QUtiMimeConverter()

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

See QUtiMimeConverter::canConvert(QString,QString)const

*/ @QtUninvokable public final boolean canConvert(java.lang.@NonNull String mime, java.lang.@NonNull String uti){ return canConvert_native_cref_QString_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), mime, uti); } @QtUninvokable private native boolean canConvert_native_cref_QString_cref_QString_constfct(long __this__nativeId, java.lang.String mime, java.lang.String uti); /** *

See QUtiMimeConverter::scope()const

*/ @QtUninvokable public final io.qt.gui.QUtiMimeConverter.@NonNull HandlerScope scope(){ return new io.qt.gui.QUtiMimeConverter.HandlerScope(scope_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int scope_native_constfct(long __this__nativeId); /** *

See QUtiMimeConverter::convertFromMime(QString,QVariant,QString)const

*/ @QtUninvokable public abstract java.util.@NonNull List convertFromMime(java.lang.@NonNull String mime, java.lang.Object data, java.lang.@NonNull String uti); @QtUninvokable private native java.util.List convertFromMime_native_cref_QString_cref_QVariant_cref_QString_constfct(long __this__nativeId, java.lang.String mime, java.lang.Object data, java.lang.String uti); /** *

See QUtiMimeConverter::convertToMime(QString,QList<QByteArray>,QString)const

*/ @QtUninvokable public abstract java.lang.Object convertToMime(java.lang.@NonNull String mime, java.util.@NonNull Collection data, java.lang.@NonNull String uti); @QtUninvokable private native java.lang.Object convertToMime_native_cref_QString_cref_QList_cref_QString_constfct(long __this__nativeId, java.lang.String mime, java.util.Collection data, java.lang.String uti); /** *

See QUtiMimeConverter::count(const QMimeData*)const

*/ @QtUninvokable public int count(io.qt.core.@Nullable QMimeData mimeData){ return count_native_const_QMimeData_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(mimeData)); } @QtUninvokable private native int count_native_const_QMimeData_ptr_constfct(long __this__nativeId, long mimeData); /** *

See QUtiMimeConverter::mimeForUti(QString)const

*/ @QtUninvokable public abstract java.lang.@NonNull String mimeForUti(java.lang.@NonNull String uti); @QtUninvokable private native java.lang.String mimeForUti_native_cref_QString_constfct(long __this__nativeId, java.lang.String uti); /** *

See QUtiMimeConverter::utiForMime(QString)const

*/ @QtUninvokable public abstract java.lang.@NonNull String utiForMime(java.lang.@NonNull String mime); @QtUninvokable private native java.lang.String utiForMime_native_cref_QString_constfct(long __this__nativeId, java.lang.String mime); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QUtiMimeConverter(QPrivateConstructor p) { super(p); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy