QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RCharacterWidget.h
Go to the documentation of this file.
1 #ifndef RCHARACTERWIDGET_H
2 #define RCHARACTERWIDGET_H
3 
4 #include <QMetaType>
5 #include <QFont>
6 #include <QPoint>
7 #include <QSize>
8 #include <QString>
9 #include <QWidget>
10 #include <QtDesigner/QDesignerExportWidget>
11 
12 class QMouseEvent;
13 class QPaintEvent;
14 
18 class /*QDESIGNER_WIDGET_EXPORT*/ RCharacterWidget: public QWidget {
19 
20  Q_OBJECT
21 
22 public:
23  RCharacterWidget(QWidget *parent = 0);
24  QSize sizeHint() const;
25 
26  QFont getDisplayFont();
27 
28 public slots:
29  void updateFont(const QFont &font);
30  void updateSize(const QString &fontSize);
31  void updateStyle(const QString &fontStyle);
32  void updateFontMerging(bool enable);
33 
34 signals:
35  void characterSelected(const QString &character);
36 
37 protected:
38  void mouseMoveEvent(QMouseEvent *event);
39  void mousePressEvent(QMouseEvent *event);
40  void paintEvent(QPaintEvent *event);
41 
42 private:
43  QFont displayFont;
44  int columns;
45  int lastKey;
47 };
48 
50 
51 #endif