• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KCharSelect Class Reference

Character selection widget. More...

#include <kcharselect.h>

Inheritance diagram for KCharSelect:
QWidget

List of all members.

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

QChar currentChar () const
QFont currentFont () const
QList< QChar > displayedChars () const
 KCharSelect (QWidget *parent, KActionCollection *collection, const Controls controls=AllGuiElements)
 Q_DECLARE_FLAGS (Controls, Control) KDE_CONSTRUCTOR_DEPRECATED explicit KCharSelect(QWidget *parent
virtual QSize sizeHint () const
 ~KCharSelect ()

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

kcharselect.png

Character Selection Widget

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().

Author:
Reginald Stadlbauer <reggie@kde.org>
Daniel Laidig <d.laidig@gmx.de>

Definition at line 61 of file kcharselect.h.


Member Enumeration Documentation

enum KCharSelect::Control

Flags to set the shown widgets.

Enumerator:
SearchLine 

Shows the search widgets.

FontCombo 

Shows the font combo box.

FontSize 

Shows the font size spin box.

BlockCombos 

Shows the category/block selection combo boxes.

CharacterTable 

Shows the actual table.

DetailBrowser 

Shows the detail browser.

HistoryButtons 

Shows the Back/Forward buttons.

AllGuiElements 

Shows everything.

Definition at line 72 of file kcharselect.h.


Constructor & Destructor Documentation

KCharSelect::KCharSelect ( QWidget *  parent,
KActionCollection *  collection,
const Controls  controls = AllGuiElements 
) [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 collection
controls selects the visible controls on the KCharSelect widget
Since:
4.2

Definition at line 309 of file kcharselect.cpp.

KCharSelect::~KCharSelect (  ) 

Definition at line 464 of file kcharselect.cpp.


Member Function Documentation

void KCharSelect::charSelected ( const QChar &  c  )  [signal]

A character is selected to be inserted somewhere.

Parameters:
c the selected character
QChar KCharSelect::currentChar (  )  const

Returns the currently selected character.

void KCharSelect::currentCharChanged ( const QChar &  c  )  [signal]

The current character is changed.

Parameters:
c the new character
QFont KCharSelect::currentFont (  )  const

Returns the currently displayed font.

void KCharSelect::currentFontChanged ( const QFont &  font  )  [signal]

A new font is selected or the font size changed.

Parameters:
font the new font
QList<QChar> KCharSelect::displayedChars (  )  const

Returns a list of currently displayed characters.

void KCharSelect::displayedCharsChanged (  )  [signal]

The currently displayed characters are changed (search results or block).

KCharSelect::Q_DECLARE_FLAGS ( Controls  ,
Control   
)
Deprecated:
void KCharSelect::setCurrentChar ( const QChar &  c  )  [slot]

Highlights the character c.

If the character is not displayed, the block is changed.

Parameters:
c the character to highlight

Definition at line 496 of file kcharselect.cpp.

void KCharSelect::setCurrentFont ( const QFont &  font  )  [slot]

Sets the font which is displayed to font.

Parameters:
font the display font for the widget

Definition at line 474 of file kcharselect.cpp.

QSize KCharSelect::sizeHint ( void   )  const [virtual]

Reimplemented.

Definition at line 469 of file kcharselect.cpp.


Member Data Documentation

const Controls KCharSelect::controls = AllGuiElements)

Definition at line 112 of file kcharselect.h.


Property Documentation

QChar KCharSelect::currentChar [read, write]

Definition at line 65 of file kcharselect.h.

QFont KCharSelect::currentFont [read, write]

Definition at line 64 of file kcharselect.h.

QList< QChar > KCharSelect::displayedChars [read]

Definition at line 66 of file kcharselect.h.


The documentation for this class was generated from the following files:
  • kcharselect.h
  • kcharselect.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal