.TH "KFontDialog" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KFontDialog \- The KFontDialog provides a dialog for interactive font selection. A font selection dialog.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kfontdialog.h>\fP
.PP
Inherits \fBKDialogBase\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBfontSelected\fP (const  \fBQFont\fP &font)"
.br
.RI "\fIEmitted whenever the currently selected font changes. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKFontDialog\fP (\fBQWidget\fP *parent=0L, const  char *name=0, bool onlyFixed=false, bool modal=false, const  \fBQStringList\fP &fontlist=\fBQStringList\fP(), bool makeFrame=true, bool diff=false, QButton::ToggleState *sizeIsRelativeState=0L)"
.br
.RI "\fIConstructs a font selection dialog. \fP"
.ti -1c
.RI "void \fBsetFont\fP (const  \fBQFont\fP &font, bool onlyFixed=false)"
.br
.RI "\fISets the currently selected font in the dialog. \fP"
.ti -1c
.RI "\fBQFont\fP \fBfont\fP () const "
.br
.ti -1c
.RI "void \fBsetSizeIsRelative\fP (QButton::ToggleState relative)"
.br
.RI "\fISets the state of the checkbox indicating whether the font size is to be interpreted as relative size. \fP"
.ti -1c
.RI "QButton::ToggleState \fBsizeIsRelative\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "int \fBgetFont\fP (\fBQFont\fP &theFont, bool onlyFixed=false, \fBQWidget\fP *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L)"
.br
.RI "\fICreates a modal font dialog, lets the user choose a font, and returns when the dialog is closed. \fP"
.ti -1c
.RI "int \fBgetFontDiff\fP (\fBQFont\fP &theFont, int &diffFlags, bool onlyFixed=false, \fBQWidget\fP *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L)"
.br
.RI "\fICreates 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. \fP"
.ti -1c
.RI "int \fBgetFontAndText\fP (\fBQFont\fP &theFont, \fBQString\fP &theString, bool onlyFixed=false, \fBQWidget\fP *parent=0L, bool makeFrame=true, QButton::ToggleState *sizeIsRelativeState=0L)"
.br
.RI "\fIWhen you are not only interested in the font selected, but also in the example string typed in, you can call this method. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKFontChooser\fP * \fBchooser\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
The KFontDialog provides a dialog for interactive font selection. A font selection dialog. 

It is basically a thin wrapper around the \fBKFontChooser\fP widget, which can also be used standalone. In most cases, the simplest use of this class is the static method \fBKFontDialog::getFont\fP(), which pops up the dialog, allows the user to select a font, and returns when the dialog is closed.
.PP
Example:
.PP
.PP
.nf

      \fBQFont\fP myFont;
      int result = KFontDialog::getFont( myFont );
      if ( result == KFontDialog::Accepted )
            ...
 
.PP
.PP
KDE Font Dialog 
.PP
\fBAuthor:\fP
.RS 4
Preston Brown <pbrown@kde.org>, Bernd Wuebben <wuebben@kde.org> 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkfontdialog.h\fP,v 1.61 2002/09/11 02:18:25 orlovich Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 319 of file kfontdialog.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KFontDialog::KFontDialog (\fBQWidget\fP * parent = 0L, const char * name = 0, bool onlyFixed = false, bool modal = false, const \fBQStringList\fP & fontlist = \fBQStringList\fP(), bool makeFrame = true, bool diff = false, QButton::ToggleState * sizeIsRelativeState = 0L)"
.PP
Constructs a font selection dialog. \fBParameters:\fP
.RS 4
\fIparent\fP The parent widget of the dialog, if any. 
.br
\fIname\fP The name of the dialog. 
.br
\fImodal\fP Specifies whether the dialog is modal or not. 
.br
\fIonlyFixed\fP only display fonts which have fixed-width character sizes. 
.br
\fIfontlist\fP a list of fonts to display, in XLFD format. If no list is formatted, the internal \fBKDE\fP font list is used. If that has not been created, X is queried, and all fonts available on the system are displayed. 
.br
\fImakeFrame\fP Draws a frame with titles around the contents. 
.br
\fIdiff\fP Display the difference version dialog. See \fBgetFontDiff()\fP. 
.br
\fIsizeIsRelativeState\fP If not zero the widget will show a checkbox where the user may choose whether the font size is to be interpreted as relative size. Initial state of this checkbox will be set according to *sizeIsRelativeState, user choice may be retrieved by calling \fBsizeIsRelative()\fP. 
.RE
.PP
Definition at line 723 of file kfontdialog.cpp.
.PP
References KStdAccel::name(), and KDialogBase::setMainWidget().
.SH "Member Function Documentation"
.PP 
.SS "void KFontDialog::setFont (const \fBQFont\fP & font, bool onlyFixed = false)\fC [inline]\fP"
.PP
Sets the currently selected font in the dialog. \fBParameters:\fP
.RS 4
\fIfont\fP The font to select. 
.br
\fIonlyFixed\fP readjust the font list to display only fixed width fonts if true, or vice-versa 
.RE
.PP
Definition at line 358 of file kfontdialog.h.
.PP
References KFontChooser::setFont().
.PP
Referenced by getFont(), getFontAndText(), and getFontDiff().
.SS "\fBQFont\fP KFontDialog::font () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
The currently selected font in the dialog. 
.RE
.PP
Definition at line 364 of file kfontdialog.h.
.PP
References KFontChooser::font().
.SS "void KFontDialog::setSizeIsRelative (QButton::ToggleState relative)\fC [inline]\fP"
.PP
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 372 of file kfontdialog.h.
.PP
References KFontChooser::setSizeIsRelative().
.SS "QButton::ToggleState KFontDialog::sizeIsRelative () const\fC [inline]\fP"
.PP
\fBReturns:\fP
.RS 4
Whether the font size is to be interpreted as relative size (default: false) 
.RE
.PP
Definition at line 379 of file kfontdialog.h.
.PP
References KFontChooser::sizeIsRelative().
.SS "int KFontDialog::getFont (\fBQFont\fP & theFont, bool onlyFixed = false, \fBQWidget\fP * parent = 0L, bool makeFrame = true, QButton::ToggleState * sizeIsRelativeState = 0L)\fC [static]\fP"
.PP
Creates a modal font dialog, lets the user choose a font, and returns when the dialog is closed. \fBParameters:\fP
.RS 4
\fItheFont\fP a reference to the font to write the chosen font into. 
.br
\fIonlyFixed\fP if true, only select from fixed-width fonts. 
.br
\fIparent\fP Parent widget of the dialog. Specifying a widget different from 0 (Null) improves centering (looks better). 
.br
\fImakeFrame\fP Draws a frame with titles around the contents. 
.br
\fIsizeIsRelativeState\fP If not zero the widget will show a checkbox where the user may choose whether the font size is to be interpreted as relative size. Initial state of this checkbox will be set according to *sizeIsRelativeState and user choice will be returned therein.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBQDialog::result\fP(). 
.RE
.PP
Definition at line 755 of file kfontdialog.cpp.
.PP
References chooser, QDialog::exec(), KFontChooser::font(), QDialog::result(), setFont(), and KFontChooser::sizeIsRelative().
.PP
Referenced by KEdit::selectFont().
.SS "int KFontDialog::getFontDiff (\fBQFont\fP & theFont, int & diffFlags, bool onlyFixed = false, \fBQWidget\fP * parent = 0L, bool makeFrame = true, QButton::ToggleState * sizeIsRelativeState = 0L)\fC [static]\fP"
.PP
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.
.PP
\fBParameters:\fP
.RS 4
\fItheFont\fP a reference to the font to write the chosen font into. 
.br
\fIdiffFlags\fP a reference to the int into which the chosen difference selection bitmask should be written. Check the returned bitmask like: 
.PP
.nf

        if ( diffFlags & KFontChooser::FontDiffFamily )
            [...]
        if ( diffFlags & KFontChooser::FontDiffStyle )
            [...]
        if ( diffFlags & KFontChooser::FontDiffSize )
            [...]
        
.PP
 
.br
\fIonlyFixed\fP if true, only select from fixed-width fonts. 
.br
\fIparent\fP Parent widget of the dialog. Specifying a widget different from 0 (Null) improves centering (looks better). 
.br
\fImakeFrame\fP Draws a frame with titles around the contents. 
.br
\fIsizeIsRelativeState\fP If not zero the widget will show a checkbox where the user may choose whether the font size is to be interpreted as relative size. Initial state of this checkbox will be set according to *sizeIsRelativeState and user choice will be returned therein.
.RE
.PP
\fBReturns:\fP
.RS 4
\fBQDialog::result\fP(). 
.RE
.PP
Definition at line 736 of file kfontdialog.cpp.
.PP
References chooser, QDialog::exec(), KFontChooser::font(), KFontChooser::fontDiffFlags(), QDialog::result(), setFont(), and KFontChooser::sizeIsRelative().
.SS "int KFontDialog::getFontAndText (\fBQFont\fP & theFont, \fBQString\fP & theString, bool onlyFixed = false, \fBQWidget\fP * parent = 0L, bool makeFrame = true, QButton::ToggleState * sizeIsRelativeState = 0L)\fC [static]\fP"
.PP
When you are not only interested in the font selected, but also in the example string typed in, you can call this method. \fBParameters:\fP
.RS 4
\fItheFont\fP a reference to the font to write the chosen font into. 
.br
\fItheString\fP a reference to the example text that was typed. 
.br
\fIonlyFixed\fP if true, only select from fixed-width fonts. 
.br
\fIparent\fP Parent widget of the dialog. Specifying a widget different from 0 (Null) improves centering (looks better). 
.br
\fImakeFrame\fP Draws a frame with titles around the contents. 
.br
\fIsizeIsRelativeState\fP If not zero the widget will show a checkbox where the user may choose whether the font size is to be interpreted as relative size. Initial state of this checkbox will be set according to *sizeIsRelativeState and user choice will be returned therein. 
.RE
.PP
\fBReturns:\fP
.RS 4
The result of the dialog. 
.RE
.PP
Definition at line 774 of file kfontdialog.cpp.
.PP
References chooser, QDialog::exec(), KFontChooser::font(), QDialog::result(), KFontChooser::sampleText(), setFont(), and KFontChooser::sizeIsRelative().
.SS "void KFontDialog::fontSelected (const \fBQFont\fP & font)\fC [signal]\fP"
.PP
Emitted whenever the currently selected font changes. Connect to this to monitor the font as it is selected if you are not running modal. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
