mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 06:29:21 +01:00
WIP
This commit is contained in:
@@ -19,7 +19,8 @@ class qCloneWidget : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
qCloneWidget(QWidget *parent, int id, QString title, QString xTitle, QString yTitle, QString zTitle, int numDim, std::string FilePath,
|
||||
qCloneWidget(QWidget *parent, int id, QString title, QString xTitle, QString yTitle, QString zTitle, int numDim,
|
||||
QString filePath, QString fileName, int fileIndex,
|
||||
bool displayStats, QString min, QString max, QString sum);
|
||||
~qCloneWidget();
|
||||
|
||||
@@ -35,7 +36,7 @@ class qCloneWidget : public QMainWindow {
|
||||
* @param lines style of plot if lines or dots
|
||||
* @param markers style of plot markers or not
|
||||
*/
|
||||
void SetCloneHists(int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, std::vector<std::string> histTitle, bool lines, bool markers);
|
||||
void SetCloneHists(unsigned int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, std::vector<std::string> histTitle, bool lines, bool markers);
|
||||
|
||||
/**
|
||||
* Get the 1D hist values to plot for angle plotting
|
||||
@@ -76,7 +77,9 @@ class qCloneWidget : public QMainWindow {
|
||||
|
||||
private:
|
||||
int id;
|
||||
std::string filePath;
|
||||
QString filePath;
|
||||
QString fileName;
|
||||
int imageIndex;
|
||||
SlsQt1DPlot *cloneplot1D;
|
||||
SlsQt2DPlotLayout *cloneplot2D;
|
||||
QVector<SlsQtH1D *> cloneplot1D_hists;
|
||||
|
||||
@@ -32,27 +32,33 @@ class qDrawPlot : public QWidget {
|
||||
/** Destructor */
|
||||
~qDrawPlot();
|
||||
|
||||
/** If the gui client has started or stopped */
|
||||
// measurement tab
|
||||
void SetClientInitiated();
|
||||
bool GetClientInitiated();
|
||||
// main
|
||||
bool isRunning();
|
||||
// from measurement tabs
|
||||
int GetProgress();
|
||||
int GetCurrentFrameIndex();
|
||||
// from plot tab
|
||||
void Select1dPlot(bool enable);
|
||||
void SetPlotTitlePrefix(QString title);
|
||||
void SetXAxisTitle(QString title);
|
||||
void SetYAxisTitle(QString title);
|
||||
void SetZAxisTitle(QString title);
|
||||
void DisableZoom(bool disable);
|
||||
void SetXYRange(bool changed);
|
||||
void SetXYRangeChanged();
|
||||
void SetXYRangeValues(double val, qDefs::range xy);
|
||||
void IsXYRangeValues(bool changed, qDefs::range xy);
|
||||
double GetXMinimum();
|
||||
double GetXMaximum();
|
||||
double GetYMinimum();
|
||||
double GetYMaximum();
|
||||
void SetZRange(bool isZmin, bool isZmax, double zmin, double zmax);
|
||||
void SetDataCallBack(bool enable);
|
||||
void SetBinary(bool enable, int from = 0, int to = 0);
|
||||
|
||||
|
||||
/** Starts or stop acquisition
|
||||
* Calls startDaq() function
|
||||
* @param stop_if_running is 0 to stop acquisition and 1 to start
|
||||
@@ -61,25 +67,29 @@ class qDrawPlot : public QWidget {
|
||||
void StartStopDaqToggle(bool stop_if_running = 0);
|
||||
|
||||
public slots:
|
||||
void StopAcquisition();
|
||||
void SetPersistency(int val);
|
||||
void SetLines(bool enable);
|
||||
void SetMarkers(bool enable);
|
||||
void Set1dLogY(bool enable);
|
||||
void SetInterpolate(bool enable);
|
||||
void SetContour(bool enable);
|
||||
void SetLogz(bool enable);
|
||||
void SetPedestal(bool enable);
|
||||
void RecalculatePedestal();
|
||||
void SetAccumulate(bool enable);
|
||||
void ResetAccumulate();
|
||||
void DisplayStatistics(bool enable);
|
||||
void EnableGainPlot(bool enable);
|
||||
void ClonePlot();
|
||||
void CloseClones();
|
||||
void SaveClones();
|
||||
void SavePlot();
|
||||
void Select1DPlot();
|
||||
void Select2DPlot();
|
||||
void SavePlot();
|
||||
|
||||
|
||||
private slots:
|
||||
void SetSaveFileName(QString val);
|
||||
void CloneCloseEvent(int id);
|
||||
void EnableGainPlot(bool e);
|
||||
|
||||
|
||||
void UpdatePlot();
|
||||
void StartDaq(bool start);
|
||||
@@ -87,31 +97,24 @@ class qDrawPlot : public QWidget {
|
||||
|
||||
signals:
|
||||
void UpdatingPlotFinished();
|
||||
void InterpolateSignal(bool);
|
||||
void ContourSignal(bool);
|
||||
void LogzSignal(bool);
|
||||
void LogySignal(bool);
|
||||
void ResetZMinZMaxSignal(bool, bool, double, double);
|
||||
void SetCurrentMeasurementSignal(int);
|
||||
void AcquisitionErrorSignal(QString);
|
||||
void UpdatePlotSignal();
|
||||
void GainPlotSignal(bool);
|
||||
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
void SetupStatistics();
|
||||
void SetupPlots();
|
||||
const char *GetTitle1d(int histIndex);
|
||||
double *GetHistYAxis(int histIndex);
|
||||
void SetStyle(SlsQtH1D *h);
|
||||
void GetStatistics(double &min, double &max, double &sum, double *array, int size);
|
||||
void SelectPlot(int i = 2);
|
||||
void Clear1DPlot();
|
||||
|
||||
|
||||
void SetupStatistics();
|
||||
void SetupPlots();
|
||||
|
||||
int LockLastImageArray();
|
||||
int UnlockLastImageArray();
|
||||
void SetStyle(SlsQtH1D *h);
|
||||
void GetStatistics(double &min, double &max, double &sum, double *array, int size);
|
||||
void DetachHists();
|
||||
|
||||
|
||||
|
||||
int StartDaqForGui();
|
||||
int StopDaqForGui();
|
||||
bool StartOrStopThread(bool start);
|
||||
@@ -132,7 +135,7 @@ class qDrawPlot : public QWidget {
|
||||
slsDetectorDefs::detectorType detType;
|
||||
|
||||
SlsQt1DPlot *plot1d{nullptr};
|
||||
QVector<SlsQtH1D *> hists1d;
|
||||
QVector<SlsQtH1D *> hists1d;
|
||||
SlsQt2DPlotLayout *plot2d{nullptr};
|
||||
SlsQt2DPlotLayout *gainplot2d{nullptr};
|
||||
|
||||
@@ -145,18 +148,17 @@ class qDrawPlot : public QWidget {
|
||||
bool plotRequired{false};/**?? */
|
||||
bool running{false};
|
||||
int progress{0};
|
||||
volatile bool stopSignal{false};
|
||||
bool clientInitiated{false};
|
||||
bool clientInitiated{false};
|
||||
|
||||
// titles
|
||||
QString plotTitle{""};
|
||||
QString plotTitle{""};
|
||||
QString plotTitle_prefix{""};
|
||||
QLabel *lblFrameIndexTitle1d{nullptr};
|
||||
std::vector<std::string> title1d;
|
||||
std::string title2d{""};
|
||||
std::string title2d{""};
|
||||
QString xTitle1d{"Channel Number"};
|
||||
QString yTitle1d{"Counts"};
|
||||
QString xTitle2d{"Pixel"};
|
||||
QString xTitle2d{"Pixel"};
|
||||
QString yTitle2d{"Pixel"};
|
||||
QString zTitle2d{"Intensity"};
|
||||
bool XYRangeChanged{false};
|
||||
@@ -164,17 +166,16 @@ class qDrawPlot : public QWidget {
|
||||
bool isXYRangeEnable[4]{false, false, false, false};
|
||||
|
||||
// data
|
||||
unsigned int nHists{0};
|
||||
int histNBins{0};
|
||||
double *x1d{nullptr};
|
||||
std::vector<double *> y1d;
|
||||
double *image2d{nullptr};
|
||||
unsigned int nHists{1};
|
||||
double *datax1d{nullptr};
|
||||
std::vector<double *> datay1d;
|
||||
double *data2d{nullptr};
|
||||
|
||||
//options
|
||||
bool binary{false};
|
||||
int binaryFrom{0};
|
||||
int binaryTo{0};
|
||||
int persistency0};
|
||||
int persistency{0};
|
||||
int currentPersistency0};
|
||||
bool isLines{true};
|
||||
bool isMarkers{false};
|
||||
|
||||
@@ -66,8 +66,7 @@ private:
|
||||
|
||||
signals:
|
||||
void StartSignal();
|
||||
void StopSignal();
|
||||
|
||||
void FileNameChangedSignal(QString);
|
||||
private:
|
||||
multiSlsDetector *myDet;
|
||||
qDrawPlot *myPlot;
|
||||
|
||||
@@ -40,7 +40,6 @@ private slots:
|
||||
|
||||
signals:
|
||||
void DisableZoomSignal(bool);
|
||||
void ResetZMinZMaxSignal(bool,bool,double,double);
|
||||
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
@@ -53,7 +52,7 @@ private:
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
qDrawPlot *myPlot;
|
||||
bool isOneD;
|
||||
bool is1d;
|
||||
|
||||
QButtonGroup *btnGroupPlotType;
|
||||
QStackedLayout *stackedLayout;
|
||||
|
||||
Reference in New Issue
Block a user