QFontComboBox Class Reference [модуль QtGui]
The QFontComboBox widget is a combobox that lets the user select a font family. Далее...
#include <QFontComboBox> Inherits QComboBox.
Класс был добавлен в Qt 4.2.
Открытые типы
- enum FontFilter { AllFonts, ScalableFonts, NonScalableFonts, MonospacedFonts, ProportionalFonts }
- flags FontFilters
Свойства
Открытые функции
- 55 public functions inherited from QComboBox
- 207 открытых функций, унаследованных от QWidget
- 29 открытых функций, унаследованных от QObject
- 12 открытых функций, унаследованных от QPaintDevice
Открытые слоты
- 4 public slots inherited from QComboBox
- 19 открытых слотов, унаследованных от QWidget
- 1 открытый слот, унаследованный от QObject
Сигналы
Дополнительные унаследованные члены
- 4 статических открытых члена, унаследованных от QWidget
- 5 статических открытых членов, унаследованных от QObject
- 1 protected function inherited from QComboBox
- 37 защищенных функций, унаследованных от QWidget
- 7 защищенных функций, унаследованных от QObject
- 1 защищённая функция, унаследованная от QPaintDevice
- 1 защищенный слот, унаследованный от QWidget
Подробное описание
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.
See also QComboBox, QFont, QFontInfo, QFontMetrics, QFontDatabase, and Character Map Example.
Описание типов-членов
enum QFontComboBox::FontFilter flags QFontComboBox::FontFilters
This enum can be used to only show certain types of fonts in the font combo box.
Константа | Значение | Описание |
QFontComboBox::AllFonts | 0 | Show all fonts |
QFontComboBox::ScalableFonts | 0x1 | Show scalable fonts |
QFontComboBox::NonScalableFonts | 0x2 | Show non scalable fonts |
QFontComboBox::MonospacedFonts | 0x4 | Show monospaced fonts |
QFontComboBox::ProportionalFonts | 0x8 | Show proportional fonts |
The FontFilters type is a typedef for QFlags<FontFilter>. It stores an OR combination of FontFilter values.
Описание свойств
currentFont : QFont
This property holds the currently selected font.
Функции доступа:
- QFont currentFont () const
- void setCurrentFont ( const QFont & font )
See also currentFontChanged(), currentIndex, and currentText.
This property holds the filter for the combobox.
By default, all fonts are listed.
Функции доступа:
- FontFilters fontFilters () const
- void setFontFilters ( FontFilters filters )
See also writingSystem.
This property holds the writing system that serves as a filter for the combobox.
If script is QFontDatabase::Any (the default), all fonts are listed.
Функции доступа:
- QFontDatabase::WritingSystem writingSystem () const
- void setWritingSystem ( QFontDatabase::WritingSystem script )
See also fontFilters.
Описание функций-членов
QFontComboBox::QFontComboBox ( QWidget * parent = 0 )
Constructs a font combobox with the given parent.
QFontComboBox::~QFontComboBox ()
Destroys the combobox.
void QFontComboBox::currentFontChanged ( const QFont & font ) [signal]
This signal is emitted whenever the current font changes, with the new font.
See also currentFont.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Торговые марки |
Qt 4.5.3 |
|