-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemperature_data_display.h
More file actions
51 lines (41 loc) · 1.19 KB
/
Copy pathtemperature_data_display.h
File metadata and controls
51 lines (41 loc) · 1.19 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
/*
* Author: Chance Reimer
* Purpose: To use QSerialPort to read data from the FPGA board every second and display the results on a graph
* Grabbed good info from teh Hands-On GUI Programming with C++ book, pg 97 starting
* */
#ifndef TEMPERATURE_DATA_DISPLAY_H
#define TEMPERATURE_DATA_DISPLAY_H
#include <QMainWindow>
#include <QtCharts>
#include <QChartView>
#include <QSerialPort>
//Adding file from preexisting files on local directory
#include "settingsdialog.h" //Created by QT
using namespace QtCharts;
namespace Ui {
class Temperature_Data_Display;
}
class Temperature_Data_Display : public QMainWindow
{
Q_OBJECT
public:
explicit Temperature_Data_Display(QWidget *parent = nullptr);
~Temperature_Data_Display();
public slots:
void openSerialPort();
void closeSerialPort();
void grabData();
signals:
void sendData(qreal);
private:
Ui::Temperature_Data_Display *ui;
SettingsDialog* port_Settings;
QSerialPort* port;
QChart* chart;
QChartView *chartView;
QDateTimeAxis* x_Axis;
QValueAxis* y_Axis;
QLineSeries* series;
QDateTime startTime;
};
#endif // TEMPERATURE_DATA_DISPLAY_H