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

Signals | |
void | fontSelected (const QFont &font) |
Public Member Functions | |
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 Member Functions | |
static int | getFont (QFont &theFont, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
static int | getFontDiff (QFont &theFont, int &diffFlags, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
static int | getFontAndText (QFont &theFont, QString &theString, bool onlyFixed=false, QWidget *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KFontChooser * | chooser |
Detailed Description
A font selection dialog.The KFontDialog provides a dialog for interactive font selection. 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 353310 2004-10-10 10:27:49Z bhards
Definition at line 326 of file kfontdialog.h.
Constructor & Destructor Documentation
|
Constructs a font selection dialog.
Definition at line 727 of file kfontdialog.cpp. References chooser, and KDialogBase::setMainWidget(). |
Member Function Documentation
|
Sets the currently selected font in the dialog.
Definition at line 365 of file kfontdialog.h. Referenced by getFont(), getFontAndText(), and getFontDiff(). |
|
Definition at line 371 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 dialog this setting will be ignored. Definition at line 379 of file kfontdialog.h. |
|
Definition at line 386 of file kfontdialog.h. |
|
Creates a modal font dialog, lets the user choose a font, and returns when the dialog is closed.
Definition at line 759 of file kfontdialog.cpp. References chooser, QDialog::exec(), KFontChooser::font, QDialog::result(), setFont(), and KFontChooser::sizeIsRelative(). Referenced by KFontRequester::buttonClicked(), and 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 740 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 778 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: