#include <KFontDialog_local.h>
Graphe de collaboration de KFontChooser_local:
Types publics | |
enum | FontColumn { FamilyList = 0x01, StyleList = 0x02, SizeList = 0x04 } |
enum | FontDiff { FontDiffFamily = 0x01, FontDiffStyle = 0x02, FontDiffSize = 0x04 } |
enum | FontListCriteria { FixedWidthFonts = 0x01, ScalableFonts = 0x02, SmoothScalableFonts = 0x04 } |
Signaux | |
void | fontSelected (const QFont &font) |
Fonctions membres publiques | |
KFontChooser_local (QWidget *parent=0L, bool onlyFixed=false, const QStringList &fontList=QStringList(), bool makeFrame=true, int visibleListSize=8, bool diff=false, Qt::CheckState *sizeIsRelativeState=0L) | |
virtual | ~KFontChooser_local () |
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 (Qt::CheckState relative) |
Qt::CheckState | sizeIsRelative () const |
QString | sampleText () const |
void | setSampleText (const QString &text) |
void | setSampleBoxVisible (bool visible) |
void | setFamilyList (const QStringList &list) |
virtual QSize | sizeHint (void) const |
Fonctions membres publiques statiques | |
static QString | getXLFD (const QFont &theFont) |
static void | getFontList (QStringList &list, uint fontListCriteria) |
Fonctions membres protégées | |
virtual void | virtual_hook (int id, void *data) |
Propriétés | |
QFont | font [] |
Connecteurs privés | |
void | toggled_checkbox () |
void | family_chosen_slot (const QString &) |
void | size_chosen_slot (const QString &) |
void | style_chosen_slot (const QString &) |
void | displaySample (const QFont &font) |
void | showXLFDArea (bool) |
void | size_value_slot (int) |
Fonctions membres privées | |
void | fillFamilyListBox (bool onlyFixedFonts=false) |
void | fillSizeList () |
void | setupDisplay () |
Fonctions membres privées statiques | |
static void | addFont (QStringList &list, const char *xfont) |
Attributs privés | |
QStringList | fontList |
KIntNumInput * | sizeOfFont |
QLineEdit * | sampleEdit |
QLineEdit * | xlfdEdit |
QLabel * | familyLabel |
QLabel * | styleLabel |
QCheckBox * | familyCheckbox |
QCheckBox * | styleCheckbox |
QCheckBox * | sizeCheckbox |
QLabel * | sizeLabel |
KListBox * | familyListBox |
KListBox * | styleListBox |
KListBox * | sizeListBox |
QComboBox * | charsetsCombo |
QCheckBox * | sizeIsRelativeCheckBox |
QFont | selFont |
QString | selectedFamily |
QString | selectedStyle |
int | selectedSize |
QMap< QString, QString > | currentStyles |
bool | usingFixed |
KFontChooser_localPrivate * | d |
Classes | |
class | KFontChooser_localPrivate |
While KFontChooser_local 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_local.
Définition à la ligne 59 du fichier KFontDialog_local.h.
FamilyList
- Identifies the family (leftmost) list. StyleList
- Identifies the style (center) list. SizeList
- Identifies the size (rightmost) list. Définition à la ligne 70 du fichier KFontDialog_local.h.
FontDiffFamily
- Identifies a requested change in the font family. FontDiffStyle
- Identifies a requested change in the font style. FontDiffSize
- Identifies a requested change in the font size. Définition à la ligne 77 du fichier KFontDialog_local.h.
The selection criteria for the font families shown in the dialog.
FixedWidthFont
when included only fixed-width fonts are returned. The fonts where the width of every character is equal. ScalableFont
when included only scalable fonts are returned; certain configurations allow bitmap fonts to remain unscaled and thus these fonts have limited number of sizes. SmoothScalableFont
when included only return smooth scalable fonts. this will return only non-bitmap fonts which are scalable to any size requested. Setting this option to true will mean the "scalable" flag is irrelavant. Définition à la ligne 245 du fichier KFontDialog_local.h.
KFontChooser_local::KFontChooser_local | ( | QWidget * | parent = 0L , |
|
bool | onlyFixed = false , |
|||
const QStringList & | fontList = QStringList() , |
|||
bool | makeFrame = true , |
|||
int | visibleListSize = 8 , |
|||
bool | diff = false , |
|||
Qt::CheckState * | sizeIsRelativeState = 0L | |||
) |
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_local::getFontList(list,SmoothScalableFonts); KFontChooser_local chooseFont = new KFontChooser_local(0, "FontList", false, list);
The above creates a font chooser dialog with only SmoothScaleble fonts.
parent | The parent widget. | |
name | The widget name. | |
onlyFixed | Only display fonts which have fixed-width character sizes. | |
fontList | A list of fonts to display, in XLFD format. If no list is formatted, the internal KDE font list is used. If that has not been created, X is queried, and all fonts available on the system are displayed. | |
diff | Display the difference version dialog. See KFontDialog_local::getFontDiff(). | |
makeFrame | Draws a frame with titles around the contents. | |
visibleListSize | The minimum number of visible entries in the fontlists. | |
sizeIsRelativeState | 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 sizeIsRelative(). |
Définition à la ligne 100 du fichier KFontDialog_local.cpp.
Références charsetsCombo, d, displaySample(), family_chosen_slot(), familyCheckbox, familyLabel, familyListBox, fillFamilyListBox(), fillSizeList(), fontSelected(), minimumListHeight(), minimumListWidth(), sampleEdit, setFont(), setSizeIsRelative(), showXLFDArea(), size_chosen_slot(), size_value_slot(), sizeCheckbox, sizeIsRelativeCheckBox, sizeLabel, sizeListBox, sizeOfFont, style_chosen_slot(), styleCheckbox, styleLabel, styleListBox, toggled_checkbox(), usingFixed, et xlfdEdit.
Voici le graphe d'appel pour cette fonction :
KFontChooser_local::~KFontChooser_local | ( | ) | [virtual] |
Destructs the font chooser.
Définition à la ligne 359 du fichier KFontDialog_local.cpp.
Références d.
void KFontChooser_local::enableColumn | ( | int | column, | |
bool | state | |||
) |
Enables or disable a font column in the chooser.
Use this function if your application does not need or supports all font properties.
column | Specify the columns. An or'ed combination of FamilyList , StyleList and SizeList is possible. | |
state | If false the columns are disabled. |
Définition à la ligne 433 du fichier KFontDialog_local.cpp.
Références FamilyList, familyListBox, SizeList, sizeListBox, StyleList, et styleListBox.
void KFontChooser_local::setFont | ( | const QFont & | font, | |
bool | onlyFixed = false | |||
) |
Sets the currently selected font in the chooser.
font | The font to select. | |
onlyFixed | Readjust the font list to display only fixed width fonts if true , or vice-versa. |
Définition à la ligne 450 du fichier KFontDialog_local.cpp.
Références displaySample(), fillFamilyListBox(), selectedSize, selFont, setupDisplay(), et usingFixed.
Référencé par KFontChooser_local(), et setFamilyList().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
int KFontChooser_local::fontDiffFlags | ( | ) |
Définition à la ligne 467 du fichier KFontDialog_local.cpp.
Références familyCheckbox, FontDiffFamily, FontDiffSize, FontDiffStyle, Py::int, sizeCheckbox, et styleCheckbox.
Référencé par KFontDialog_local::getFontDiff().
Voici le graphe d'appel pour cette fonction :
QFont KFontChooser_local::font | ( | ) | const [inline] |
Définition à la ligne 155 du fichier KFontDialog_local.h.
Référencé par addFont().
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::setColor | ( | const QColor & | col | ) |
Sets the color to use in the preview.
Définition à la ligne 383 du fichier KFontDialog_local.cpp.
Références d, KFontChooser_local::KFontChooser_localPrivate::m_palette, et sampleEdit.
QColor KFontChooser_local::color | ( | ) | const |
Définition à la ligne 391 du fichier KFontDialog_local.cpp.
Références d, et KFontChooser_local::KFontChooser_localPrivate::m_palette.
void KFontChooser_local::setBackgroundColor | ( | const QColor & | col | ) |
Sets the background color to use in the preview.
Définition à la ligne 396 du fichier KFontDialog_local.cpp.
Références d, KFontChooser_local::KFontChooser_localPrivate::m_palette, et sampleEdit.
QColor KFontChooser_local::backgroundColor | ( | ) | const |
Définition à la ligne 404 du fichier KFontDialog_local.cpp.
Références d, et KFontChooser_local::KFontChooser_localPrivate::m_palette.
void KFontChooser_local::setSizeIsRelative | ( | Qt::CheckState | relative | ) |
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.
Définition à la ligne 409 du fichier KFontDialog_local.cpp.
Références sizeIsRelativeCheckBox.
Référencé par KFontChooser_local().
Voici le graphe d'appel pour cette fonction :
Qt::CheckState KFontChooser_local::sizeIsRelative | ( | ) | const |
Définition à la ligne 420 du fichier KFontDialog_local.cpp.
Références sizeIsRelativeCheckBox.
Référencé par KFontDialog_local::getFont(), KFontDialog_local::getFontAndText(), et KFontDialog_local::getFontDiff().
Voici le graphe d'appel pour cette fonction :
QString KFontChooser_local::sampleText | ( | ) | const [inline] |
Définition à la ligne 197 du fichier KFontDialog_local.h.
Référencé par KFontDialog_local::getFontAndText().
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::setSampleText | ( | const QString & | text | ) | [inline] |
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.
text | The new sample text. The current will be removed. |
Définition à la ligne 209 du fichier KFontDialog_local.h.
void KFontChooser_local::setSampleBoxVisible | ( | bool | visible | ) | [inline] |
Shows or hides the sample text box.
visible | Set it to true to show the box, to false to hide it. |
Définition à la ligne 219 du fichier KFontDialog_local.h.
static QString KFontChooser_local::getXLFD | ( | const QFont & | theFont | ) | [inline, static] |
Converts a QFont into the corresponding X Logical Font Description (XLFD).
theFont | The font to convert. |
Définition à la ligne 231 du fichier KFontDialog_local.h.
void KFontChooser_local::getFontList | ( | QStringList & | list, | |
uint | fontListCriteria | |||
) | [static] |
Creates a list of font strings.
list | The list is returned here. | |
fontListCriteria | should contain all the restrictions for font selection as OR-ed values |
Définition à la ligne 673 du fichier KFontDialog_local.cpp.
Références FixedWidthFonts, ScalableFonts, et SmoothScalableFonts.
Référencé par fillFamilyListBox(), et KoFontTab::KoFontTab().
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::setFamilyList | ( | const QStringList & | list | ) |
Fill the font family list of the KFontChooser
list | The font list. |
Définition à la ligne 742 du fichier KFontDialog_local.cpp.
Références familyListBox, setFont(), et usingFixed.
Voici le graphe d'appel pour cette fonction :
QSize KFontChooser_local::sizeHint | ( | void | ) | const [virtual] |
Reimplemented for internal reasons.
Définition à la ligne 427 du fichier KFontDialog_local.cpp.
void KFontChooser_local::fontSelected | ( | const QFont & | font | ) | [signal] |
Emitted whenever the selected font changes.
Référencé par KFontChooser_local(), size_chosen_slot(), size_value_slot(), et style_chosen_slot().
void KFontChooser_local::toggled_checkbox | ( | ) | [private, slot] |
Définition à la ligne 477 du fichier KFontDialog_local.cpp.
Références familyCheckbox, familyListBox, sizeCheckbox, sizeListBox, sizeOfFont, styleCheckbox, et styleListBox.
Référencé par KFontChooser_local().
void KFontChooser_local::family_chosen_slot | ( | const QString & | ) | [private, slot] |
Définition à la ligne 485 du fichier KFontDialog_local.cpp.
Références currentStyles, familyListBox, gensymbolfontmap::pos, selectedFamily, selectedStyle, style_chosen_slot(), et styleListBox.
Référencé par KFontChooser_local().
void KFontChooser_local::size_chosen_slot | ( | const QString & | ) | [private, slot] |
Définition à la ligne 531 du fichier KFontDialog_local.cpp.
Références fontSelected(), selectedSize, selFont, et sizeOfFont.
Référencé par KFontChooser_local().
void KFontChooser_local::style_chosen_slot | ( | const QString & | ) | [private, slot] |
Définition à la ligne 544 du fichier KFontDialog_local.cpp.
Références currentStyles, familyListBox, fillSizeList(), fontSelected(), selectedSize, selectedStyle, selFont, sizeListBox, et styleListBox.
Référencé par family_chosen_slot(), et KFontChooser_local().
void KFontChooser_local::displaySample | ( | const QFont & | font | ) | [private, slot] |
Définition à la ligne 584 du fichier KFontDialog_local.cpp.
Références sampleEdit, et xlfdEdit.
Référencé par KFontChooser_local(), et setFont().
void KFontChooser_local::showXLFDArea | ( | bool | ) | [private, slot] |
Définition à la ligne 751 du fichier KFontDialog_local.cpp.
Références xlfdEdit.
Référencé par KFontChooser_local().
void KFontChooser_local::size_value_slot | ( | int | ) | [private, slot] |
Définition à la ligne 539 du fichier KFontDialog_local.cpp.
Références fontSelected(), et selFont.
Référencé par KFontChooser_local().
void KFontChooser_local::fillFamilyListBox | ( | bool | onlyFixedFonts = false |
) | [private] |
Définition à la ligne 734 du fichier KFontDialog_local.cpp.
Références familyListBox, FixedWidthFonts, fontList, et getFontList().
Référencé par KFontChooser_local(), et setFont().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::fillSizeList | ( | ) | [private] |
Définition à la ligne 364 du fichier KFontDialog_local.cpp.
Références sizeListBox.
Référencé par KFontChooser_local(), et style_chosen_slot().
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::addFont | ( | QStringList & | list, | |
const char * | xfont | |||
) | [static, private] |
Définition à la ligne 706 du fichier KFontDialog_local.cpp.
Références font(), et gensymbolfontmap::pos.
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::setupDisplay | ( | ) | [private] |
Définition à la ligne 596 du fichier KFontDialog_local.cpp.
Références familyListBox, selFont, testguiform::size, sizeListBox, sizeOfFont, styleListBox, et KoTemplates::trimmed().
Référencé par setFont().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KFontChooser_local::virtual_hook | ( | int | id, | |
void * | data | |||
) | [protected, virtual] |
Définition à la ligne 842 du fichier KFontDialog_local.cpp.
QStringList KFontChooser_local::fontList [private] |
KIntNumInput* KFontChooser_local::sizeOfFont [private] |
Définition à la ligne 295 du fichier KFontDialog_local.h.
Référencé par KFontChooser_local(), setupDisplay(), size_chosen_slot(), et toggled_checkbox().
QLineEdit* KFontChooser_local::sampleEdit [private] |
Définition à la ligne 297 du fichier KFontDialog_local.h.
Référencé par displaySample(), KFontChooser_local(), setBackgroundColor(), et setColor().
QLineEdit* KFontChooser_local::xlfdEdit [private] |
Définition à la ligne 298 du fichier KFontDialog_local.h.
Référencé par displaySample(), KFontChooser_local(), et showXLFDArea().
QLabel* KFontChooser_local::familyLabel [private] |
QLabel* KFontChooser_local::styleLabel [private] |
QCheckBox* KFontChooser_local::familyCheckbox [private] |
Définition à la ligne 302 du fichier KFontDialog_local.h.
Référencé par fontDiffFlags(), KFontChooser_local(), et toggled_checkbox().
QCheckBox* KFontChooser_local::styleCheckbox [private] |
Définition à la ligne 303 du fichier KFontDialog_local.h.
Référencé par fontDiffFlags(), KFontChooser_local(), et toggled_checkbox().
QCheckBox* KFontChooser_local::sizeCheckbox [private] |
Définition à la ligne 304 du fichier KFontDialog_local.h.
Référencé par fontDiffFlags(), KFontChooser_local(), et toggled_checkbox().
QLabel* KFontChooser_local::sizeLabel [private] |
KListBox* KFontChooser_local::familyListBox [private] |
Définition à la ligne 306 du fichier KFontDialog_local.h.
Référencé par enableColumn(), family_chosen_slot(), fillFamilyListBox(), KFontChooser_local(), setFamilyList(), setupDisplay(), style_chosen_slot(), et toggled_checkbox().
KListBox* KFontChooser_local::styleListBox [private] |
Définition à la ligne 307 du fichier KFontDialog_local.h.
Référencé par enableColumn(), family_chosen_slot(), KFontChooser_local(), setupDisplay(), style_chosen_slot(), et toggled_checkbox().
KListBox* KFontChooser_local::sizeListBox [private] |
Définition à la ligne 308 du fichier KFontDialog_local.h.
Référencé par enableColumn(), fillSizeList(), KFontChooser_local(), setupDisplay(), style_chosen_slot(), et toggled_checkbox().
QComboBox* KFontChooser_local::charsetsCombo [private] |
QCheckBox* KFontChooser_local::sizeIsRelativeCheckBox [private] |
Définition à la ligne 310 du fichier KFontDialog_local.h.
Référencé par KFontChooser_local(), setSizeIsRelative(), et sizeIsRelative().
QFont KFontChooser_local::selFont [private] |
Définition à la ligne 312 du fichier KFontDialog_local.h.
Référencé par setFont(), setupDisplay(), size_chosen_slot(), size_value_slot(), et style_chosen_slot().
QString KFontChooser_local::selectedFamily [private] |
QString KFontChooser_local::selectedStyle [private] |
Définition à la ligne 315 du fichier KFontDialog_local.h.
Référencé par family_chosen_slot(), et style_chosen_slot().
int KFontChooser_local::selectedSize [private] |
Définition à la ligne 316 du fichier KFontDialog_local.h.
Référencé par setFont(), size_chosen_slot(), et style_chosen_slot().
QMap<QString, QString> KFontChooser_local::currentStyles [private] |
Définition à la ligne 317 du fichier KFontDialog_local.h.
Référencé par family_chosen_slot(), et style_chosen_slot().
bool KFontChooser_local::usingFixed [private] |
Définition à la ligne 319 du fichier KFontDialog_local.h.
Référencé par KFontChooser_local(), setFamilyList(), et setFont().
KFontChooser_localPrivate* KFontChooser_local::d [private] |
Définition à la ligne 324 du fichier KFontDialog_local.h.
Référencé par backgroundColor(), color(), KFontChooser_local(), setBackgroundColor(), setColor(), et ~KFontChooser_local().
QFont KFontChooser_local::font [read, write] |
Définition à la ligne 62 du fichier KFontDialog_local.h.
Référencé par KFontDialog_local::getFont(), KFontDialog_local::getFontAndText(), et KFontDialog_local::getFontDiff().