|
|
#ifndef PAGESPECTRA_H
|
|
|
#define PAGESPECTRA_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 PageSpectra : public QMainWindow
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
public:
|
|
|
explicit PageSpectra(QWidget *parent = 0);
|
|
|
|
|
|
void createToolBar();
|
|
|
void buildDockList();
|
|
|
void unTabify();
|
|
|
void tabify();
|
|
|
// STORE
|
|
|
void buildFileNames();
|
|
|
bool islogfileenable();
|
|
|
void appendToLogFile(const QString & text);
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
void readSettings();
|
|
|
void writeSettings();
|
|
|
|
|
|
bool logFileEn;
|
|
|
bool storageEnabledV;
|
|
|
bool storageEnabledE1;
|
|
|
bool storageEnabledE2;
|
|
|
bool storageEnabledB1;
|
|
|
bool storageEnabledB2;
|
|
|
|
|
|
QLabel *logFileName;
|
|
|
QLabel *logFileNameV;
|
|
|
QLabel *logFileNameE1;
|
|
|
QLabel *logFileNameE2;
|
|
|
QLabel *logFileNameB1;
|
|
|
QLabel *logFileNameB2;
|
|
|
|
|
|
QWidget *titleWidgetV;
|
|
|
QWidget *titleWidgetE1;
|
|
|
QWidget *titleWidgetE2;
|
|
|
QWidget *titleWidgetB1;
|
|
|
QWidget *titleWidgetB2;
|
|
|
|
|
|
QList<QDockWidget*> dockList;
|
|
|
|
|
|
QDockWidget *dockV;
|
|
|
QDockWidget *dockE1;
|
|
|
QDockWidget *dockE2;
|
|
|
QDockWidget *dockB1;
|
|
|
QDockWidget *dockB2;
|
|
|
|
|
|
QRadioButton *radio_v;
|
|
|
QRadioButton *radio_e1;
|
|
|
QRadioButton *radio_e2;
|
|
|
QRadioButton *radio_b1;
|
|
|
QRadioButton *radio_b2;
|
|
|
QRadioButton *radio_tabify;
|
|
|
|
|
|
QPushButton *button_selectAll;
|
|
|
QPushButton *button_storeWfrm;
|
|
|
QPushButton *button_chooseDir;
|
|
|
|
|
|
QToolBar *myToolBar;
|
|
|
|
|
|
WFPlot *wfPlot_v;
|
|
|
WFPlot *wfPlot_e1;
|
|
|
WFPlot *wfPlot_e2;
|
|
|
WFPlot *wfPlot_b1;
|
|
|
WFPlot *wfPlot_b2;
|
|
|
|
|
|
QFile *logFile;
|
|
|
QFile *logFileV;
|
|
|
QFile *logFileE1;
|
|
|
QFile *logFileE2;
|
|
|
QFile *logFileB1;
|
|
|
QFile *logFileB2;
|
|
|
|
|
|
QTextStream *logFileStrm;
|
|
|
QTextStream *logFileStrmV;
|
|
|
QTextStream *logFileStrmE1;
|
|
|
QTextStream *logFileStrmE2;
|
|
|
QTextStream *logFileStrmB1;
|
|
|
QTextStream *logFileStrmB2;
|
|
|
|
|
|
QString pageTitle;
|
|
|
QString defaultStorageDirectory;
|
|
|
|
|
|
unsigned int localIndex[5];
|
|
|
|
|
|
//QGridLayout *mainLayout;
|
|
|
|
|
|
void displayOnPlot(short *data, unsigned char num);
|
|
|
void displayOnPlotFloat(float *data, unsigned char num);
|
|
|
|
|
|
signals:
|
|
|
void setLogFileName(QString FileName);
|
|
|
|
|
|
public slots:
|
|
|
void actionRadioV(bool state);
|
|
|
void actionRadioE1(bool state);
|
|
|
void actionRadioE2(bool state);
|
|
|
void actionRadioB1(bool state);
|
|
|
void actionRadioB2(bool state);
|
|
|
void organizeDocks();
|
|
|
void selectAll();
|
|
|
void storeWfrm();
|
|
|
void logFileEnDisable(bool state);
|
|
|
void chooseDir();
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
#endif // PAGESPECTRA_H
|
|
|
|