-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfallingfigures.h
50 lines (34 loc) · 942 Bytes
/
fallingfigures.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
#ifndef FALLINGFIGURES_H
#define FALLINGFIGURES_H
#include <QMainWindow>
#include <QWidget>
#include <QDebug>
#include <QRadioButton>
enum class ShapeType {Rect,Ellips};
#include "scene.h"
QT_BEGIN_NAMESPACE
namespace Ui { class FallingFigures; }
QT_END_NAMESPACE
class FallingFigures : public QMainWindow
{
Q_OBJECT
private:
QRadioButton* but_rect;
QRadioButton* but_ellipse;
public:
FallingFigures(QWidget *parent = nullptr);
~FallingFigures();
signals:
void selected_radbutton(ShapeType);
public slots:
void select_radbutton(){
if (but_rect->isChecked() ==true) { emit selected_radbutton(ShapeType::Rect);}
else if (but_ellipse->isChecked()==true) { emit selected_radbutton(ShapeType::Ellips);}
}
private:
Ui::FallingFigures *ui;
// QWidget interface
protected:
virtual void paintEvent(QPaintEvent *event);
};
#endif // FALLINGFIGURES_H