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