-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraphwin.h
94 lines (67 loc) · 3.32 KB
/
graphwin.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
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
#ifndef GRAPHWIN_H
#define GRAPHWIN_H
#include <QDialog>
#include "classes/globalvars.h"
namespace Ui {
class graphWin;
}
class graphWin : public QDialog
{
Q_OBJECT
public:
explicit graphWin(QWidget *parent = nullptr);
~graphWin();
signals:
void tx_GraphWindowIsOpen(bool windOpen);
void tx_AddNewChannelToGraph(int idx, int chnlID);
void tx_RemoveChannelToGraph(int idx, int chnlID);
void tx_giveMeEnablesChannels();
void tx_loggingStartStop(bool started, QString filePath);
void tx_generate_ThisGUI(GUI_WIN guiEnum);
void tx_ClosingWindow_graphWin();
public slots:
void rx_EnableChannelsAre(int chnlID);
void rx_GraphChannelValue(int indx, int chnl, float val);
void rx_ramdomOP(int idx, float val, QString str);
void rx_confirmationBoxClosed(bool yesBTN, int param);
// ------------ Timer Slots
void on_timer_singleShot_Elapsed();
void on_timer_graphPloter_Elapsed();
void reCalculateGraphAxis();
private slots:
void on_pb_Add_toGraph_clicked();
void on_pb_RemoveGraph_0_clicked();
void on_pb_RemoveGraph_1_clicked();
void on_pb_RemoveGraph_2_clicked();
void on_pb_RemoveGraph_3_clicked();
void on_pb_CloseWindow_clicked();
void on_pb_StartLog_clicked();
private:
Ui::graphWin *ui;
QTimer *timer_singleShot;
QTimer *timer_graphPloter;
ConfirmationBox *msgBox;
QVector<int> qv_EnablChannels;
QVector<int> qv_availableList;
int graphedChannels[4] = {123, 123, 123, 123};
bool local_loggingStarted = false;
bool initial_bool = false;
bool chnl4thIsEnable = false;
bool chnl4thIsAppliable = false;
bool availIndex[4] = {false, false, false, false};
QColor plot0_Color = QColor(40, 110, 255);
QColor plot1_Color = QColor(12, 222, 12);
QColor plot2_Color = QColor(40, 222, 255);
QColor plot3_Color = QColor(222, 110, 255);
QString styleLogStop = "font: 600 20pt 'Times New Roman'; padding: 5px; background-color: rgb(255, 255, 255); border: 1px solid black; border-radius:5px; color:red;";
QString styleLogStart = "font: 600 20pt 'Times New Roman'; padding: 5px; background-color: lime; border: 1px solid black; border-radius:5px; color:white;";
QString style_removBtn_0 = "font: 500 14pt 'Times New Roman'; padding: 5px; color:white; background-color:"+ plot0_Color.name()+"; border: 1px solid black; border-radius:5px;";
QString style_removBtn_1 = "font: 500 14pt 'Times New Roman'; padding: 5px; color:white; background-color:"+ plot1_Color.name()+"; border: 1px solid black; border-radius:5px;";
QString style_removBtn_2 = "font: 500 14pt 'Times New Roman'; padding: 5px; color:white; background-color:"+ plot2_Color.name()+"; border: 1px solid black; border-radius:5px;";
QString style_removBtn_3 = QString("font: 500 14pt 'Times New Roman'; padding: 5px; color:white; background-color:"+ plot3_Color.name()+"; border: 1px solid black; border-radius:5px;");
QString style_removBtn_Disabled = "font: 500 14pt 'Times New Roman'; padding: 5px; color:black; background-color:transparent; border: 1px solid transparent; border-radius:5px;";
QString logUserFilePath = "";
void update_cmbBoxItems();
double graphValueArray[4] = {0.0, 0.0, 0.0, 0.0 };
};
#endif // GRAPHWIN_H