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

io.qt.core.QMimeDatabase Maven / Gradle / Ivy

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

import io.qt.*;


/**
 * 

Maintains a database of MIME types

*

Java wrapper for Qt class QMimeDatabase

*/ public class QMimeDatabase extends QtObject { static { QtJambi_LibraryUtilities.initialize(); } /** *

Java wrapper for Qt enum QMimeDatabase::MatchMode

*/ public enum MatchMode implements QtEnumerator { /** *

Representing QMimeDatabase::MatchDefault

*/ MatchDefault(0), /** *

Representing QMimeDatabase::MatchExtension

*/ MatchExtension(1), /** *

Representing QMimeDatabase::MatchContent

*/ MatchContent(2); static { QtJambi_LibraryUtilities.initialize(); } private MatchMode(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 MatchMode resolve(int value) { switch (value) { case 0: return MatchDefault; case 1: return MatchExtension; case 2: return MatchContent; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

See QMimeDatabase::QMimeDatabase()

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

See QMimeDatabase::allMimeTypes()const

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

See QMimeDatabase::mimeTypeForData(QByteArray)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForData(io.qt.core.@NonNull QByteArray data){ return mimeTypeForData_native_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(data)); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForData_native_cref_QByteArray_constfct(long __this__nativeId, long data); /** *

See QMimeDatabase::mimeTypeForData(QIODevice*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForData(io.qt.core.@Nullable QIODevice device){ return mimeTypeForData_native_QIODevice_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(device)); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForData_native_QIODevice_ptr_constfct(long __this__nativeId, long device); /** *

See QMimeDatabase::mimeTypeForFile(QFileInfo,QMimeDatabase::MatchMode)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFile(io.qt.core.@NonNull QFileInfo fileInfo, io.qt.core.QMimeDatabase.@NonNull MatchMode mode){ return mimeTypeForFile_native_cref_QFileInfo_QMimeDatabase_MatchMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(fileInfo), mode.value()); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForFile_native_cref_QFileInfo_QMimeDatabase_MatchMode_constfct(long __this__nativeId, long fileInfo, int mode); /** *

See QMimeDatabase::mimeTypeForFile(QString,QMimeDatabase::MatchMode)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFile(java.lang.@NonNull String fileName, io.qt.core.QMimeDatabase.@NonNull MatchMode mode){ return mimeTypeForFile_native_cref_QString_QMimeDatabase_MatchMode_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fileName, mode.value()); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForFile_native_cref_QString_QMimeDatabase_MatchMode_constfct(long __this__nativeId, java.lang.String fileName, int mode); /** *

See QMimeDatabase::mimeTypeForFileNameAndData(QString,QByteArray)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFileNameAndData(java.lang.@NonNull String fileName, io.qt.core.@NonNull QByteArray data){ return mimeTypeForFileNameAndData_native_cref_QString_cref_QByteArray_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fileName, QtJambi_LibraryUtilities.internal.checkedNativeId(data)); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForFileNameAndData_native_cref_QString_cref_QByteArray_constfct(long __this__nativeId, java.lang.String fileName, long data); /** *

See QMimeDatabase::mimeTypeForFileNameAndData(QString,QIODevice*)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFileNameAndData(java.lang.@NonNull String fileName, io.qt.core.@Nullable QIODevice device){ return mimeTypeForFileNameAndData_native_cref_QString_QIODevice_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fileName, QtJambi_LibraryUtilities.internal.checkedNativeId(device)); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForFileNameAndData_native_cref_QString_QIODevice_ptr_constfct(long __this__nativeId, java.lang.String fileName, long device); /** *

See QMimeDatabase::mimeTypeForName(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForName(java.lang.@NonNull String nameOrAlias){ return mimeTypeForName_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), nameOrAlias); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForName_native_cref_QString_constfct(long __this__nativeId, java.lang.String nameOrAlias); /** *

See QMimeDatabase::mimeTypeForUrl(QUrl)const

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForUrl(io.qt.core.@NonNull QUrl url){ return mimeTypeForUrl_native_cref_QUrl_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(url)); } @QtUninvokable private native io.qt.core.QMimeType mimeTypeForUrl_native_cref_QUrl_constfct(long __this__nativeId, long url); /** *

See QMimeDatabase::mimeTypesForFileName(QString)const

*/ @QtUninvokable public final io.qt.core.@NonNull QList mimeTypesForFileName(java.lang.@NonNull String fileName){ return mimeTypesForFileName_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fileName); } @QtUninvokable private native io.qt.core.QList mimeTypesForFileName_native_cref_QString_constfct(long __this__nativeId, java.lang.String fileName); /** *

See QMimeDatabase::suffixForFileName(QString)const

*/ @QtUninvokable public final java.lang.@NonNull String suffixForFileName(java.lang.@NonNull String fileName){ return suffixForFileName_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fileName); } @QtUninvokable private native java.lang.String suffixForFileName_native_cref_QString_constfct(long __this__nativeId, java.lang.String fileName); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QMimeDatabase(QPrivateConstructor p) { super(p); } /** *

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

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForData(byte @NonNull[] data) { return mimeTypeForData(new io.qt.core.QByteArray(data)); } /** *

Overloaded function for {@link #mimeTypeForFile(io.qt.core.QFileInfo, io.qt.core.QMimeDatabase.MatchMode)} * with mode = io.qt.core.QMimeDatabase.MatchMode.MatchDefault.

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFile(io.qt.core.@NonNull QFileInfo fileInfo) { return mimeTypeForFile(fileInfo, io.qt.core.QMimeDatabase.MatchMode.MatchDefault); } /** *

Overloaded function for {@link #mimeTypeForFile(java.lang.String, io.qt.core.QMimeDatabase.MatchMode)} * with mode = io.qt.core.QMimeDatabase.MatchMode.MatchDefault.

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFile(java.lang.@NonNull String fileName) { return mimeTypeForFile(fileName, io.qt.core.QMimeDatabase.MatchMode.MatchDefault); } /** *

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

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForFileNameAndData(java.lang.@NonNull String fileName, byte @NonNull[] data) { return mimeTypeForFileNameAndData(fileName, new io.qt.core.QByteArray(data)); } /** *

Overloaded function for {@link #mimeTypeForUrl(io.qt.core.QUrl)}.

*/ @QtUninvokable public final io.qt.core.@NonNull QMimeType mimeTypeForUrl(java.lang.@NonNull String url) { return mimeTypeForUrl(new io.qt.core.QUrl(url)); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy