Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

UnicodeSearch Class Reference

Special "search for unicode character" dialog. The search string entered by user is searched in character description and in the hex representation (as string) too. See directory ./unicodemap/ for more info. More...

#include <unicodesearch.h>

Collaboration diagram for UnicodeSearch:

Collaboration graph
[legend]

List of all members.

Signals

void setVisibleState (bool)
 Emitted when the dialog gets hidden.

Public Member Functions

 UnicodeSearch (QWidget *parent=0)
 QDialog like constructor.
 ~UnicodeSearch ()
void checkForUpdate ()
 Check if is the m_unicodeMap filled and perform data read if it's empty. It's in separate method to keep the constructor lightweight. This method is called first time user requests the dialog.
void setFont (ScFace f)
 Set currently used font.

Private Slots

void searchEdit_returnPressed ()
 filter mouse clicks so we can get our glyph zoom view
void unicodeList_mouseButtonPressed (QTableWidgetItem *item)
 Handle the m_zoom dialog.

Private Member Functions

void query ()
 All items from m_unicodeMap into unicodeList.
void query (QString filter)
 Fill unicodeList with all occurences of "filter" substrings.
void readUnicodeMap ()
 Open the file with unicode map and fill the m_unicodeMap.
void hideEvent (QHideEvent *e)
 Overriden hide event. Just emit the setVisibleState(false) here.

Private Attributes

QMap< QString, QString > m_unicodeMap
 Internal hex-description mapping. It's filled in constructor only once. All searching re-fills of the unicodeList are performed on this map.
CharZoomm_zoom
 A reference to the CharZoom dialog shown/closed in unicodeList_mouseButtonPressed() slot.
ScFace m_font
 Currently used font.


Detailed Description

Special "search for unicode character" dialog. The search string entered by user is searched in character description and in the hex representation (as string) too. See directory ./unicodemap/ for more info.

Author:
Petr Vanek <petr@scribus.info>

Definition at line 29 of file unicodesearch.h.


Constructor & Destructor Documentation

UnicodeSearch::UnicodeSearch ( QWidget *  parent = 0  ) 

QDialog like constructor.

Parameters:
parent standard qt widget
name string name
modal is modal flag

Definition at line 88 of file unicodesearch.cpp.

References searchEdit_returnPressed().

UnicodeSearch::~UnicodeSearch (  )  [inline]

Definition at line 39 of file unicodesearch.h.


Member Function Documentation

void UnicodeSearch::checkForUpdate (  ) 

Check if is the m_unicodeMap filled and perform data read if it's empty. It's in separate method to keep the constructor lightweight. This method is called first time user requests the dialog.

Definition at line 102 of file unicodesearch.cpp.

References m_unicodeMap, query(), and readUnicodeMap().

Referenced by UnicodeChooseButton::self_toggled().

void UnicodeSearch::setFont ( ScFace  f  )  [inline]

Set currently used font.

Definition at line 46 of file unicodesearch.h.

void UnicodeSearch::setVisibleState ( bool   )  [signal]

Emitted when the dialog gets hidden.

Referenced by hideEvent().

void UnicodeSearch::query (  )  [private]

All items from m_unicodeMap into unicodeList.

Definition at line 134 of file unicodesearch.cpp.

References m_unicodeMap.

Referenced by checkForUpdate(), and searchEdit_returnPressed().

void UnicodeSearch::query ( QString  filter  )  [private]

Fill unicodeList with all occurences of "filter" substrings.

Parameters:
filter a mask. Search is perfomed like "*foo*" in descriptions and hex representations too.

Definition at line 155 of file unicodesearch.cpp.

References m_unicodeMap.

void UnicodeSearch::readUnicodeMap (  )  [private]

Open the file with unicode map and fill the m_unicodeMap.

Definition at line 113 of file unicodesearch.cpp.

References ScPaths::instance(), and m_unicodeMap.

Referenced by checkForUpdate().

void UnicodeSearch::hideEvent ( QHideEvent *  e  )  [private]

Overriden hide event. Just emit the setVisibleState(false) here.

Definition at line 188 of file unicodesearch.cpp.

References setVisibleState().

void UnicodeSearch::searchEdit_returnPressed (  )  [private, slot]

filter mouse clicks so we can get our glyph zoom view

Start search with user input.

Definition at line 181 of file unicodesearch.cpp.

References query().

Referenced by UnicodeSearch().

void UnicodeSearch::unicodeList_mouseButtonPressed ( QTableWidgetItem *  item  )  [private, slot]

Handle the m_zoom dialog.

Definition at line 194 of file unicodesearch.cpp.


Member Data Documentation

QMap<QString,QString> UnicodeSearch::m_unicodeMap [private]

Internal hex-description mapping. It's filled in constructor only once. All searching re-fills of the unicodeList are performed on this map.

Definition at line 56 of file unicodesearch.h.

Referenced by checkForUpdate(), query(), and readUnicodeMap().

A reference to the CharZoom dialog shown/closed in unicodeList_mouseButtonPressed() slot.

Definition at line 59 of file unicodesearch.h.

Currently used font.

Definition at line 61 of file unicodesearch.h.


The documentation for this class was generated from the following files:
Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.