-
Notifications
You must be signed in to change notification settings - Fork 0
/
fsConfigureStimulators.h
executable file
·103 lines (76 loc) · 2.42 KB
/
fsConfigureStimulators.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
95
96
97
98
99
100
101
102
103
#ifndef __SPIKE_FS_CONFIGURE_STIMULATORS_H__
#define __SPIKE_FS_CONFIGURE_STIMULATORS_H__
#include <QtGui>
#include <QtWidgets>
#include <QtXml>
#include <fsSharedStimControlDefines.h>
class StimConfigureWidget : public QWidget
{
Q_OBJECT
public:
StimConfigureWidget(QWidget *parent = 0);
int loadFromXML(QDomElement &sConf);
void saveToXML(QDomDocument &doc, QDomElement &rootNode);
PulseCommand stimPulseCmd;
void setScriptFunctionNum(uint16_t num);
uint16_t getScriptFunctionNum(void);
bool isHardwareReady(void);
inline void setID(int newID) {originID = newID;};
public slots:
void frequencyChanged(void);
void periodChanged(void);
void ablePulseSequence(void);
void ableBiphasicStimulation(int);
void updateStimParameters(void);
void sendScript(void);
private:
int originID;
uint16_t scriptFunctionNum;
bool hardwareReady;
QDoubleSpinBox *pulseLengthSpinBox;
QSpinBox *nPulsesSpinBox;
QSpinBox *preDelaySpinBox;
QGroupBox *multiPulseGroup;
QDoubleSpinBox *sequenceFrequencySpinBox;
QDoubleSpinBox *sequencePeriodSpinBox;
QGroupBox *pulseTrainGroup;
QSpinBox *trainIntervalSpinBox;
QSpinBox *nTrainsSpinBox;
QSpinBox *primaryStimPinSpinBox;
QSpinBox *secondaryStimPinSpinBox;
QLabel *secondaryStimPinLabel;
QCheckBox *biphasicCheckBox;
QLabel *scriptStatus;
QPushButton *sendScriptButton;
QLabel *labelAutoSettle;
QCheckBox *setAutoSettle;
void generateStateScript(int functionNum, QString *scriptString);
private slots:
void autoSettleToggled(bool turnOn);
signals:
void newStateScript(QString *script);
void stimulatorReadyChanged(void);
void stimulatorPortSelected(int);
void sig_setAutoSettle(bool autoSettle, int originID);
};
class StimConfigTab : public QWidget
{
Q_OBJECT
public:
StimConfigTab(QWidget *parent = 0);
int loadFromXML(QDomNode &stimConfNode);
void saveToXML(QDomDocument &doc, QDomElement &scstNode);
int activeStimulator;
StimConfigureWidget *stimConfigA;
StimConfigureWidget *stimConfigB;
QPushButton *stimulatorAButton;
QPushButton *stimulatorBButton;
public slots:
void updateStimulatorStatus(void);
signals:
void stimulatorsReady(bool);
void newStateScript(QString *script);
void stateScriptFunctionValid(uint16_t, bool);
void sig_setAutoSettle(bool autoSettle, int originID);
};
#endif