#include <kfontdialog.h>
Public Types | |
| enum | FontColumn |
| enum | FontDiff |
| enum | FontListCriteria |
Signals | |
| void | fontSelected (const QFont &font) |
Public Methods | |
| KFontChooser (QWidget *parent=0L, const char *name=0L, bool onlyFixed=false, const QStringList &fontList=QStringList(), bool makeFrame=true, int visibleListSize=8, bool diff=false, QButton::ToggleState *sizeIsRelativeState=0L) | |
| virtual | ~KFontChooser () |
| void | enableColumn (int column, bool state) |
| void | setFont (const QFont &font, bool onlyFixed=false) |
| int | fontDiffFlags () |
| QFont | font () const |
| void | setColor (const QColor &col) |
| QColor | color () const |
| void | setBackgroundColor (const QColor &col) |
| QColor | backgroundColor () const |
| void | setSizeIsRelative (QButton::ToggleState relative) |
| QButton::ToggleState | sizeIsRelative () const |
| QString | sampleText () const |
| void | setSampleText (const QString &text) |
| virtual QSize | sizeHint (void) const |
Static Public Methods | |
| QString | getXLFD (const QFont &theFont) |
| void | getFontList (QStringList &list, uint fontListCriteria) |
While KFontChooser as an ordinary widget can be embedded in custom dialogs and therefore is very flexible, in most cases it is preferable to use the convenience functions in KFontDialog.
Definition at line 51 of file kfontdialog.h.
|
|
Definition at line 61 of file kfontdialog.h. |
|
|
Definition at line 68 of file kfontdialog.h. |
|
|
The selection criteria for the font families shown in the dialog.
Definition at line 222 of file kfontdialog.h. |
|
||||||||||||||||||||||||||||||||||||
|
Constructs a font picker widget. It normally comes up with all font families present on the system; the getFont method below does allow some more fine-tuning of the selection of fonts that will be displayed in the dialog. Consider the following code snippet;
QStringList list;
KFontChooser::getFontList(list,SmoothScalableFonts);
KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list);
The above creates a font chooser dialog with only SmoothScaleble fonts.
|
|
|
Destructs the font chooser. |
|
|
|
|
|
|
|
||||||||||||
|
Enables or disable a font column in the chooser. Use this function if your application does not need or supports all font properties.
|
|
|
Definition at line 144 of file kfontdialog.h. Referenced by KFontDialog::font(). |
|
|
|
|
|
Emitted whenever the selected font changes. |
|
||||||||||||
|
Creates a list of font strings.
|
|
|
Converts a QFont into the corresponding X Logical Font Description (XLFD).
Definition at line 208 of file kfontdialog.h. |
|
|
Definition at line 184 of file kfontdialog.h. |
|
|
Sets the background color to use in the preview. |
|
|
Sets the color to use in the preview. |
|
||||||||||||
|
Sets the currently selected font in the chooser.
Referenced by KFontDialog::setFont(). |
|
|
Sets the sample text. Normally you should not change this text, but it can be better to do this if the default text is too large for the edit area when using the default font of your application.
Definition at line 196 of file kfontdialog.h. |
|
|
Sets the state of the checkbox indicating whether the font size is to be interpreted as relative size. NOTE: If parameter sizeIsRelative was not set in the constructor of the widget this setting will be ignored. Referenced by KFontDialog::setSizeIsRelative(). |
|
|
Reimplemented for internal reasons. |
|
|
Referenced by KFontDialog::sizeIsRelative(). |
1.2.18