- |
|
1 |
// qscope, Roman Pavelka, 2011 |
- |
|
2 |
|
1 |
#include <QApplication> |
3 |
#include <QApplication> |
2 |
#include <QPushButton> |
4 |
#include <QPushButton> |
3 |
#include <QVBoxLayout> |
5 |
#include <QVBoxLayout> |
4 |
|
6 |
|
5 |
#include "scope.h" |
7 |
#include "scope.h" |
6 |
|
8 |
|
7 |
class Window : public QWidget |
9 |
class Window : public QWidget |
8 |
{ |
10 |
{ |
9 |
public: |
11 |
public: |
10 |
Window(QWidget *parent = 0); |
12 |
Window(QWidget *parent = 0); |
11 |
}; |
13 |
}; |
12 |
|
14 |
|
13 |
Window::Window(QWidget *parent) |
15 |
Window::Window(QWidget *parent) |
14 |
: QWidget(parent) |
16 |
: QWidget(parent) |
15 |
{ |
17 |
{ |
16 |
Scope *scope = new Scope; |
18 |
Scope *scope = new Scope; |
17 |
|
19 |
|
18 |
// QPushButton *ReadDataBut = new QPushButton(tr("Read data")); |
- |
|
19 |
// connect(ReadDataBut, SIGNAL(clicked()), scope, SLOT(getData())); |
- |
|
20 |
|
- |
|
21 |
QVBoxLayout *layout = new QVBoxLayout; |
20 |
QVBoxLayout *layout = new QVBoxLayout; |
22 |
layout->addWidget(scope); |
21 |
layout->addWidget(scope); |
23 |
// layout->addWidget(ReadDataBut); |
- |
|
24 |
setLayout(layout); |
22 |
setLayout(layout); |
25 |
|
- |
|
26 |
} |
23 |
} |
27 |
|
24 |
|
28 |
|
25 |
|
29 |
int main(int argc, char *argv[]) |
26 |
int main(int argc, char *argv[]) |
30 |
{ |
27 |
{ |
31 |
QApplication app(argc, argv); |
28 |
QApplication app(argc, argv); |
32 |
Window window; |
29 |
Window window; |
33 |
window.setGeometry(800, 200, 560, 690); |
30 |
window.setGeometry(800, 200, 560, 690); |
34 |
window.show(); |
31 |
window.show(); |
35 |
return app.exec(); |
32 |
return app.exec(); |
36 |
} |
33 |
} |