~ubuntu-branches/ubuntu/trusty/maliit-framework/trusty-proposed

« back to all changes in this revision

Viewing changes to examples/apps/plainqt/mainwindow.h

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-01-31 13:26:48 UTC
  • Revision ID: package-import@ubuntu.com-20130131132648-w1u9d2279tppxcft
Tags: upstream-0.94.1
ImportĀ upstreamĀ versionĀ 0.94.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MAINWINDOW_H
 
2
#define MAINWINDOW_H
 
3
 
 
4
#include <QtGlobal>
 
5
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
 
6
#include <QtWidgets/QMainWindow>
 
7
#include <QtWidgets/QPushButton>
 
8
#include <QtWidgets/QGridLayout>
 
9
#include <QtWidgets/QTextEdit>
 
10
#include <QtWidgets/QLabel>
 
11
#include <QtWidgets/QLineEdit>
 
12
#include <QtGui/QFocusEvent>
 
13
#include <QtGui/QInputMethod>
 
14
#include <QtCore/QProcess>
 
15
#else
 
16
#include <QtGui>
 
17
#endif
 
18
 
 
19
class MainWindow
 
20
    : public QMainWindow
 
21
{
 
22
    Q_OBJECT
 
23
 
 
24
public:
 
25
    explicit MainWindow();
 
26
    virtual ~MainWindow();
 
27
 
 
28
    bool eventFilter(QObject *watched,
 
29
                     QEvent *event);
 
30
 
 
31
private:
 
32
    Q_SLOT void onStartServerClicked();
 
33
    Q_SLOT void onRotateKeyboardClicked();
 
34
    Q_SLOT void onServerStateChanged();
 
35
 
 
36
private:
 
37
    void initUI();
 
38
    void insertIntoGrid(const QString &description,
 
39
                        const Qt::InputMethodHints &hints,
 
40
                        const QString &tooltip = QString());
 
41
 
 
42
    QProcess *m_server_process;
 
43
    int m_orientation_index;
 
44
    int m_grid_row;
 
45
    QGridLayout *const m_grid;
 
46
    QPushButton *const m_start_server;
 
47
    QPushButton *const m_rotate_keyboard;
 
48
};
 
49
 
 
50
#endif // MAINWINDOW_H