KFontDialog Class Reference
The KFontDialog provides a dialog for interactive font selection. A font selection dialog. More...
#include <kfontdialog.h>
Inheritance diagram for KFontDialog:

Signals | |
void | fontSelected (const QFont &font) |
Public Methods | |
KFontDialog (QWidget *parent=0L, const char *name=0, bool onlyFixed=false, bool modal=false, const QStringList &fontlist=QStringList(), bool makeFrame=true, bool diff=false, QButton::ToggleState *sizeIsRelativeState=0L) | |
void | setFont (const QFont &font, bool onlyFixed=false) |
QFont | font () const |
void | setSizeIsRelative (QButton::ToggleState relative) |
QButton::ToggleState | sizeIsRelative () const |
Static Public Methods | |
int | getFont (QFont &theFont, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
int | getFontDiff (QFont &theFont, int &diffFlags, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
int | getFontAndText (QFont &theFont, QString &theString, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
Protected Methods | |
virtual void | virtual_hook (int id, void *data) |
Detailed Description
The KFontDialog provides a dialog for interactive font selection. A font selection dialog.It is basically a thin wrapper around the KFontChooser widget, which can also be used standalone. In most cases, the simplest use of this class is the static method KFontDialog::getFont(), which pops up the dialog, allows the user to select a font, and returns when the dialog is closed.
Example:
QFont myFont; int result = KFontDialog::getFont( myFont ); if ( result == KFontDialog::Accepted ) ...

KDE Font Dialog
- Author:
- Preston Brown <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org>
- Version:
- Id:
- kfontdialog.h,v 1.68 2003/09/09 12:40:58 bhards Exp
Definition at line 324 of file kfontdialog.h.
Constructor & Destructor Documentation
|
Constructs a font selection dialog.
Definition at line 728 of file kfontdialog.cpp. References KDialogBase::setMainWidget(). |
Member Function Documentation
|
Sets the currently selected font in the dialog.
Definition at line 363 of file kfontdialog.h. References font(), and KFontChooser::setFont(). Referenced by getFont(), getFontAndText(), and getFontDiff(). |
|
Definition at line 369 of file kfontdialog.h. References KFontChooser::font(). Referenced by setFont(). |
|
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 dialog this setting will be ignored. Definition at line 377 of file kfontdialog.h. References KFontChooser::setSizeIsRelative(). |
|
Definition at line 384 of file kfontdialog.h. References KFontChooser::sizeIsRelative(). |
|
Creates a modal font dialog, lets the user choose a font, and returns when the dialog is closed.
Definition at line 760 of file kfontdialog.cpp. References chooser, QDialog::exec(), KFontChooser::font(), QDialog::result(), setFont(), and KFontChooser::sizeIsRelative(). Referenced by KEdit::selectFont(). |
|
Creates a modal font difference dialog, lets the user choose a selection of changes that should be made to a set of fonts, and returns when the dialog is closed. Useful for choosing slight adjustments to the font set when the user would otherwise have to manually edit a number of fonts.
Definition at line 741 of file kfontdialog.cpp. References chooser, QDialog::exec(), KFontChooser::font(), KFontChooser::fontDiffFlags(), QDialog::result(), setFont(), and KFontChooser::sizeIsRelative(). |
|
When you are not only interested in the font selected, but also in the example string typed in, you can call this method.
Definition at line 779 of file kfontdialog.cpp. References chooser, QDialog::exec(), KFontChooser::font(), QDialog::result(), KFontChooser::sampleText(), setFont(), and KFontChooser::sizeIsRelative(). |
|
Emitted whenever the currently selected font changes. Connect to this to monitor the font as it is selected if you are not running modal. |
The documentation for this class was generated from the following files: