|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QWidget
com.trolltech.qt.gui.QComboBox
com.trolltech.qt.gui.QFontComboBox
public class QFontComboBox
The QFontComboBox widget is a combobox that lets the user select a font family.
The combobox is populated with an alphabetized list of font family names, such as Arial, Helvetica, and Times New Roman. Family names are displayed using the actual font when possible. For fonts such as Symbol, where the name is not representable in the font itself, a sample of the font is displayed next to the family name.
QFontComboBox is often used in toolbars, in conjunction with a QComboBox for controlling the font size and two QToolButtons for bold and italic.
When the user selects a new font, the currentFontChanged signal is emitted in addition to currentIndexChanged.
Call setWritingSystem to tell QFontComboBox to show only fonts that support a given writing system, and setFontFilters to filter out certain types of fonts as e.g. non scalable fonts or monospaced fonts.
Map Example
Nested Class Summary | |
---|---|
static class |
QFontComboBox.FontFilter
This enum can be used to only show certain types of fonts in the font combo box. |
static class |
QFontComboBox.FontFilters
This QFlag class provides flags for the int enum. |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QComboBox |
---|
QComboBox.InsertPolicy, QComboBox.SizeAdjustPolicy |
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QWidget |
---|
QWidget.RenderFlag, QWidget.RenderFlags |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I> |
Field Summary | |
---|---|
QSignalEmitter.Signal1<QFont> |
currentFontChanged
This signal is emitted whenever the current font changes, with the new f. |
Fields inherited from class com.trolltech.qt.gui.QComboBox |
---|
activated, activatedIndex, currentIndexChanged, currentStringChanged, editTextChanged, highlighted, highlightedIndex |
Fields inherited from class com.trolltech.qt.gui.QWidget |
---|
customContextMenuRequested |
Constructor Summary | |
---|---|
QFontComboBox()
Equivalent to QFontComboBox(0). |
|
QFontComboBox(QWidget parent)
Constructs a font combobox with the given parent. |
Method Summary | |
---|---|
QFont |
currentFont()
Returns the currently selected font. |
boolean |
event(QEvent e)
This function is reimplemented for internal reasons. |
QFontComboBox.FontFilters |
fontFilters()
Returns the filter for the combobox. |
static QFontComboBox |
fromNativePointer(QNativePointer nativePointer)
This function returns the QFontComboBox instance pointed to by nativePointer |
void |
setCurrentFont(QFont f)
Sets the currently selected font to f. |
void |
setFontFilters(QFontComboBox.FontFilter... filters)
Sets the filter for the combobox to filters. |
void |
setFontFilters(QFontComboBox.FontFilters filters)
Sets the filter for the combobox to filters. |
void |
setWritingSystem(QFontDatabase.WritingSystem arg__1)
Sets the writing system that serves as a filter for the combobox to arg__1. |
QSize |
sizeHint()
This function is reimplemented for internal reasons. |
QFontDatabase.WritingSystem |
writingSystem()
Returns the writing system that serves as a filter for the combobox. |
Methods inherited from class com.trolltech.qt.core.QObject |
---|
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
disconnect, disconnect, signalSender |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Field Detail |
---|
public final QSignalEmitter.Signal1<QFont> currentFontChanged
This signal is emitted whenever the current font changes, with the new f.
Constructor Detail |
---|
public QFontComboBox()
Equivalent to QFontComboBox(0).
public QFontComboBox(QWidget parent)
Constructs a font combobox with the given parent.
Method Detail |
---|
public final QFont currentFont()
Returns the currently selected font.
public final QFontComboBox.FontFilters fontFilters()
Returns the filter for the combobox.
By default, all fonts are listed.
public final void setCurrentFont(QFont f)
Sets the currently selected font to f.
public final void setFontFilters(QFontComboBox.FontFilter... filters)
Sets the filter for the combobox to filters.
By default, all fonts are listed.
public final void setFontFilters(QFontComboBox.FontFilters filters)
Sets the filter for the combobox to filters.
By default, all fonts are listed.
public final void setWritingSystem(QFontDatabase.WritingSystem arg__1)
Sets the writing system that serves as a filter for the combobox to arg__1.
If script is QFontDatabase::Any (the default), all fonts are listed.
public final QFontDatabase.WritingSystem writingSystem()
Returns the writing system that serves as a filter for the combobox.
If script is QFontDatabase::Any (the default), all fonts are listed.
public boolean event(QEvent e)
This function is reimplemented for internal reasons.
event
in class QComboBox
public QSize sizeHint()
This function is reimplemented for internal reasons.
sizeHint
in class QComboBox
public static QFontComboBox fromNativePointer(QNativePointer nativePointer)
nativePointer
- the QNativePointer of which object should be returned.
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |