mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
WIP
This commit is contained in:
@ -130,18 +130,45 @@ class qDefs : public QWidget {
|
||||
};
|
||||
|
||||
/**
|
||||
* returns the time in the appropriate time unit
|
||||
* returns the value in ms
|
||||
* @param unit unit of time
|
||||
* @param value time in seconds
|
||||
* returns the corresponding time value
|
||||
* @param value time
|
||||
* returns time value in ms
|
||||
*/
|
||||
static double getCorrectTime(timeUnit &unit, double value) {
|
||||
static double getMSTime(timeUnit unit, double value) {
|
||||
double valueMS = value;
|
||||
switch (unit) {
|
||||
case NANOSECONDS:
|
||||
valueMS /= 1000;
|
||||
case MICROSECONDS:
|
||||
valueMS /= 1000;
|
||||
return valueMs;
|
||||
|
||||
case HOURS:
|
||||
valueMS *= 60;
|
||||
case MINUTES:
|
||||
valueMS *= 60;
|
||||
case SECONDS:
|
||||
valueMS *= 1000;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return valueMS;
|
||||
};
|
||||
|
||||
/**
|
||||
* returns the time in the appropriate time unit
|
||||
* @param value time in seconds
|
||||
* returns the time in an appropriate time and unit
|
||||
*/
|
||||
static std::pair<double, timeUnit> getCorrectTime(double value) {
|
||||
timeUnit unit;
|
||||
int intUnit = (int)SECONDS;
|
||||
|
||||
/**0 ms*/
|
||||
if (!value) {
|
||||
unit = MILLISECONDS;
|
||||
return value;
|
||||
return std::make_pair(value, unit);
|
||||
}
|
||||
|
||||
/** hr, min, sec */
|
||||
@ -155,7 +182,7 @@ class qDefs : public QWidget {
|
||||
}
|
||||
/** returning the previous value*/
|
||||
unit = (timeUnit)(intUnit + 1);
|
||||
return value;
|
||||
return std::make_pair(value, unit);
|
||||
}
|
||||
/** ms, us, ns */
|
||||
else {
|
||||
@ -164,7 +191,7 @@ class qDefs : public QWidget {
|
||||
intUnit++;
|
||||
}
|
||||
unit = (timeUnit)(intUnit);
|
||||
return value;
|
||||
return std::make_pair(value, unit);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -112,6 +112,8 @@ public:
|
||||
/** Set Plot frame factor - between plots, also for receiver if exists */
|
||||
void SetFrameFactor(int frame);
|
||||
|
||||
void SetCallBacks(bool enable);
|
||||
|
||||
/** Starts or stop acquisition
|
||||
* Calls startDaq() function
|
||||
* @param stop_if_running is 0 to stop acquisition and 1 to start acquisition
|
||||
@ -206,7 +208,6 @@ void DisplayStatistics(bool enable);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** Initializes all its members and the thread */
|
||||
void Initialization();
|
||||
|
@ -67,8 +67,6 @@ private:
|
||||
signals:
|
||||
void StartSignal();
|
||||
void StopSignal();
|
||||
void CheckPlotIntervalSignal();
|
||||
|
||||
|
||||
private:
|
||||
multiSlsDetector *myDet;
|
||||
|
@ -22,13 +22,8 @@ public:
|
||||
void SetScanArgument();
|
||||
void Refresh();
|
||||
|
||||
public slots:
|
||||
void SetFrequency();
|
||||
void EnableScanBox();
|
||||
|
||||
private slots:
|
||||
|
||||
xxxxxxxxxxxxxxx
|
||||
void SetPlot();
|
||||
void Set1DPlotOptionsRight();
|
||||
void Set1DPlotOptionsLeft();
|
||||
void Set2DPlotOptionsRight();
|
||||
@ -41,17 +36,7 @@ xxxxxxxxxxxxxxx
|
||||
void SetYRange();
|
||||
void CheckAspectRatio();
|
||||
void SetZRange();
|
||||
|
||||
|
||||
|
||||
|
||||
void Select1DPlot(bool b);
|
||||
void SetPlot();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void SetStreamingFrequency();
|
||||
|
||||
signals:
|
||||
void DisableZoomSignal(bool);
|
||||
@ -60,14 +45,15 @@ signals:
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
void Select1DPlot(bool enable);
|
||||
void GetGapPixels();
|
||||
void GetStreamingFrequency();
|
||||
void SetXYRange();
|
||||
void MaintainAspectRatio(int dimension);
|
||||
|
||||
multiSlsDetector *myDet;
|
||||
qDrawPlot *myPlot;
|
||||
bool isOneD;
|
||||
bool isOriginallyOneD;
|
||||
|
||||
QButtonGroup *btnGroupPlotType;
|
||||
/** interval between plots */
|
||||
|
Reference in New Issue
Block a user