#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 Slots | |
| void | fontSelected (const TQString &_font) |
| void | tableChanged (int _value) |
| void | charHighlighted (const TQChar &c) |
| void | charHighlighted () |
| void | charActivated (const TQChar &c) |
| void | charActivated () |
| void | charFocusItemChanged () |
| void | charFocusItemChanged (const TQChar &c) |
| void | charTableUp () |
| void | charTableDown () |
| void | slotDoubleClicked () |
| void | slotUnicodeEntered () |
| void | slotUpdateUnicode (const TQChar &c) |
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 146 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 439 of file kcharselect.cpp.
◆ ~KCharSelect()
| KCharSelect::~KCharSelect | ( | ) |
Definition at line 518 of file kcharselect.cpp.
Member Function Documentation
◆ charActivated [1/2]
|
inlineprotectedslot |
Definition at line 246 of file kcharselect.h.
◆ charActivated [2/2]
|
inlineprotectedslot |
Definition at line 245 of file kcharselect.h.
◆ charFocusItemChanged [1/2]
|
inlineprotectedslot |
Definition at line 247 of file kcharselect.h.
◆ charFocusItemChanged [2/2]
|
inlineprotectedslot |
Definition at line 248 of file kcharselect.h.
◆ charHighlighted [1/2]
|
inlineprotectedslot |
Definition at line 244 of file kcharselect.h.
◆ charHighlighted [2/2]
|
inlineprotectedslot |
Definition at line 243 of file kcharselect.h.
◆ charTableDown
|
inlineprotectedslot |
Definition at line 250 of file kcharselect.h.
◆ charTableUp
|
inlineprotectedslot |
Definition at line 249 of file kcharselect.h.
◆ chr()
|
inlinevirtual |
Returns the currently selected character.
Definition at line 186 of file kcharselect.h.
◆ cleanupFontDatabase()
|
staticprotected |
Definition at line 62 of file kcharselect.cpp.
◆ 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 203 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 211 of file kcharselect.h.
◆ eventFilter()
|
protectedvirtual |
Definition at line 614 of file kcharselect.cpp.
◆ fillFontCombo()
|
protectedvirtual |
Definition at line 560 of file kcharselect.cpp.
◆ font()
|
inlinevirtual |
Returns the currently displayed font.
Definition at line 191 of file kcharselect.h.
◆ fontSelected
|
protectedslot |
Definition at line 571 of file kcharselect.cpp.
◆ isFontComboEnabled()
|
inlinevirtual |
Returns wether the font combobox on the top is enabled or disabled.
- See also
- enableFontCombo()
Definition at line 219 of file kcharselect.h.
◆ isTableSpinBoxEnabled()
|
inlinevirtual |
Returns wether the table spinbox on the top is enabled or disabled.
- See also
- enableTableSpinBox()
Definition at line 227 of file kcharselect.h.
◆ setChar()
|
virtual |
Sets the currently selected character to chr.
Definition at line 545 of file kcharselect.cpp.
◆ setFont()
|
virtual |
Sets the font which is displayed to font.
Definition at line 530 of file kcharselect.cpp.
◆ setTableNum()
|
virtual |
Sets the currently displayed table to tableNum.
Definition at line 552 of file kcharselect.cpp.
◆ sizeHint()
|
virtual |
Reimplemented.
Definition at line 524 of file kcharselect.cpp.
◆ slotDoubleClicked
|
inlineprotectedslot |
Definition at line 251 of file kcharselect.h.
◆ slotUnicodeEntered
|
protectedslot |
Definition at line 584 of file kcharselect.cpp.
◆ slotUpdateUnicode
|
protectedslot |
Definition at line 605 of file kcharselect.cpp.
◆ tableChanged
|
protectedslot |
Definition at line 578 of file kcharselect.cpp.
◆ tableNum()
|
inlinevirtual |
Returns the currently displayed table.
Definition at line 196 of file kcharselect.h.
◆ virtual_hook()
|
protectedvirtual |
Definition at line 627 of file kcharselect.cpp.
Member Data Documentation
◆ charTable
|
protected |
Definition at line 236 of file kcharselect.h.
◆ fontCombo
|
protected |
Definition at line 234 of file kcharselect.h.
◆ fontDataBase
|
staticprotected |
Definition at line 238 of file kcharselect.h.
◆ fontList
|
protected |
Definition at line 237 of file kcharselect.h.
◆ tableSpinBox
|
protected |
Definition at line 235 of file kcharselect.h.
The documentation for this class was generated from the following files:
Trinity API Reference