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

io.qt.widgets.QFontComboBox Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package io.qt.widgets;

import io.qt.*;


/**
 * 

Combobox that lets the user select a font family

*

Java wrapper for Qt class QFontComboBox

*/ public class QFontComboBox extends io.qt.widgets.QComboBox { /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QFontComboBox.class); /** *

Java wrapper for Qt enum QFontComboBox::FontFilter

* * @see FontFilters */ public enum FontFilter implements QtFlagEnumerator { /** *

Representing QFontComboBox::AllFonts

*/ AllFonts(0), /** *

Representing QFontComboBox::ScalableFonts

*/ ScalableFonts(1), /** *

Representing QFontComboBox::NonScalableFonts

*/ NonScalableFonts(2), /** *

Representing QFontComboBox::MonospacedFonts

*/ MonospacedFonts(4), /** *

Representing QFontComboBox::ProportionalFonts

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

See QFontComboBox::currentFontChanged(QFont)

*/ @QtPropertyNotify(name="currentFont") public final @NonNull Signal1 currentFontChanged = new Signal1<>(); /** *

See QFontComboBox::QFontComboBox(QWidget*)

* @param parent */ public QFontComboBox(io.qt.widgets.@Nullable QWidget parent){ super((QPrivateConstructor)null); initialize_native(this, parent); } private native static void initialize_native(QFontComboBox instance, io.qt.widgets.QWidget parent); /** *

See QFontComboBox::currentFont()const

* @return */ @QtPropertyReader(name="currentFont") @QtUninvokable public final io.qt.gui.@NonNull QFont currentFont(){ return currentFont_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.gui.QFont currentFont_native_constfct(long __this__nativeId); /** *

See QFontComboBox::displayFont(QString)const

* @since This function was introduced in Qt 6.3. * @param fontFamily * @return */ @QtUninvokable public final java.util.@NonNull Optional displayFont(java.lang.@NonNull String fontFamily){ return displayFont_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily); } @QtUninvokable private native java.util.Optional displayFont_native_cref_QString_constfct(long __this__nativeId, java.lang.String fontFamily); /** *

See QFontComboBox::fontFilters()const

* @return */ @QtPropertyReader(name="fontFilters") @QtUninvokable public final io.qt.widgets.QFontComboBox.@NonNull FontFilters fontFilters(){ return new io.qt.widgets.QFontComboBox.FontFilters(fontFilters_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int fontFilters_native_constfct(long __this__nativeId); /** *

See QFontComboBox::sampleTextForFont(QString)const

* @since This function was introduced in Qt 6.3. * @param fontFamily * @return */ @QtUninvokable public final java.lang.@NonNull String sampleTextForFont(java.lang.@NonNull String fontFamily){ return sampleTextForFont_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily); } @QtUninvokable private native java.lang.String sampleTextForFont_native_cref_QString_constfct(long __this__nativeId, java.lang.String fontFamily); /** *

See QFontComboBox::sampleTextForSystem(QFontDatabase::WritingSystem)const

* @since This function was introduced in Qt 6.3. * @param writingSystem * @return */ @QtUninvokable public final java.lang.@NonNull String sampleTextForSystem(io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem){ return sampleTextForSystem_native_QFontDatabase_WritingSystem_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), writingSystem.value()); } @QtUninvokable private native java.lang.String sampleTextForSystem_native_QFontDatabase_WritingSystem_constfct(long __this__nativeId, int writingSystem); /** *

See QFontComboBox::setCurrentFont(QFont)

* @param f */ @QtPropertyWriter(name="currentFont") public final void setCurrentFont(io.qt.gui.@NonNull QFont f){ setCurrentFont_native_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(f)); } private native void setCurrentFont_native_cref_QFont(long __this__nativeId, long f); /** *

See QFontComboBox::setDisplayFont(QString,QFont)

* @since This function was introduced in Qt 6.3. * @param fontFamily * @param font */ @QtUninvokable public final void setDisplayFont(java.lang.@NonNull String fontFamily, io.qt.gui.@NonNull QFont font){ setDisplayFont_native_cref_QString_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily, QtJambi_LibraryUtilities.internal.checkedNativeId(font)); } @QtUninvokable private native void setDisplayFont_native_cref_QString_cref_QFont(long __this__nativeId, java.lang.String fontFamily, long font); /** *

See QFontComboBox::setFontFilters(QFontComboBox::FontFilters)

* @param filters */ @QtPropertyWriter(name="fontFilters") @QtUninvokable public final void setFontFilters(io.qt.widgets.QFontComboBox.@NonNull FontFilters filters){ setFontFilters_native_QFontComboBox_FontFilters(QtJambi_LibraryUtilities.internal.nativeId(this), filters.value()); } @QtUninvokable private native void setFontFilters_native_QFontComboBox_FontFilters(long __this__nativeId, int filters); /** *

See QFontComboBox::setSampleTextForFont(QString,QString)

* @since This function was introduced in Qt 6.3. * @param fontFamily * @param sampleText */ @QtUninvokable public final void setSampleTextForFont(java.lang.@NonNull String fontFamily, java.lang.@NonNull String sampleText){ setSampleTextForFont_native_cref_QString_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily, sampleText); } @QtUninvokable private native void setSampleTextForFont_native_cref_QString_cref_QString(long __this__nativeId, java.lang.String fontFamily, java.lang.String sampleText); /** *

See QFontComboBox::setSampleTextForSystem(QFontDatabase::WritingSystem,QString)

* @since This function was introduced in Qt 6.3. * @param writingSystem * @param sampleText */ @QtUninvokable public final void setSampleTextForSystem(io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem, java.lang.@NonNull String sampleText){ setSampleTextForSystem_native_QFontDatabase_WritingSystem_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), writingSystem.value(), sampleText); } @QtUninvokable private native void setSampleTextForSystem_native_QFontDatabase_WritingSystem_cref_QString(long __this__nativeId, int writingSystem, java.lang.String sampleText); /** *

See QFontComboBox::setWritingSystem(QFontDatabase::WritingSystem)

* @param arg__1 */ @QtPropertyWriter(name="writingSystem") @QtUninvokable public final void setWritingSystem(io.qt.gui.QFontDatabase.@NonNull WritingSystem arg__1){ setWritingSystem_native_QFontDatabase_WritingSystem(QtJambi_LibraryUtilities.internal.nativeId(this), arg__1.value()); } @QtUninvokable private native void setWritingSystem_native_QFontDatabase_WritingSystem(long __this__nativeId, int arg__1); /** *

See QFontComboBox::writingSystem()const

* @return */ @QtPropertyReader(name="writingSystem") @QtUninvokable public final io.qt.gui.QFontDatabase.@NonNull WritingSystem writingSystem(){ return io.qt.gui.QFontDatabase.WritingSystem.resolve(writingSystem_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this))); } @QtUninvokable private native int writingSystem_native_constfct(long __this__nativeId); /** *

See QObject::event(QEvent*)

* @param e * @return */ @QtUninvokable @Override public boolean event(io.qt.core.@Nullable QEvent e){ java.util.Objects.requireNonNull(e, "Argument 'e': null not expected."); return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(e)); } @QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long e); /** *

See QWidget::sizeHint()const

* @return */ @QtUninvokable @Override public io.qt.core.@NonNull QSize sizeHint(){ return sizeHint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @QtUninvokable private native io.qt.core.QSize sizeHint_native_constfct(long __this__nativeId); /** * Constructor for internal use only. * @param p expected to be null. * @hidden */ @NativeAccess protected QFontComboBox(QPrivateConstructor p) { super(p); } /** * Constructor for internal use only. * It is not allowed to call the declarative constructor from inside Java. * @hidden */ @NativeAccess protected QFontComboBox(QDeclarativeConstructor constructor) { super((QPrivateConstructor)null); initialize_native(this, constructor); } @QtUninvokable private static native void initialize_native(QFontComboBox instance, QDeclarativeConstructor constructor); /** *

Overloaded constructor for {@link #QFontComboBox(io.qt.widgets.QWidget)} * with parent = null.

*/ public QFontComboBox() { this((io.qt.widgets.QWidget)null); } /** * @hidden *

Kotlin property getter. In Java use {@link #currentFont()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.gui.@NonNull QFont getCurrentFont() { return currentFont(); } /** * @hidden *

Kotlin property getter. In Java use {@link #fontFilters()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.widgets.QFontComboBox.@NonNull FontFilters getFontFilters() { return fontFilters(); } /** *

Overloaded function for {@link #setCurrentFont(io.qt.gui.QFont)}.

*/ public final void setCurrentFont(java.lang.@NonNull String f) { setCurrentFont(new io.qt.gui.QFont(f)); } /** *

Overloaded function for {@link #setDisplayFont(java.lang.String, io.qt.gui.QFont)}.

*/ @QtUninvokable public final void setDisplayFont(java.lang.@NonNull String fontFamily, java.lang.@NonNull String font) { setDisplayFont(fontFamily, new io.qt.gui.QFont(font)); } /** *

Overloaded function for {@link #setFontFilters(io.qt.widgets.QFontComboBox.FontFilters)}.

*/ @QtUninvokable public final void setFontFilters(io.qt.widgets.QFontComboBox.@NonNull FontFilter @NonNull... filters) { setFontFilters(new io.qt.widgets.QFontComboBox.FontFilters(filters)); } /** * @hidden *

Kotlin property getter. In Java use {@link #writingSystem()} instead.

*/ @QtPropertyReader(enabled=false) @QtUninvokable public final io.qt.gui.QFontDatabase.@NonNull WritingSystem getWritingSystem() { return writingSystem(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy