47 #ifndef CHARACTERWIDGET_H 48 #define CHARACTERWIDGET_H 70 Q_PROPERTY( QChar character READ character WRITE setCharacter NOTIFY characterSelected )
71 Q_PROPERTY(
int columns READ columns WRITE setColumns )
72 Q_PROPERTY( QFont font READ font WRITE setFont )
81 QSize sizeHint() const override;
86 int columns()
const {
return mColumns; }
98 QChar
character()
const {
return QChar( mLastKey ); }
105 QFont
font()
const {
return mDisplayFont; }
114 void setFont(
const QFont &font );
120 void setFontSize(
double fontSize );
126 void setFontStyle(
const QString &fontStyle );
128 void updateFontMerging(
bool enable );
134 void setColumns(
int columns );
141 void setCharacter( QChar character );
148 void characterSelected( QChar character );
151 void mouseMoveEvent( QMouseEvent *event )
override;
152 void mousePressEvent( QMouseEvent *event )
override;
153 void paintEvent( QPaintEvent *event )
override;
159 int mSquareSize = 24;