|
|
#ifndef WFPAGE_H
|
|
|
#define WFPAGE_H
|
|
|
|
|
|
#include <QtWidgets/QMainWindow>
|
|
|
#include <QtWidgets/QRadioButton>
|
|
|
#include <QtWidgets/QPushButton>
|
|
|
#include <QtWidgets/QDockWidget>
|
|
|
#include <QtWidgets/QToolBar>
|
|
|
#include <QtWidgets/QLabel>
|
|
|
#include <QFile>
|
|
|
#include <QTextStream>
|
|
|
#include <QFileDialog>
|
|
|
#include <QSettings>
|
|
|
|
|
|
#include <wfplot.h>
|
|
|
#include <wfdisplay_params.h>
|
|
|
|
|
|
class WFPage : public QMainWindow
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
explicit WFPage(QWidget *parent = 0, unsigned int bufferSize = 0, unsigned int xMAX = 0, unsigned int yMAX = 0);
|
|
|
~WFPage();
|
|
|
|
|
|
void createToolBar();
|
|
|
void buildDockList();
|
|
|
void unTabify();
|
|
|
void tabify();
|
|
|
// STORE
|
|
|
void buildFileName();
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
void readSettings();
|
|
|
void writeSettings();
|
|
|
|
|
|
bool logFileEn;
|
|
|
bool storageEnabled;
|
|
|
|
|
|
QLabel *logFileName;
|
|
|
QLabel *label_storeWfrm;
|
|
|
|
|
|
QWidget *titleWidgetV;
|
|
|
QWidget *titleWidgetE1;
|
|
|
QWidget *titleWidgetE2;
|
|
|
QWidget *titleWidgetB1;
|
|
|
QWidget *titleWidgetB2;
|
|
|
QWidget *titleWidgetB3;
|
|
|
|
|
|
unsigned int localBufferSize;
|
|
|
QByteArray **dataBuffer;
|
|
|
|
|
|
QList<QDockWidget*> dockList;
|
|
|
|
|
|
QDockWidget *dockV;
|
|
|
QDockWidget *dockE1;
|
|
|
QDockWidget *dockE2;
|
|
|
QDockWidget *dockB1;
|
|
|
QDockWidget *dockB2;
|
|
|
QDockWidget *dockB3;
|
|
|
|
|
|
QRadioButton *radio_v;
|
|
|
QRadioButton *radio_e1;
|
|
|
QRadioButton *radio_e2;
|
|
|
QRadioButton *radio_b1;
|
|
|
QRadioButton *radio_b2;
|
|
|
QRadioButton *radio_b3;
|
|
|
QRadioButton *radio_tabify;
|
|
|
|
|
|
QPushButton *button_selectAll;
|
|
|
QPushButton *button_storeWfrm;
|
|
|
|
|
|
QToolBar *myToolBar;
|
|
|
|
|
|
WFPlot *wfPlot_v;
|
|
|
WFPlot *wfPlot_e1;
|
|
|
WFPlot *wfPlot_e2;
|
|
|
WFPlot *wfPlot_b1;
|
|
|
WFPlot *wfPlot_b2;
|
|
|
WFPlot *wfPlot_b3;
|
|
|
|
|
|
QFile *logFile;
|
|
|
|
|
|
QTextStream *logFileStrm;
|
|
|
|
|
|
QString pageTitle;
|
|
|
QString defaultStorageDirectory;
|
|
|
|
|
|
void displayOnPlot(short *data, unsigned char num, unsigned int coarseTime, unsigned int fineTime, double deltaT, unsigned int nbData);
|
|
|
void initDataBuffer();
|
|
|
void fillDataBuffer(short *data, unsigned char num, unsigned int coarseTime, unsigned int fineTime, double deltaT, unsigned int nbData);
|
|
|
void storeDataBuffer(unsigned int nbData);
|
|
|
|
|
|
bool allowDataStorage;
|
|
|
|
|
|
signals:
|
|
|
|
|
|
public slots:
|
|
|
void actionRadioV(bool state);
|
|
|
void actionRadioE1(bool state);
|
|
|
void actionRadioE2(bool state);
|
|
|
void actionRadioB1(bool state);
|
|
|
void actionRadioB2(bool state);
|
|
|
void actionRadioB3(bool state);
|
|
|
void organizeDocks();
|
|
|
void selectAll();
|
|
|
void storeWfrm();
|
|
|
void logFileEnDisable(bool state);
|
|
|
void chooseDir();
|
|
|
void setDefaultStorageDirectory(QString nameOfTheDirectory);
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif // WFPAGE_H
|
|
|
|