#include <kcharselect.h>
Inherits TQVBox.
Public Member Functions | |
| KCharSelect (TQWidget *parent, const char *name, const TQString &font=TQString::null, const TQChar &chr=' ', int tableNum=0) | |
| virtual TQSize | sizeHint () const |
| virtual void | setFont (const TQString &font) |
| virtual void | setChar (const TQChar &chr) |
| virtual void | setTableNum (int tableNum) |
| virtual TQChar | chr () const |
| virtual TQString | font () const |
| virtual int | tableNum () const |
| virtual void | enableFontCombo (bool e) |
| virtual void | enableTableSpinBox (bool e) |
| virtual bool | isFontComboEnabled () const |
| virtual bool | isTableSpinBoxEnabled () const |
Protected Member Functions | |
| virtual void | fillFontCombo () |
| virtual bool | eventFilter (TQObject *, TQEvent *e) |
| virtual void | virtual_hook (int id, void *data) |
Static Protected Member Functions | |
| static void | cleanupFontDatabase () |
Protected Attributes | |
| TQComboBox * | fontCombo |
| TQSpinBox * | tableSpinBox |
| KCharSelectTable * | charTable |
| TQStringList | fontList |
Static Protected Attributes | |
| static TQFontDatabase * | fontDataBase = 0 |
Detailed Description
Character selection widget.
This widget allows the user to select a character of a specified font in a table
You can specify the font whose characters should be displayed via setFont() or in the constructor. 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 character the table displays them. This spinbox also can be enabled or disabled using enableTableSpinBox().
KCharSelect supports keyboard and mouse navigation. Click+Move always selects the character below the mouse cursor. Using the arrow keys moves the focus mark around and pressing RETURN or SPACE selects the cell which contains the focus mark.
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().
Definition at line 155 of file kcharselect.h.
Constructor & Destructor Documentation
◆ KCharSelect()
| KCharSelect::KCharSelect | ( | TQWidget * | parent, |
| const char * | name, | ||
| const TQString & | font = TQString::null, |
||
| const TQChar & | chr = ' ', |
||
| int | tableNum = 0 |
||
| ) |
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.
Definition at line 453 of file kcharselect.cpp.
Member Function Documentation
◆ chr()
|
inlinevirtual |
Returns the currently selected character.
Definition at line 195 of file kcharselect.h.
◆ enableFontCombo()
|
inlinevirtual |
If e is set to true, the combobox which allows the user to select the font which should be displayed is enabled, else disabled.
Definition at line 212 of file kcharselect.h.
◆ enableTableSpinBox()
|
inlinevirtual |
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.
Definition at line 220 of file kcharselect.h.
◆ font()
|
inlinevirtual |
Returns the currently displayed font.
Definition at line 200 of file kcharselect.h.
◆ isFontComboEnabled()
|
inlinevirtual |
Returns wether the font combobox on the top is enabled or disabled.
- See also
- enableFontCombo()
Definition at line 228 of file kcharselect.h.
◆ isTableSpinBoxEnabled()
|
inlinevirtual |
Returns wether the table spinbox on the top is enabled or disabled.
- See also
- enableTableSpinBox()
Definition at line 236 of file kcharselect.h.
◆ setChar()
|
virtual |
Sets the currently selected character to chr.
Definition at line 559 of file kcharselect.cpp.
◆ setFont()
|
virtual |
Sets the font which is displayed to font.
Definition at line 544 of file kcharselect.cpp.
◆ setTableNum()
|
virtual |
Sets the currently displayed table to tableNum.
Definition at line 566 of file kcharselect.cpp.
◆ sizeHint()
|
virtual |
Reimplemented.
Definition at line 538 of file kcharselect.cpp.
◆ tableNum()
|
inlinevirtual |
Returns the currently displayed table.
Definition at line 205 of file kcharselect.h.
The documentation for this class was generated from the following files:
Trinity API Reference