-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathMainWindow.h
More file actions
107 lines (87 loc) · 3.35 KB
/
Copy pathMainWindow.h
File metadata and controls
107 lines (87 loc) · 3.35 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
97
98
99
100
101
102
103
104
105
106
107
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QSettings>
#include <QJSEngine>
#include <QThread>
#include <QComboBox>
#include <QCheckBox>
#include <QListWidget>
#include <QLabel>
#include <QPushButton>
#include <QLineEdit>
#include <QSharedPointer>
#include <QStandardPaths>
#include "SessionManager.h"
#include "TestMethodManager.h"
#include "Logger.h"
#include "JLinkManager.h"
#include "TestClient.h"
#include "TestFixtureWidget.h"
#include "SessionInfoWidget.h"
#include "DutInfoWidget.h"
#include "ActionHintWidget.h"
#include "PrinterManager.h"
class MainWindow : public QWidget
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = Q_NULLPTR);
~MainWindow() Q_DECL_OVERRIDE;
public slots:
void startNewSession();
void finishSession();
void startFullCycleTesting();
void startSelectedFunction();
void startFunction(const QString& functionName);
void delay(int msec);
Dut getDut(int no);
protected:
void closeEvent(QCloseEvent* event);
private:
void setControlsEnabled(bool state);
QString _workDirectory = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation); // For release version
// QString _workDirectory = QDir(".").absolutePath(); //For test version
// QString _workDirectory = QDir("../..").absolutePath(); //For development
QSharedPointer<QSettings> _settings;
PrinterManager* _printerManager;
SessionManager* _session;
QSharedPointer<Logger> _logger;
TestMethodManager* _methodManager;
QList<QThread*> _threads;
QList<JLinkManager*> _JLinkList;
QList<TestClient*> _testClientList;
QStringList _operatorList;
//--- GUI Elements ------------------------------------------------
QLabel* _headerLabel;
QLineEdit* _operatorNameEdit;
QLineEdit* _batchNumberEdit;
QLineEdit* _batchInfoEdit;
QPushButton* _newSessionButton;
QPushButton* _finishSessionButton;
QComboBox* _selectMetodBox;
QCheckBox* _manualCommandsCheckBox;
QListWidget* _testFunctionsListWidget;
QPushButton* _startFullCycleTestingButton;
QPushButton* _startSelectedTestButton;
QListWidget* _logWidget;
QPushButton* _clearLogWidgetButton;
QPushButton* _copyLogWidgetButton;
QListWidget* _childProcessOutputLogWidget;
TestFixtureWidget* _testFixtureWidget;
SessionInfoWidget* _sessionInfoWidget;
DutInfoWidget* _dutInfoWidget;
int _startedSequenceCount = 0;
ActionHintWidget* _actionHintWidget;
const QString HINT_START = "Place DUTs into the test fixture, enter information for the Step 1 and start test session";
const QString HINT_CHOOSE_METHOD = "Choose a test method (Step 2), select DUTs (Step 3) and run full cycle testing (or single step testing) for the selected DUTs";
const QString HINT_DETECT_DUTS = "Detecting DUTs in the test fixture and downloading Railtest...";
const QString HINT_DOWNLOAD_RAILTEST = "Downloading Railtest...";
const QString HINT_FULL_TESTING = "Perfoming full cycle testing for the selected DUTs...";
const QString HINT_DEVICE_ID = "Reading device IDs...";
const QString HINT_CHECK_VOLTAGE = "Checking voltage on AIN1...";
const QString HINT_TEST_ACCEL = "Testing accelerometer...";
const QString HINT_TEST_LIGHT = "Testing light sensor...";
const QString HINT_TEST_DALI = "Testing DALI interface...";
const QString HINT_READY = "READY";
};
#endif // MAINWINDOW_H