-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmainwindow.h
More file actions
96 lines (82 loc) · 2.47 KB
/
mainwindow.h
File metadata and controls
96 lines (82 loc) · 2.47 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
93
94
95
96
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "alignbox.h"
#include <QtCore/QtGlobal>
#include <QMainWindow>
#include <QObject>
#include <QtSerialPort/QtSerialPort>
#include "qcustomplot.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
QByteArray bytesReceived;
QByteArray previous_response;
int xLineLength;
int yLineLength;
int xOffset;
int yOffset;
int stepSize;
int sampleSize;
QList<int> parameters;
QTextStream* stream;
public slots:
void sendGo();
void sendDone();
void sendReady();
void sendReadynopiezo();
void putChar(QByteArray data);
void putChar(char data);
void phone_CommandRouter(QByteArray buffer, quint16 bytes_received);
void setStatusbarText(const QString& text);
void putData_debug(const QByteArray &data);
signals:
void sendDataFrame(QByteArray buffer, quint16 size);
void dataReceived(QByteArray buffer);
void plotDataReceived(QList <QByteArray> buffer);
void dataSent(QByteArray);
void plotData(QList<QByteArray>);
void scan_starting();
private:
QTimer dataTimer;
void loadParameters();
Ui::MainWindow *ui;
void fillPortsInfo();
QSerialPort *serial;
QSerialPortInfo *info;
AlignWidget* wi;
void getChipSignature();
void setupStreaming(QCustomPlot *customPlot);
private slots:
void sendData();
void openSerialPort();
void closeSerialPort();
void writeData(const QByteArray &data);
void displayIncoming(QByteArray data,quint16 no_of_bytes);
void updateBounds();
void readData();
void sendData(QByteArray data);
void handleError(QSerialPort::SerialPortError error);
void print_hex_value(QByteArray data);
void on_scanPB_clicked();
void on_pushButton_Send_clicked();
void on_pushButton_2_pressed();
void on_lineEdit_Data_returnPressed();
void realtimeDataSlot(QList<QByteArray>);
void on_calibration_PB_toggled(bool checked);
void on_setup_pushButton_clicked();
void on_LoadScan_clicked();
void on_horizontalSlider_valueChanged(int value);
void on_step_size_spinBox_3_valueChanged(int arg1);
void on_focusSlider_sliderMoved(int value);
void on_focusrangeMin_valueChanged(int arg1);
void on_focusRangeMax_valueChanged(int arg1);
void on_focus_valueChanged(int arg1);
void on_focusSlider_valueChanged(int value);
};
#endif // MAINWINDOW_H