-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
92 lines (73 loc) · 1.92 KB
/
Copy pathmainwindow.h
File metadata and controls
92 lines (73 loc) · 1.92 KB
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
83
84
85
86
87
88
89
90
91
92
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFuture>
#include <QGraphicsView>
#include <QGraphicsEllipseItem>
#include <QTimer>
#include <QtSerialPort/QSerialPort>
#include <QDebug>
#include <QScrollBar>
#include <QPen>
#include <QPainterPath>
#include "serialengine.h"
#define NBVALMOY 250
#define DEP_X 5
namespace Ui {
class MainWindow;
}
extern int calc_moyenne(int *marray, int nb_val);
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void myupdate();
void on_b_stop_clicked();
void setmoyenne(int moyenne);
void on_cBscroll_toggled(bool checked);
void init_graph();
void on_send_clicked();
void drawfirststep(int posx, int posy);
void moyenne_update(int posx, int posy, long long *count);
void endpos_update(int *posx);
void on_sB_Rand_valueChanged(int arg1);
void on_sB_speed_valueChanged(int arg1);
void on_sB_update_valueChanged(int arg1);
void on_b_open_clicked();
void on_b_serClose_clicked();
void on_radioButton_clicked();
void on_sB_movex_valueChanged(int arg1);
void resizeEvent(QResizeEvent *event);
void draw_background(int posx);
void on_sB_nbMoyenne_valueChanged(int arg1);
private:
Ui::MainWindow *ui;
QGraphicsScene *scene;
QPainterPath *m_moyennepath;
QGraphicsPathItem *g_moyennepath;
QGraphicsLineItem *g_axis_x;
QPainterPath *yline;
QPainterPath *yqline;
QGraphicsPathItem *ypath;
QGraphicsPathItem *yqpath;
QGraphicsPathItem *g_datagraph;
QPainterPath *m_datapath;
QTimer *updateTimer;
QGraphicsView *view;
QFuture<int> future;
serialengine *serial;
int m_consigne;
int m_nbvalmoy;
int temperature;
int *moytab;
int moyenne;
int m_olx;
int m_oldy;
int m_dep_x;
int m_timereset;
bool m_stop;
};
#endif // MAINWINDOW_H