Update to support both Qt 4 and Qt 5
[apps/thermostat-demo.git] / keyboard / keyboard.h
1 #ifndef KEYBOARD_H
2 #define KEYBOARD_H
4 #include <qglobal.h>
5 #include <QWidget>
6 #include <QtGui>
7 #if QT_VERSION >= 0x050000
9 #include <QLineEdit>
10 #include <QPushButton>
12 #endif
14 namespace Ui {
15 class Keyboard;
16 }
18 class Keyboard : public QWidget
19 {
20     Q_OBJECT
21     
22 public:
23     explicit Keyboard(QWidget *parent = 0);
24     void setLineEdit(QLineEdit * );
25     ~Keyboard();
26     QPushButton *enterButton;
27     
28 signals:
29     void closed();
31 private slots:
32     void keyboardHandler();
33     void on_shift_clicked();
34     void on_char_2_toggled(bool checked);
35     void on_clear_clicked();
36     void on_enterButton_clicked();
38     void on_lineEdit_textChanged(const QString &arg1);
40     void on_lineEdit_returnPressed();
42     void on_backButton_clicked();
44 private:
45     Ui::Keyboard *ui;
46     QString outputText;
47     QLineEdit *outputLineEdit;
48     bool shift;
49 };
51 #endif // KEYBOARD_H