org.kde.koala
public class KFontChooser extends QWidget
Version: $Id: KFontChooser.java 473384 2005-10-23 14:17:09Z rdale $
UNKNOWN: A font selection widget.
Field Summary | |
---|---|
static int | FamilyListFamilyList - Identifies the family (leftmost) list.
|
static int | FixedWidthFonts
The selection criteria for the font families shown in the dialog.
|
static int | FontDiffFamilyFontDiffFamily - Identifies a requested change in the font family.
|
static int | FontDiffSize |
static int | FontDiffStyle |
static int | ScalableFonts |
static int | SizeList |
static int | SmoothScalableFonts |
static int | StyleList |
Constructor Summary | |
---|---|
protected | KFontChooser(Class dummy) |
KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff, int sizeIsRelativeState)
Constructs a font picker widget.
| |
KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize, boolean diff) | |
KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame, int visibleListSize) | |
KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList, boolean makeFrame) | |
KFontChooser(QWidget parent, String name, boolean onlyFixed, String[] fontList) | |
KFontChooser(QWidget parent, String name, boolean onlyFixed) | |
KFontChooser(QWidget parent, String name) | |
KFontChooser(QWidget parent) | |
KFontChooser() |
Method Summary | |
---|---|
QColor | backgroundColor() |
String | className() |
QColor | color() |
void | dispose() Delete the wrapped C++ instance ahead of finalize() |
void | enableColumn(int column, boolean state)
Enables or disable a font column in the chooser.
|
protected void | finalize() Deletes the wrapped C++ instance |
QFont | font() |
int | fontDiffFlags() |
static void | getFontList(String[] list, int fontListCriteria)
Creates a list of font strings. |
static String | getXLFD(QFont theFont)
Converts a QFont into the corresponding X Logical Font
Description (XLFD). |
boolean | isDisposed() Has the wrapped C++ instance been deleted? |
QMetaObject | metaObject() |
String | sampleText() |
void | setBackgroundColor(QColor col)
Sets the background color to use in the preview. |
void | setColor(QColor col)
Sets the color to use in the preview. |
void | setFont(QFont font, boolean onlyFixed)
Sets the currently selected font in the chooser. |
void | setFont(QFont font) |
void | setSampleBoxVisible(boolean visible)
Shows or hides the sample text box. |
void | setSampleText(String text)
Sets the sample text.
|
void | setSizeIsRelative(int relative)
Sets the state of the checkbox indicating whether the font size
is to be interpreted as relative size.
|
QSize | sizeHint()
Reimplemented for internal reasons. |
int | sizeIsRelative() |
FamilyList
- Identifies the family (leftmost) list.
StyleList
- Identifies the style (center) list.
SizeList
- Identifies the size (rightmost) list.
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.
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.
Consider the following code snippet;
ArrayList list; KFontChooser.getFontList(list,SmoothScalableFonts); KFontChooser chooseFont = new KFontChooser(0, "FontList", false, list);
The above creates a font chooser dialog with only SmoothScaleble fonts.
Parameters: 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.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().
UNKNOWN: Constructs a font picker widget.
Returns: The background color currently used in the preview (default: the base color of the active colorgroup)
UNKNOWN:
Returns: The color currently used in the preview (default: the text color of the active color group)
UNKNOWN:
Parameters: column Specify the columns. An or'ed combination of
FamilyList
, StyleList
and SizeList
is possible. state If false
the columns are disabled.
UNKNOWN: Enables or disable a font column in the chooser.
Returns: The currently selected font in the chooser.
UNKNOWN:
Returns: The bitmask corresponding to the attributes the user wishes to change.
UNKNOWN:
Parameters: list The list is returned here. fontListCriteria should contain all the restrictions for font selection as OR-ed values
See Also: KFontChooser KFontChooser KFontChooser KFontChooser KFontChooser
UNKNOWN: Creates a list of font strings.
Parameters: theFont The font to convert.
Returns: A string representing the given font in XLFD format.
UNKNOWN: Converts a QFont into the corresponding X Logical Font Description (XLFD).
Returns: The current text in the sample text input area.
UNKNOWN:
UNKNOWN: Sets the background color to use in the preview.
UNKNOWN: Sets the color to use in the preview.
Parameters: font The font to select. onlyFixed Readjust the font list to display only fixed
width fonts if true
, or vice-versa.
UNKNOWN: Sets the currently selected font in the chooser.
Parameters: visible Set it to true to show the box, to false to hide it.
UNKNOWN: Shows or hides the sample text box.
Parameters: text The new sample text. The current will be removed.
UNKNOWN: Sets the sample text.
UNKNOWN: Sets the state of the checkbox indicating whether the font size is to be interpreted as relative size.
UNKNOWN: Reimplemented for internal reasons.
Returns: Whether the font size is to be interpreted as relative size (default: QButton:Off)
UNKNOWN: