47 #ifndef CHARACTERWIDGET_H 48 #define CHARACTERWIDGET_H 72 Q_PROPERTY( QChar character READ character WRITE setCharacter NOTIFY characterSelected )
73 Q_PROPERTY(
int columns READ columns WRITE setColumns )
74 Q_PROPERTY( QFont font READ font WRITE setFont )
83 QSize sizeHint() const override;
88 int columns()
const {
return mColumns; }
107 QFont
font()
const {
return mDisplayFont; }
116 void setFont(
const QFont &font );
122 void setFontSize(
double fontSize );
128 void setFontStyle(
const QString &fontStyle );
130 void updateFontMerging(
bool enable );
136 void setColumns(
int columns );
143 void setCharacter( QChar character );
150 void clearCharacter();
157 void characterSelected( QChar character );
160 void keyPressEvent( QKeyEvent *event )
override;
161 void mouseMoveEvent( QMouseEvent *event )
override;
162 void mousePressEvent( QMouseEvent *event )
override;
163 void paintEvent( QPaintEvent *event )
override;
164 void resizeEvent( QResizeEvent *event )
override;
170 int mSquareSize = 24;