io.qt.gui.QFontDatabase Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Information about the fonts available in the underlying window system
* Java wrapper for Qt class QFontDatabase
*/
public class QFontDatabase extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* This variable stores the meta-object for the class.
*/
public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QFontDatabase.class);
/**
* Java wrapper for Qt enum QFontDatabase::SystemFont
*/
public enum SystemFont implements QtEnumerator {
/**
* Representing QFontDatabase:: GeneralFont
*/
GeneralFont(0),
/**
* Representing QFontDatabase:: FixedFont
*/
FixedFont(1),
/**
* Representing QFontDatabase:: TitleFont
*/
TitleFont(2),
/**
* Representing QFontDatabase:: SmallestReadableFont
*/
SmallestReadableFont(3);
static {
QtJambi_LibraryUtilities.initialize();
}
private SystemFont(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 SystemFont resolve(int value) {
switch (value) {
case 0: return GeneralFont;
case 1: return FixedFont;
case 2: return TitleFont;
case 3: return SmallestReadableFont;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* Java wrapper for Qt enum QFontDatabase::WritingSystem
*/
@QtRejectedEntries({"Other"})
public enum WritingSystem implements QtEnumerator {
/**
* Representing QFontDatabase:: Any
*/
Any(0),
/**
* Representing QFontDatabase:: Latin
*/
Latin(1),
/**
* Representing QFontDatabase:: Greek
*/
Greek(2),
/**
* Representing QFontDatabase:: Cyrillic
*/
Cyrillic(3),
/**
* Representing QFontDatabase:: Armenian
*/
Armenian(4),
/**
* Representing QFontDatabase:: Hebrew
*/
Hebrew(5),
/**
* Representing QFontDatabase:: Arabic
*/
Arabic(6),
/**
* Representing QFontDatabase:: Syriac
*/
Syriac(7),
/**
* Representing QFontDatabase:: Thaana
*/
Thaana(8),
/**
* Representing QFontDatabase:: Devanagari
*/
Devanagari(9),
/**
* Representing QFontDatabase:: Bengali
*/
Bengali(10),
/**
* Representing QFontDatabase:: Gurmukhi
*/
Gurmukhi(11),
/**
* Representing QFontDatabase:: Gujarati
*/
Gujarati(12),
/**
* Representing QFontDatabase:: Oriya
*/
Oriya(13),
/**
* Representing QFontDatabase:: Tamil
*/
Tamil(14),
/**
* Representing QFontDatabase:: Telugu
*/
Telugu(15),
/**
* Representing QFontDatabase:: Kannada
*/
Kannada(16),
/**
* Representing QFontDatabase:: Malayalam
*/
Malayalam(17),
/**
* Representing QFontDatabase:: Sinhala
*/
Sinhala(18),
/**
* Representing QFontDatabase:: Thai
*/
Thai(19),
/**
* Representing QFontDatabase:: Lao
*/
Lao(20),
/**
* Representing QFontDatabase:: Tibetan
*/
Tibetan(21),
/**
* Representing QFontDatabase:: Myanmar
*/
Myanmar(22),
/**
* Representing QFontDatabase:: Georgian
*/
Georgian(23),
/**
* Representing QFontDatabase:: Khmer
*/
Khmer(24),
/**
* Representing QFontDatabase:: SimplifiedChinese
*/
SimplifiedChinese(25),
/**
* Representing QFontDatabase:: TraditionalChinese
*/
TraditionalChinese(26),
/**
* Representing QFontDatabase:: Japanese
*/
Japanese(27),
/**
* Representing QFontDatabase:: Korean
*/
Korean(28),
/**
* Representing QFontDatabase:: Vietnamese
*/
Vietnamese(29),
/**
* Representing QFontDatabase:: Symbol
*/
Symbol(30),
/**
* Representing QFontDatabase:: Other
*/
Other(30),
/**
* Representing QFontDatabase:: Ogham
*/
Ogham(31),
/**
* Representing QFontDatabase:: Runic
*/
Runic(32),
/**
* Representing QFontDatabase:: Nko
*/
Nko(33),
/**
* Representing QFontDatabase:: WritingSystemsCount
*/
WritingSystemsCount(34);
static {
QtJambi_LibraryUtilities.initialize();
}
private WritingSystem(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 WritingSystem resolve(int value) {
switch (value) {
case 0: return Any;
case 1: return Latin;
case 2: return Greek;
case 3: return Cyrillic;
case 4: return Armenian;
case 5: return Hebrew;
case 6: return Arabic;
case 7: return Syriac;
case 8: return Thaana;
case 9: return Devanagari;
case 10: return Bengali;
case 11: return Gurmukhi;
case 12: return Gujarati;
case 13: return Oriya;
case 14: return Tamil;
case 15: return Telugu;
case 16: return Kannada;
case 17: return Malayalam;
case 18: return Sinhala;
case 19: return Thai;
case 20: return Lao;
case 21: return Tibetan;
case 22: return Myanmar;
case 23: return Georgian;
case 24: return Khmer;
case 25: return SimplifiedChinese;
case 26: return TraditionalChinese;
case 27: return Japanese;
case 28: return Korean;
case 29: return Vietnamese;
case 30: return Symbol;
case 31: return Ogham;
case 32: return Runic;
case 33: return Nko;
case 34: return WritingSystemsCount;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QFontDatabase:: QFontDatabase()
*/
public QFontDatabase(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QFontDatabase instance);
/**
* See QFontDatabase:: QFontDatabase(QFontDatabase)
*/
public QFontDatabase(io.qt.gui.@NonNull QFontDatabase other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QFontDatabase instance, io.qt.gui.QFontDatabase other);
/**
* See QFontDatabase:: addApplicationFont(QString)
*/
public native static int addApplicationFont(java.lang.@NonNull String fileName);
/**
* See QFontDatabase:: addApplicationFontFromData(QByteArray)
*/
public static int addApplicationFontFromData(io.qt.core.@NonNull QByteArray fontData){
return addApplicationFontFromData_native_cref_QByteArray(QtJambi_LibraryUtilities.internal.checkedNativeId(fontData));
}
private native static int addApplicationFontFromData_native_cref_QByteArray(long fontData);
/**
* See QFontDatabase:: applicationFontFamilies(int)
*/
public native static io.qt.core.@NonNull QStringList applicationFontFamilies(int id);
/**
* See QFontDatabase:: bold(QString, QString)
*/
public native static boolean bold(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: families(QFontDatabase::WritingSystem)
*/
public static io.qt.core.@NonNull QStringList families(io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem){
return families_native_QFontDatabase_WritingSystem(writingSystem.value());
}
private native static io.qt.core.QStringList families_native_QFontDatabase_WritingSystem(int writingSystem);
/**
* See QFontDatabase:: font(QString, QString, int)
*/
public native static io.qt.gui.@NonNull QFont font(java.lang.@NonNull String family, java.lang.@NonNull String style, int pointSize);
/**
* See QFontDatabase:: hasFamily(QString)
*/
public native static boolean hasFamily(java.lang.@NonNull String family);
/**
* See QFontDatabase:: isBitmapScalable(QString, QString)
*/
public native static boolean isBitmapScalable(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: isFixedPitch(QString, QString)
*/
public native static boolean isFixedPitch(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: isPrivateFamily(QString)
*/
public native static boolean isPrivateFamily(java.lang.@NonNull String family);
/**
* See QFontDatabase:: isScalable(QString, QString)
*/
public native static boolean isScalable(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: isSmoothlyScalable(QString, QString)
*/
public native static boolean isSmoothlyScalable(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: italic(QString, QString)
*/
public native static boolean italic(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: pointSizes(QString, QString)
*/
public native static io.qt.core.@NonNull QList pointSizes(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: removeAllApplicationFonts()
*/
public native static boolean removeAllApplicationFonts();
/**
* See QFontDatabase:: removeApplicationFont(int)
*/
public native static boolean removeApplicationFont(int id);
/**
* See QFontDatabase:: smoothSizes(QString, QString)
*/
public native static io.qt.core.@NonNull QList smoothSizes(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: standardSizes()
*/
public native static io.qt.core.@NonNull QList standardSizes();
/**
* See QFontDatabase:: styleString(QFont)
*/
public static java.lang.@NonNull String styleString(io.qt.gui.@NonNull QFont font){
return styleString_native_cref_QFont(QtJambi_LibraryUtilities.internal.checkedNativeId(font));
}
private native static java.lang.String styleString_native_cref_QFont(long font);
/**
* See QFontDatabase:: styleString(QFontInfo)
*/
public static java.lang.@NonNull String styleString(io.qt.gui.@NonNull QFontInfo fontInfo){
return styleString_native_cref_QFontInfo(QtJambi_LibraryUtilities.internal.checkedNativeId(fontInfo));
}
private native static java.lang.String styleString_native_cref_QFontInfo(long fontInfo);
/**
* See QFontDatabase:: styles(QString)
*/
public native static io.qt.core.@NonNull QStringList styles(java.lang.@NonNull String family);
/**
* See QFontDatabase:: systemFont(QFontDatabase::SystemFont)
*/
public static io.qt.gui.@NonNull QFont systemFont(io.qt.gui.QFontDatabase.@NonNull SystemFont type){
return systemFont_native_QFontDatabase_SystemFont(type.value());
}
private native static io.qt.gui.QFont systemFont_native_QFontDatabase_SystemFont(int type);
/**
* See QFontDatabase:: weight(QString, QString)
*/
public native static int weight(java.lang.@NonNull String family, java.lang.@NonNull String style);
/**
* See QFontDatabase:: writingSystemName(QFontDatabase::WritingSystem)
*/
public static java.lang.@NonNull String writingSystemName(io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem){
return writingSystemName_native_QFontDatabase_WritingSystem(writingSystem.value());
}
private native static java.lang.String writingSystemName_native_QFontDatabase_WritingSystem(int writingSystem);
/**
* See QFontDatabase:: writingSystemSample(QFontDatabase::WritingSystem)
*/
public static java.lang.@NonNull String writingSystemSample(io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem){
return writingSystemSample_native_QFontDatabase_WritingSystem(writingSystem.value());
}
private native static java.lang.String writingSystemSample_native_QFontDatabase_WritingSystem(int writingSystem);
/**
* See QFontDatabase:: writingSystems()
*/
public native static io.qt.core.@NonNull QList writingSystems();
/**
* See QFontDatabase:: writingSystems(QString)
*/
public native static io.qt.core.@NonNull QList writingSystems(java.lang.@NonNull String family);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QFontDatabase(QPrivateConstructor p) { super(p); }
/**
* Creates and returns a copy of this object.
See QFontDatabase:: QFontDatabase(QFontDatabase)
*/
@QtUninvokable
@Override
public QFontDatabase clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QFontDatabase clone_native(long __this_nativeId);
/**
* Overloaded function for {@link #addApplicationFontFromData(io.qt.core.QByteArray)}.
*/
public static int addApplicationFontFromData(byte @NonNull[] fontData) {
return addApplicationFontFromData(new io.qt.core.QByteArray(fontData));
}
/**
* Overloaded function for {@link #families(io.qt.gui.QFontDatabase.WritingSystem)}
* with writingSystem = io.qt.gui.QFontDatabase.WritingSystem.Any
.
*/
public static io.qt.core.@NonNull QStringList families() {
return families(io.qt.gui.QFontDatabase.WritingSystem.Any);
}
/**
* Overloaded function for {@link #isBitmapScalable(java.lang.String, java.lang.String)}
* with style = (String)null
.
*/
public static boolean isBitmapScalable(java.lang.@NonNull String family) {
return isBitmapScalable(family, (String)null);
}
/**
* Overloaded function for {@link #isFixedPitch(java.lang.String, java.lang.String)}
* with style = (String)null
.
*/
public static boolean isFixedPitch(java.lang.@NonNull String family) {
return isFixedPitch(family, (String)null);
}
/**
* Overloaded function for {@link #isScalable(java.lang.String, java.lang.String)}
* with style = (String)null
.
*/
public static boolean isScalable(java.lang.@NonNull String family) {
return isScalable(family, (String)null);
}
/**
* Overloaded function for {@link #isSmoothlyScalable(java.lang.String, java.lang.String)}
* with style = (String)null
.
*/
public static boolean isSmoothlyScalable(java.lang.@NonNull String family) {
return isSmoothlyScalable(family, (String)null);
}
/**
* Overloaded function for {@link #pointSizes(java.lang.String, java.lang.String)}
* with style = (String)null
.
*/
public static io.qt.core.@NonNull QList pointSizes(java.lang.@NonNull String family) {
return pointSizes(family, (String)null);
}
/**
* Overloaded function for {@link #styleString(io.qt.gui.QFont)}.
*/
public static java.lang.@NonNull String styleString(java.lang.@NonNull String font) {
return styleString(new io.qt.gui.QFont(font));
}
}