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

KDEUI

Public Types | Public Slots | Signals | Public Member Functions | Public Attributes | Properties | List of all members
KCharSelect Class Reference

#include <kcharselect.h>

Inheritance diagram for KCharSelect:
Inheritance graph
[legend]

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

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 reggi.nosp@m.e@kd.nosp@m.e.org
Daniel Laidig d.lai.nosp@m.dig@.nosp@m.gmx.d.nosp@m.e

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
parentthe parent widget for this KCharSelect (see QWidget documentation)
collectionif this is not null, KCharSelect will place its actions into this collection
controlsselects the visible controls on the KCharSelect widget
Since
4.2

Definition at line 308 of file kcharselect.cpp.

KCharSelect::~KCharSelect ( )

Definition at line 470 of file kcharselect.cpp.

Member Function Documentation

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

A character is selected to be inserted somewhere.

Parameters
cthe selected character
QChar KCharSelect::currentChar ( ) const

Returns the currently selected character.

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

The current character is changed.

Parameters
cthe 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
fontthe 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
cthe character to highlight

Definition at line 502 of file kcharselect.cpp.

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

Sets the font which is displayed to font.

Parameters
fontthe display font for the widget

Definition at line 480 of file kcharselect.cpp.

QSize KCharSelect::sizeHint ( void  ) const
virtual

Reimplemented.

Definition at line 475 of file kcharselect.cpp.

Member Data Documentation

const Controls KCharSelect::controls = AllGuiElements)

Definition at line 113 of file kcharselect.h.

Property Documentation

QChar KCharSelect::currentChar
readwrite

Definition at line 65 of file kcharselect.h.

QFont KCharSelect::currentFont
readwrite

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
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:17 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal