FSUDAQ_Qt6/mainWindow.h

92 lines
1.8 KiB
C
Raw Normal View History

2023-04-11 11:13:23 -04:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
2023-04-14 16:12:52 -04:00
#include <QWidget>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QLineEdit>
2023-04-17 15:17:25 -04:00
#include <QLabel>
#include <QGridLayout>
2023-04-14 16:12:52 -04:00
#include "ClassDigitizer.h"
#include "CustomThreads.h"
2023-04-11 11:13:23 -04:00
//^#===================================================== MainWindow
class MainWindow : public QMainWindow{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
2023-04-14 16:12:52 -04:00
private slots:
2023-04-17 15:17:25 -04:00
void OpenDataPath();
2023-04-17 14:09:21 -04:00
void LoadProgramSettings();
void SaveProgramSettings();
void LoadLastRunFile();
void SaveLastRunFile();
2023-04-14 16:12:52 -04:00
void OpenDigitizers();
void CloseDigitizers();
2023-04-17 15:17:25 -04:00
void SetupScalar();
void CleanUpScalar();
void OpenScalar();
void UpdateScalar();
2023-04-14 16:12:52 -04:00
void StartACQ();
void StopACQ();
private:
Digitizer ** digi;
unsigned int nDigi;
2023-04-17 14:09:21 -04:00
QString programSettingsFilePath;
QString rawDataPath;
QString prefix;
unsigned int runID;
unsigned int elogID;
2023-04-17 15:17:25 -04:00
QPushButton * bnOpenDigitizers;
QPushButton * bnCloseDigitizers;
QPushButton * bnOpenScope;
QPushButton * bnDigiSettings;
QPushButton * bnOpenScaler;
QPushButton * bnStartACQ;
QPushButton * bnStopACQ;
2023-04-14 16:12:52 -04:00
//@----- log msg
QPlainTextEdit * logInfo;
void LogMsg(QString msg);
bool logMsgHTMLMode = true;
//@-----
QLineEdit * leDataPath;
QLineEdit * lePrefix;
QLineEdit * leComment;
2023-04-17 14:09:21 -04:00
QLineEdit * leRunID;
2023-04-14 16:12:52 -04:00
//@----- Scalar
QMainWindow * scalar;
QLineEdit *** leTrigger; // need to delete manually
QLineEdit *** leAccept; // need to delete manually
2023-04-17 15:17:25 -04:00
QLabel **lbDigi;
QLabel ** lbTrigger;
QLabel ** lbAccept;
QGridLayout * scalarLayout;
ScalarThread * scalarThread;
QLabel * lbLastUpdateTime;
QLabel * lbScalarACQStatus;
int nScalarBuilt;
2023-04-14 16:12:52 -04:00
//@----- ACQ
ReadDataThread ** readDataThread;
2023-04-11 11:13:23 -04:00
};
#endif // MAINWINDOW_H