-
Notifications
You must be signed in to change notification settings - Fork 11
/
testqasioeventdispatcher.h
82 lines (63 loc) · 1.68 KB
/
testqasioeventdispatcher.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef TESTQASIOEVENTDISPATCHER_H
#define TESTQASIOEVENTDISPATCHER_H
#include <QMainWindow>
#include <QObject>
#include <QPushButton>
#include <QtTest>
#include <boost/asio/io_service.hpp>
class TestQAsioEventDispatcher : public QObject
{
Q_OBJECT
public:
explicit TestQAsioEventDispatcher(QObject *parent = 0);
signals:
public slots:
private:
int argc=0;
char *argv={0};
boost::asio::io_service io_service;
QApplication *app;
private slots:
void initTestCase();
void asioHandlersAreExecuted();
void qsocketReadWrite();
void qtimers();
void guiEvents();
void cleanupTestCase();
};
class Ui_MainWindow
{
public:
QPushButton *pushButton;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QStringLiteral("MainWindow"));
MainWindow->resize(400, 300);
pushButton = new QPushButton(MainWindow);
pushButton->setObjectName(QStringLiteral("pushButton"));
pushButton->setGeometry(QRect(100, 80, 81, 23));
retranslateUi(MainWindow);
QMetaObject::connectSlotsByName(MainWindow);
} // setupUi
void retranslateUi(QMainWindow *MainWindow)
{
Q_UNUSED(MainWindow);
pushButton->setText(QApplication::translate("MainWindow", "PushButton", 0));
} // retranslateUi
};
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_pushButton_clicked();
private:
Ui_MainWindow *ui;
protected:
void mousePressEvent(QMouseEvent *);
void paintEvent(QPaintEvent *);
};
#endif // TESTQASIOEVENTDISPATCHER_H