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

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

The newest version!
package io.qt.widgets;


/**
 * 

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.QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QFontComboBox.class); /** *

Java wrapper for Qt enum QFontComboBox::FontFilter

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

See QFontComboBox::currentFontChanged(QFont)

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

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

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

See QFontComboBox::QFontComboBox(QWidget*)

*/ public QFontComboBox(io.qt.widgets.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

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

See QFontComboBox::displayFont(QString)const

*/ @io.qt.QtUninvokable public final java.util.Optional displayFont(java.lang.String fontFamily){ return displayFont_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily); } @io.qt.QtUninvokable private native java.util.Optional displayFont_native_cref_QString_constfct(long __this__nativeId, java.lang.String fontFamily); /** *

See QFontComboBox::fontFilters()const

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

See QFontComboBox::sampleTextForFont(QString)const

*/ @io.qt.QtUninvokable public final java.lang.String sampleTextForFont(java.lang.String fontFamily){ return sampleTextForFont_native_cref_QString_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily); } @io.qt.QtUninvokable private native java.lang.String sampleTextForFont_native_cref_QString_constfct(long __this__nativeId, java.lang.String fontFamily); /** *

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

*/ @io.qt.QtUninvokable public final java.lang.String sampleTextForSystem(io.qt.gui.QFontDatabase.WritingSystem writingSystem){ return sampleTextForSystem_native_QFontDatabase_WritingSystem_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), writingSystem.value()); } @io.qt.QtUninvokable private native java.lang.String sampleTextForSystem_native_QFontDatabase_WritingSystem_constfct(long __this__nativeId, int writingSystem); /** *

See QFontComboBox::setCurrentFont(QFont)

*/ @io.qt.QtPropertyWriter(name="currentFont") public final void setCurrentFont(io.qt.gui.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)

*/ @io.qt.QtUninvokable public final void setDisplayFont(java.lang.String fontFamily, io.qt.gui.QFont font){ setDisplayFont_native_cref_QString_cref_QFont(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily, QtJambi_LibraryUtilities.internal.checkedNativeId(font)); } @io.qt.QtUninvokable private native void setDisplayFont_native_cref_QString_cref_QFont(long __this__nativeId, java.lang.String fontFamily, long font); /** *

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

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

See QFontComboBox::setFontFilters(FontFilters)

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

See QFontComboBox::setSampleTextForFont(QString,QString)

*/ @io.qt.QtUninvokable public final void setSampleTextForFont(java.lang.String fontFamily, java.lang.String sampleText){ setSampleTextForFont_native_cref_QString_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), fontFamily, sampleText); } @io.qt.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)

*/ @io.qt.QtUninvokable public final void setSampleTextForSystem(io.qt.gui.QFontDatabase.WritingSystem writingSystem, java.lang.String sampleText){ setSampleTextForSystem_native_QFontDatabase_WritingSystem_cref_QString(QtJambi_LibraryUtilities.internal.nativeId(this), writingSystem.value(), sampleText); } @io.qt.QtUninvokable private native void setSampleTextForSystem_native_QFontDatabase_WritingSystem_cref_QString(long __this__nativeId, int writingSystem, java.lang.String sampleText); /** *

See QFontComboBox::setWritingSystem(QFontDatabase::WritingSystem)

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

See QFontComboBox::writingSystem()const

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

See QObject::event(QEvent*)

*/ @io.qt.QtUninvokable public boolean event(io.qt.core.QEvent e){ return event_native_QEvent_ptr(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(e)); } @io.qt.QtUninvokable private native boolean event_native_QEvent_ptr(long __this__nativeId, long e); /** *

See QWidget::sizeHint()const

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy