|
|
A Widget which allows the user to select a character of a specified font in a table
You can specify the font whoes characters should be displayed via setFont(). Using enableFontCombo() you can allow the user to choose the font from a combob-box. As only 256 characters are displayed at once in the table, using the spinbox on the top the user can choose starting from which chracater the table displayes them. This spinbox also can be enabled or disabled using enableTableSpinBox().
KCharSelect supports keyboard and mouse navigation. Click+Move selects always the character below the mouse cursor. Using the arrow keys the focus mark is moved around and with pressing RETURN or SPACE the cell which contains the focus mark gets selected.
To get the current selected character, use the chr() method. You can set the character which should be displayed with setChar() and the table number which should be displayed with setTableNum().
KCharSelect ( QWidget *parent, const char *name,
const QString &font = QString::null, const QChar &chr = ' ', int tableNum = 0 )
| KCharSelect |
Constructor. font
specifies which font should be displayed, chr
which character should be selected and tableNum
specifies
the number of the table which should be displayed.
QSize sizeHint ()
| sizeHint |
[const virtual]
Reimplemented.
void setFont ( const QString &font )
| setFont |
[virtual]
Sets the font which is displayed to font
void setChar ( const QChar &chr )
| setChar |
[virtual]
Sets the currently selected character to chr
.
void setTableNum ( int tableNum )
| setTableNum |
[virtual]
Sets the currently displayed table to tableNum
.
QChar chr ()
| chr |
[const virtual]
Returns the currently selected character.
QString font ()
| font |
[const virtual]
Returns the currently displayed font.
int tableNum ()
| tableNum |
[const virtual]
Returns the currently displayed table
void enableFontCombo ( bool e )
| enableFontCombo |
[virtual]
If e
is set to TRUE, the combobox which allows the user to
select the font which should be displayed is enabled, else
disabled.
void enableTableSpinBox ( bool e )
| enableTableSpinBox |
[virtual]
If e
is set to TRUE, the spinbox which allows the user to
specify which characters of the font should be displayed, is
enabled, else disabled.
bool isFontComboEnabled ()
| isFontComboEnabled |
[const virtual]
Returns wether the font combobox on the top is enabled or disabled.
See also: enableFontCombo()
bool isTableSpinBoxEnabled ()
| isTableSpinBoxEnabled |
[const virtual]
Returns wether the table spinbox on the top is enabled or disabled.
See also: enableTableSpinBox()
void fillFontCombo ()
| fillFontCombo |
[protected virtual]
void cleanupFontDatabase ()
| cleanupFontDatabase |
[protected static]
QComboBox * fontCombo | fontCombo |
[protected]
QSpinBox * tableSpinBox | tableSpinBox |
[protected]
KCharSelectTable * charTable | charTable |
[protected]
QStringList fontList | fontList |
[protected]
static QFontDatabase * fontDataBase | fontDataBase |
[protected]
void fontSelected ( const QString &_font )
| fontSelected |
[protected slots slot]
void tableChanged ( int _value )
| tableChanged |
[protected slots slot]
void charHighlighted ( const QChar &c )
| charHighlighted |
[protected slots slot]
void charHighlighted ()
| charHighlighted |
[protected slots slot]
void charActivated ( const QChar &c )
| charActivated |
[protected slots slot]
void charActivated ()
| charActivated |
[protected slots slot]
void charFocusItemChanged ()
| charFocusItemChanged |
[protected slots slot]
void charFocusItemChanged ( const QChar &c )
| charFocusItemChanged |
[protected slots slot]
void charTableUp ()
| charTableUp |
[protected slots slot]
void charTableDown ()
| charTableDown |
[protected slots slot]
void slotDoubleClicked ()
| slotDoubleClicked |
[protected slots slot]
void highlighted ( const QChar &c )
| highlighted |
[signal]
void highlighted ()
| highlighted |
[signal]
void activated ( const QChar &c )
| activated |
[signal]
void activated ()
| activated |
[signal]
void fontChanged ( const QString &_font )
| fontChanged |
[signal]
void focusItemChanged ()
| focusItemChanged |
[signal]
void focusItemChanged ( const QChar &c )
| focusItemChanged |
[signal]
void doubleClicked ()
| doubleClicked |
[signal]