24#include <tqgridview.h>
26#include <tqcombobox.h>
30#include <tqstringlist.h>
32#include <tdelibs_export.h>
55 const TQChar &_chr,
int _tableNum );
58 virtual TQSize sizeHint()
const;
60 virtual void setFont(
const TQString &_font );
61 virtual void setChar(
const TQChar &_chr );
62 virtual void setTableNum(
int _tableNum );
64 TQString fontName()
const {
return vFont; }
65 virtual TQChar chr()
const {
return vChr; }
66 int tableNum()
const {
return vTableNum; }
68 TQChar charAt(
int row,
int col )
const;
71 virtual void paintCell(
class TQPainter *p,
int row,
int col );
73 virtual void keyPressEvent( TQKeyEvent *e );
75 virtual void viewportResizeEvent( TQResizeEvent *e );
77 virtual void contentsMousePressEvent( TQMouseEvent *e );
78 virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
79 virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
80 virtual void contentsMouseMoveEvent( TQMouseEvent *e );
96 void highlighted(
const TQChar &c );
98 void activated(
const TQChar &c );
100 void focusItemChanged();
101 void focusItemChanged(
const TQChar &c );
104 void tableNumChanged(
int tableNum );
105 void doubleClicked();
108 virtual void setFont(
const TQFont &f) { TQGridView::setFont(f); }
109 void doGoto(
int dx,
int dy);
111 virtual void virtual_hook(
int id,
void* data );
113 class KCharSelectTablePrivate;
114 KCharSelectTablePrivate*
const d;
149 TQ_PROPERTY( TQString fontFamily READ font WRITE setFont )
150 TQ_PROPERTY(
int tableNum READ tableNum WRITE setTableNum )
151 TQ_PROPERTY(
bool fontComboEnabled READ isFontComboEnabled WRITE enableFontCombo )
152 TQ_PROPERTY(
bool tableSpinBoxEnabled READ isTableSpinBoxEnabled WRITE enableTableSpinBox )
161 const TQString &font = TQString::null,
const TQChar &chr =
' ',
int tableNum = 0 );
166 virtual TQSize sizeHint()
const;
171 virtual void setFont(
const TQString &font );
176 virtual void setChar(
const TQChar &chr );
181 virtual void setTableNum(
int tableNum );
186 virtual TQChar
chr()
const {
return charTable->chr(); }
191 virtual TQString
font()
const {
return fontCombo->currentText(); }
196 virtual int tableNum()
const {
return tableSpinBox->value(); }
230 virtual void fillFontCombo();
231 virtual bool eventFilter( TQObject *, TQEvent *e );
232 static void cleanupFontDatabase();
234 TQComboBox *fontCombo;
235 TQSpinBox *tableSpinBox;
237 TQStringList fontList;
238 static TQFontDatabase * fontDataBase;
241 void fontSelected(
const TQString &_font );
242 void tableChanged(
int _value );
243 void charHighlighted(
const TQChar &c ) { emit highlighted( c ); }
244 void charHighlighted() { emit highlighted(); }
245 void charActivated(
const TQChar &c ) { emit activated( c ); }
246 void charActivated() { emit activated(); }
247 void charFocusItemChanged() { emit focusItemChanged(); }
248 void charFocusItemChanged(
const TQChar &c ) { emit focusItemChanged( c ); }
249 void charTableUp() {
if ( tableNum() < 255 ) setTableNum( tableNum() + 1 ); }
250 void charTableDown() {
if ( tableNum() > 0 ) setTableNum( tableNum() - 1 ); }
251 void slotDoubleClicked() { emit doubleClicked(); }
252 void slotUnicodeEntered();
253 void slotUpdateUnicode(
const TQChar &c );
255 void highlighted(
const TQChar &c );
257 void activated(
const TQChar &c );
259 void fontChanged(
const TQString &_font );
260 void focusItemChanged();
261 void focusItemChanged(
const TQChar &c );
262 void doubleClicked();
265 virtual void setFont(
const TQFont &f) { TQVBox::setFont(f); }
267 virtual void virtual_hook(
int id,
void* data );
269 class KCharSelectPrivate;
270 KCharSelectPrivate*
const d;
Character selection table.
Character selection widget.
virtual void enableFontCombo(bool e)
If e is set to true, the combobox which allows the user to select the font which should be displayed ...
virtual bool isTableSpinBoxEnabled() const
Returns wether the table spinbox on the top is enabled or disabled.
virtual TQChar chr() const
Returns the currently selected character.
virtual bool isFontComboEnabled() const
Returns wether the font combobox on the top is enabled or disabled.
virtual void enableTableSpinBox(bool e)
If e is set to true, the spinbox which allows the user to specify which characters of the font should...
virtual int tableNum() const
Returns the currently displayed table.
virtual TQString font() const
Returns the currently displayed font.