KDEUI
#include <kcharselect.h>

Public Types | |
enum | Control { SearchLine = 0x01 , FontCombo = 0x02 , FontSize = 0x04 , BlockCombos = 0x08 , CharacterTable = 0x10 , DetailBrowser = 0x20 , HistoryButtons = 0x40 , AllGuiElements = 65535 } |
Public Slots | |
void | setCurrentChar (const QChar &c) |
void | setCurrentFont (const QFont &font) |
Signals | |
void | charSelected (const QChar &c) |
void | currentCharChanged (const QChar &c) |
void | currentFontChanged (const QFont &font) |
void | displayedCharsChanged () |
Public Member Functions | |
KCharSelect (QWidget *parent, KActionCollection *collection, const Controls controls=AllGuiElements) | |
~KCharSelect () | |
QChar | currentChar () const |
QFont | currentFont () const |
QList< QChar > | displayedChars () const |
Q_DECLARE_FLAGS (Controls, Control) KDE_CONSTRUCTOR_DEPRECATED explicit KCharSelect(QWidget *parent | |
virtual QSize | sizeHint () const |
Public Attributes | |
const Controls | controls = AllGuiElements) |
Properties | |
QChar | currentChar |
QFont | currentFont |
QList< QChar > | displayedChars |
Detailed Description
Character selection widget.
This widget allows the user to select a character of a specified font and to browse Unicode information

You can specify the font whose characters should be displayed via setCurrentFont(). Using the Controls argument in the contructor you can create a compact version of KCharSelect if there is not enough space and if you don't need all features.
KCharSelect displays one Unicode block at a time and provides categorized access to them. Unicode character names and further details, including cross references, are displayed. Additionally, there is a search to find characters.
To get the current selected character, use the currentChar() method. You can set the character which should be displayed with setCurrentChar().
Definition at line 61 of file kcharselect.h.
Member Enumeration Documentation
◆ Control
enum KCharSelect::Control |
Flags to set the shown widgets.
Definition at line 72 of file kcharselect.h.
Constructor & Destructor Documentation
◆ KCharSelect()
|
explicit |
Constructor.
controls
can be used to show a custom set of widgets.
The widget uses the following actions:
- KStandardActions::find() (edit_find)
- KStandardActions::back() (go_back)
- KStandardActions::forward() (go_forward)
If you provide a KActionCollection, this will be populated with the above actions, which you can then manually trigger or place in menus and toolbars.
- Parameters
-
parent the parent widget for this KCharSelect (see QWidget documentation) collection if this is not null
, KCharSelect will place its actions into this collectioncontrols selects the visible controls on the KCharSelect widget
- Since
- 4.2
Definition at line 331 of file kcharselect.cpp.
◆ ~KCharSelect()
KCharSelect::~KCharSelect | ( | ) |
Definition at line 493 of file kcharselect.cpp.
Member Function Documentation
◆ charSelected
|
signal |
A character is selected to be inserted somewhere.
- Parameters
-
c the selected character
◆ currentChar()
QChar KCharSelect::currentChar | ( | ) | const |
Returns the currently selected character.
Definition at line 510 of file kcharselect.cpp.
◆ currentCharChanged
|
signal |
The current character is changed.
- Parameters
-
c the new character
◆ currentFont()
QFont KCharSelect::currentFont | ( | ) | const |
Returns the currently displayed font.
Definition at line 515 of file kcharselect.cpp.
◆ currentFontChanged
|
signal |
A new font is selected or the font size changed.
- Parameters
-
font the new font
◆ displayedChars()
QList< QChar > KCharSelect::displayedChars | ( | ) | const |
Returns a list of currently displayed characters.
Definition at line 520 of file kcharselect.cpp.
◆ displayedCharsChanged
|
signal |
The currently displayed characters are changed (search results or block).
◆ Q_DECLARE_FLAGS()
KCharSelect::Q_DECLARE_FLAGS | ( | Controls | , |
Control | |||
) |
◆ setCurrentChar
|
slot |
Highlights the character c
.
If the character is not displayed, the block is changed.
- Parameters
-
c the character to highlight
Definition at line 525 of file kcharselect.cpp.
◆ setCurrentFont
|
slot |
Sets the font which is displayed to font
.
- Parameters
-
font the display font for the widget
Definition at line 503 of file kcharselect.cpp.
◆ sizeHint()
|
virtual |
Reimplemented.
Definition at line 498 of file kcharselect.cpp.
Member Data Documentation
◆ controls
const Controls KCharSelect::controls = AllGuiElements) |
Definition at line 113 of file kcharselect.h.
Property Documentation
◆ currentChar
|
readwrite |
Definition at line 1 of file kcharselect.h.
◆ currentFont
|
readwrite |
Definition at line 1 of file kcharselect.h.
◆ displayedChars
|
read |
Definition at line 1 of file kcharselect.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.