#include <kfontrequester.h>
This class provides a widget with a lineedit and a button, which invokes a font dialog (KFontDialog).
The lineedit provides a preview of the selected font. The preview text can be customized. You can also have the font dialog show only the fixed fonts.
KDE Font Requester
- Author
- Nadeem Hasan nhasa.nosp@m.n@kd.nosp@m.e.org
Definition at line 44 of file kfontrequester.h.
§ KFontRequester()
KFontRequester::KFontRequester |
( |
QWidget * |
parent = 0L , |
|
|
bool |
onlyFixed = false |
|
) |
| |
|
explicit |
Constructs a font requester widget.
- Parameters
-
parent | The parent widget. |
onlyFixed | Only display fonts which have fixed-width character sizes. |
Definition at line 101 of file kfontrequester.cpp.
§ ~KFontRequester()
KFontRequester::~KFontRequester |
( |
| ) |
|
§ button()
§ font()
QFont KFontRequester::font |
( |
| ) |
const |
- Returns
- The currently selected font in the requester.
§ fontSelected
void KFontRequester::fontSelected |
( |
const QFont & |
font | ) |
|
|
signal |
Emitted when a new font
has been selected in the underlying dialog.
§ isFixedOnly()
bool KFontRequester::isFixedOnly |
( |
| ) |
const |
- Returns
- Returns true if only fixed fonts are displayed.
Definition at line 134 of file kfontrequester.cpp.
§ label()
QLabel * KFontRequester::label |
( |
| ) |
const |
§ sampleText()
QString KFontRequester::sampleText |
( |
| ) |
const |
- Returns
- The current text in the sample text input area.
§ setFont()
void KFontRequester::setFont |
( |
const QFont & |
font, |
|
|
bool |
onlyFixed = false |
|
) |
| |
|
virtual |
Sets the currently selected font in the requester.
- Parameters
-
font | The font to select. |
onlyFixed | Display only fixed-width fonts in the font dialog if true , or vice-versa. |
Definition at line 159 of file kfontrequester.cpp.
§ setSampleText()
void KFontRequester::setSampleText |
( |
const QString & |
text | ) |
|
|
virtual |
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. Default text is current font name and size. Setting the text to QString() will restore the default.
- Parameters
-
text | The new sample text. The current will be removed. |
Definition at line 168 of file kfontrequester.cpp.
§ setTitle()
void KFontRequester::setTitle |
( |
const QString & |
title | ) |
|
|
virtual |
Set the title for the widget that will be used in the tooltip and what's this text.
- Parameters
-
title | The title to be set. |
Definition at line 174 of file kfontrequester.cpp.
§ title()
QString KFontRequester::title |
( |
| ) |
const |
- Returns
- The current title of the widget.
§ font
QFont KFontRequester::font |
|
readwrite |
§ sampleText
QString KFontRequester::sampleText |
|
readwrite |
§ title
QString KFontRequester::title |
|
readwrite |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2016 The KDE developers.
Generated on Thu Oct 20 2016 07:17:59 by
doxygen 1.8.12 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.