24 #include <tqgridview.h>
26 #include <tqcombobox.h>
27 #include <tqspinbox.h>
30 #include <tqstringlist.h>
32 #include <tdelibs_export.h>
38 class KCharSelectTablePrivate;
39 class KCharSelectPrivate;
57 const TQChar &_chr,
int _tableNum );
59 virtual TQSize sizeHint()
const;
60 virtual void resizeEvent( TQResizeEvent * );
62 virtual void setFont(
const TQString &_font );
63 virtual void setChar(
const TQChar &_chr );
64 virtual void setTableNum(
int _tableNum );
66 virtual TQChar chr() {
return vChr; }
69 virtual void paintCell(
class TQPainter *p,
int row,
int col );
71 virtual void mousePressEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); }
72 virtual void mouseDoubleClickEvent ( TQMouseEvent *e ){ mouseMoveEvent( e ); emit doubleClicked();}
73 virtual void mouseReleaseEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); emit activated( chr() ); emit activated(); }
74 virtual void mouseMoveEvent( TQMouseEvent *e );
76 virtual void keyPressEvent( TQKeyEvent *e );
92 void highlighted(
const TQChar &c );
94 void activated(
const TQChar &c );
96 void focusItemChanged();
97 void focusItemChanged(
const TQChar &c );
100 void doubleClicked();
103 virtual void setFont(
const TQFont &f) { TQGridView::setFont(f); }
106 virtual void virtual_hook(
int id,
void* data );
108 KCharSelectTablePrivate*
const d;
143 TQ_PROPERTY( TQString fontFamily READ font WRITE setFont )
144 TQ_PROPERTY(
int tableNum READ tableNum WRITE setTableNum )
145 TQ_PROPERTY(
bool fontComboEnabled READ isFontComboEnabled WRITE enableFontCombo )
146 TQ_PROPERTY(
bool tableSpinBoxEnabled READ isTableSpinBoxEnabled WRITE enableTableSpinBox )
155 const TQString &font = TQString::null,
const TQChar &chr =
' ',
int tableNum = 0 );
160 virtual TQSize sizeHint()
const;
165 virtual void setFont(
const TQString &font );
170 virtual void setChar(
const TQChar &chr );
175 virtual void setTableNum(
int tableNum );
180 virtual TQChar
chr()
const {
return charTable->chr(); }
185 virtual TQString
font()
const {
return fontCombo->currentText(); }
190 virtual int tableNum()
const {
return tableSpinBox->value(); }
224 virtual void fillFontCombo();
225 static void cleanupFontDatabase();
227 TQComboBox *fontCombo;
228 TQSpinBox *tableSpinBox;
230 TQStringList fontList;
231 static TQFontDatabase * fontDataBase;
234 void fontSelected(
const TQString &_font );
235 void tableChanged(
int _value );
236 void charHighlighted(
const TQChar &c ) { emit highlighted( c ); }
237 void charHighlighted() { emit highlighted(); }
238 void charActivated(
const TQChar &c ) { emit activated( c ); }
239 void charActivated() { emit activated(); }
240 void charFocusItemChanged() { emit focusItemChanged(); }
241 void charFocusItemChanged(
const TQChar &c ) { emit focusItemChanged( c ); }
242 void charTableUp() {
if ( tableNum() < 255 ) setTableNum( tableNum() + 1 ); }
243 void charTableDown() {
if ( tableNum() > 0 ) setTableNum( tableNum() - 1 ); }
244 void slotDoubleClicked() { emit doubleClicked(); }
245 void slotUnicodeEntered();
246 void slotUpdateUnicode(
const TQChar &c );
248 void highlighted(
const TQChar &c );
250 void activated(
const TQChar &c );
252 void fontChanged(
const TQString &_font );
253 void focusItemChanged();
254 void focusItemChanged(
const TQChar &c );
255 void doubleClicked();
258 virtual void setFont(
const TQFont &f) { TQVBox::setFont(f); }
260 virtual void virtual_hook(
int id,
void* data );
262 class KCharSelectPrivate;
263 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.