mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-04 11:50:05 +02:00
Gui slot call focus fix (#150)
* fix for editingFinished for qlineedit using isModified() * spinbox disable keyboard tracking to use valuechanged so slot called only after editing finished, focus fix * return pressed forces qtextfield to be set (slot for tab checks for modification flag due to avoid unnecessary set when focus). This is to remove inconsistencies from command line. A return should set even if it looks like no modification in gui Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
parent
050f0ff8a0
commit
180c7b7191
@ -52,6 +52,9 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-1.000000000000000</double>
|
<double>-1.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
|
@ -98,6 +98,9 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -463,6 +463,9 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="suffix">
|
<property name="suffix">
|
||||||
<string>ns</string>
|
<string>ns</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -180,6 +180,9 @@
|
|||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
<string><html><head/><body><p>High Voltage. Range: 60 - 200V. Swich off high voltage by setting to 0.</p><p>-1 corresponds to different values from detectors.</p><p>#highvoltage#</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -2169,7 +2169,7 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QStackedWidget" name="stackedTimeInterval">
|
<widget class="QStackedWidget" name="stackedTimeInterval">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="pageTimeGap">
|
<widget class="QWidget" name="pageTimeGap">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||||
@ -2181,6 +2181,9 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
@ -2249,6 +2252,9 @@ Displays minimum, maximum and sum of values for each plot.
|
|||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
|
@ -18,17 +18,24 @@ class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
|
|||||||
void SetDetector();
|
void SetDetector();
|
||||||
void SetControlPort(int port);
|
void SetControlPort(int port);
|
||||||
void SetStopPort(int port);
|
void SetStopPort(int port);
|
||||||
void SetDetectorUDPIP();
|
void SetDetectorUDPIP(bool force = false);
|
||||||
void SetDetectorUDPMAC();
|
void ForceSetDetectorUDPIP();
|
||||||
|
void SetDetectorUDPMAC(bool force = false);
|
||||||
|
void ForceSetDetectorUDPMAC();
|
||||||
void SetCltZMQPort(int port);
|
void SetCltZMQPort(int port);
|
||||||
void SetCltZMQIP();
|
void SetCltZMQIP(bool force = false);
|
||||||
void SetRxrHostname();
|
void ForceSetCltZMQIP();
|
||||||
|
void SetRxrHostname(bool force = false);
|
||||||
|
void ForceSetRxrHostname();
|
||||||
void SetRxrTCPPort(int port);
|
void SetRxrTCPPort(int port);
|
||||||
void SetRxrUDPPort(int port);
|
void SetRxrUDPPort(int port);
|
||||||
void SetRxrUDPIP();
|
void SetRxrUDPIP(bool force = false);
|
||||||
void SetRxrUDPMAC();
|
void ForceSetRxrUDPIP();
|
||||||
|
void SetRxrUDPMAC(bool force = false);
|
||||||
|
void ForceSetRxrUDPMAC();
|
||||||
void SetRxrZMQPort(int port);
|
void SetRxrZMQPort(int port);
|
||||||
void SetRxrZMQIP();
|
void SetRxrZMQIP(bool force = false);
|
||||||
|
void ForceSetRxrZMQIP();
|
||||||
void GetROI();
|
void GetROI();
|
||||||
void ClearROI();
|
void ClearROI();
|
||||||
void SetROI();
|
void SetROI();
|
||||||
|
@ -13,7 +13,8 @@ class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
|||||||
private slots:
|
private slots:
|
||||||
void GetOutputDir();
|
void GetOutputDir();
|
||||||
void BrowseOutputDir();
|
void BrowseOutputDir();
|
||||||
void SetOutputDir();
|
void SetOutputDir(bool force = false);
|
||||||
|
void ForceSetOutputDir();
|
||||||
void SetFileFormat(int format);
|
void SetFileFormat(int format);
|
||||||
void SetOverwriteEnable(bool enable);
|
void SetOverwriteEnable(bool enable);
|
||||||
void SetTenGigaEnable(bool enable);
|
void SetTenGigaEnable(bool enable);
|
||||||
|
@ -31,7 +31,8 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
|||||||
void SetDelay();
|
void SetDelay();
|
||||||
void SetBurstPeriod();
|
void SetBurstPeriod();
|
||||||
void SetFileWrite(bool val);
|
void SetFileWrite(bool val);
|
||||||
void SetFileName();
|
void SetFileName(bool force = false);
|
||||||
|
void ForceSetFileName();
|
||||||
void SetRunIndex(int val);
|
void SetRunIndex(int val);
|
||||||
void SetStartingFrameNumber(int val);
|
void SetStartingFrameNumber(int val);
|
||||||
void UpdateProgress();
|
void UpdateProgress();
|
||||||
|
@ -24,6 +24,12 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
|||||||
void SetBinary();
|
void SetBinary();
|
||||||
void SetGapPixels(bool enable);
|
void SetGapPixels(bool enable);
|
||||||
void SetTitles();
|
void SetTitles();
|
||||||
|
void isXMinModified();
|
||||||
|
void isXMaxModified();
|
||||||
|
void isYMinModified();
|
||||||
|
void isYMaxModified();
|
||||||
|
void isZMinModified();
|
||||||
|
void isZMaxModified();
|
||||||
void SetXRange();
|
void SetXRange();
|
||||||
void SetYRange();
|
void SetYRange();
|
||||||
void CheckAspectRatio();
|
void CheckAspectRatio();
|
||||||
|
@ -26,7 +26,7 @@ void qDacWidget::SetupWidgetWindow(std::string name) {
|
|||||||
|
|
||||||
void qDacWidget::Initialization() {
|
void qDacWidget::Initialization() {
|
||||||
if (isDac) {
|
if (isDac) {
|
||||||
connect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
connect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ void qDacWidget::SetDetectorIndex(int id) {
|
|||||||
void qDacWidget::GetDac() {
|
void qDacWidget::GetDac() {
|
||||||
LOG(logDEBUG) << "Getting Dac " << index;
|
LOG(logDEBUG) << "Getting Dac " << index;
|
||||||
|
|
||||||
disconnect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
disconnect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||||
try {
|
try {
|
||||||
// dac units
|
// dac units
|
||||||
auto retval = det->getDAC(index, 0, {detectorIndex}).squash(-1);
|
auto retval = det->getDAC(index, 0, {detectorIndex}).squash(-1);
|
||||||
@ -52,7 +52,7 @@ void qDacWidget::GetDac() {
|
|||||||
CATCH_DISPLAY(std::string("Could not get dac ") + std::to_string(index),
|
CATCH_DISPLAY(std::string("Could not get dac ") + std::to_string(index),
|
||||||
"qDacWidget::GetDac")
|
"qDacWidget::GetDac")
|
||||||
|
|
||||||
connect(spinDac, SIGNAL(editingFinished()), this, SLOT(SetDac()));
|
connect(spinDac, SIGNAL(valueChanged(double)), this, SLOT(SetDac()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qDacWidget::SetDac() {
|
void qDacWidget::SetDac() {
|
||||||
|
@ -65,8 +65,7 @@ void qTabAdvanced::Initialization() {
|
|||||||
|
|
||||||
// trimming
|
// trimming
|
||||||
if (tab_trimming->isEnabled()) {
|
if (tab_trimming->isEnabled()) {
|
||||||
// editingFinished to not set trimbits for every character input
|
connect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this,
|
||||||
connect(spinSetAllTrimbits, SIGNAL(editingFinished()), this,
|
|
||||||
SLOT(SetAllTrimbits()));
|
SLOT(SetAllTrimbits()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,23 +78,36 @@ void qTabAdvanced::Initialization() {
|
|||||||
SLOT(SetStopPort(int)));
|
SLOT(SetStopPort(int)));
|
||||||
connect(dispDetectorUDPIP, SIGNAL(editingFinished()), this,
|
connect(dispDetectorUDPIP, SIGNAL(editingFinished()), this,
|
||||||
SLOT(SetDetectorUDPIP()));
|
SLOT(SetDetectorUDPIP()));
|
||||||
|
connect(dispDetectorUDPIP, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetDetectorUDPIP()));
|
||||||
connect(dispDetectorUDPMAC, SIGNAL(editingFinished()), this,
|
connect(dispDetectorUDPMAC, SIGNAL(editingFinished()), this,
|
||||||
SLOT(SetDetectorUDPMAC()));
|
SLOT(SetDetectorUDPMAC()));
|
||||||
|
connect(dispDetectorUDPMAC, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetDetectorUDPMAC()));
|
||||||
connect(spinZMQPort, SIGNAL(valueChanged(int)), this,
|
connect(spinZMQPort, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetCltZMQPort(int)));
|
SLOT(SetCltZMQPort(int)));
|
||||||
connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetCltZMQIP()));
|
connect(dispZMQIP, SIGNAL(editingFinished()), this, SLOT(SetCltZMQIP()));
|
||||||
|
connect(dispZMQIP, SIGNAL(returnPressed()), this, SLOT(ForceSetCltZMQIP()));
|
||||||
connect(dispRxrHostname, SIGNAL(editingFinished()), this,
|
connect(dispRxrHostname, SIGNAL(editingFinished()), this,
|
||||||
SLOT(SetRxrHostname()));
|
SLOT(SetRxrHostname()));
|
||||||
|
connect(dispRxrHostname, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetRxrHostname()));
|
||||||
connect(spinRxrTCPPort, SIGNAL(valueChanged(int)), this,
|
connect(spinRxrTCPPort, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRxrTCPPort(int)));
|
SLOT(SetRxrTCPPort(int)));
|
||||||
connect(spinRxrUDPPort, SIGNAL(valueChanged(int)), this,
|
connect(spinRxrUDPPort, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRxrUDPPort(int)));
|
SLOT(SetRxrUDPPort(int)));
|
||||||
connect(dispRxrUDPIP, SIGNAL(editingFinished()), this, SLOT(SetRxrUDPIP()));
|
connect(dispRxrUDPIP, SIGNAL(editingFinished()), this, SLOT(SetRxrUDPIP()));
|
||||||
|
connect(dispRxrUDPIP, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetRxrUDPIP()));
|
||||||
connect(dispRxrUDPMAC, SIGNAL(editingFinished()), this,
|
connect(dispRxrUDPMAC, SIGNAL(editingFinished()), this,
|
||||||
SLOT(SetRxrUDPMAC()));
|
SLOT(SetRxrUDPMAC()));
|
||||||
|
connect(dispRxrUDPMAC, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetRxrUDPMAC()));
|
||||||
connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this,
|
connect(spinRxrZMQPort, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRxrZMQPort(int)));
|
SLOT(SetRxrZMQPort(int)));
|
||||||
connect(dispRxrZMQIP, SIGNAL(editingFinished()), this, SLOT(SetRxrZMQIP()));
|
connect(dispRxrZMQIP, SIGNAL(editingFinished()), this, SLOT(SetRxrZMQIP()));
|
||||||
|
connect(dispRxrZMQIP, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetRxrZMQIP()));
|
||||||
|
|
||||||
// roi
|
// roi
|
||||||
if (tab_roi->isEnabled()) {
|
if (tab_roi->isEnabled()) {
|
||||||
@ -421,28 +433,42 @@ void qTabAdvanced::SetStopPort(int port) {
|
|||||||
&qTabAdvanced::GetStopPort)
|
&qTabAdvanced::GetStopPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetDetectorUDPIP() {
|
void qTabAdvanced::SetDetectorUDPIP(bool force) {
|
||||||
std::string s = dispDetectorUDPIP->text().toAscii().constData();
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logINFO) << "Setting Detector UDP IP:" << s;
|
if (dispDetectorUDPIP->isModified() || force) {
|
||||||
try {
|
dispDetectorUDPIP->setModified(false);
|
||||||
det->setSourceUDPIP(sls::IpAddr{s}, {comboDetector->currentIndex()});
|
std::string s = dispDetectorUDPIP->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Detector UDP IP:" << s;
|
||||||
|
try {
|
||||||
|
det->setSourceUDPIP(sls::IpAddr{s},
|
||||||
|
{comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Detector UDP IP.",
|
||||||
|
"qTabAdvanced::SetDetectorUDPIP", this,
|
||||||
|
&qTabAdvanced::GetDetectorUDPIP)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Detector UDP IP.",
|
|
||||||
"qTabAdvanced::SetDetectorUDPIP", this,
|
|
||||||
&qTabAdvanced::GetDetectorUDPIP)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetDetectorUDPMAC() {
|
void qTabAdvanced::ForceSetDetectorUDPIP() { SetDetectorUDPIP(true); };
|
||||||
std::string s = dispDetectorUDPMAC->text().toAscii().constData();
|
|
||||||
LOG(logINFO) << "Setting Detector UDP MAC:" << s;
|
void qTabAdvanced::SetDetectorUDPMAC(bool force) {
|
||||||
try {
|
// return forces modification (inconsistency from command line)
|
||||||
det->setSourceUDPMAC(sls::MacAddr{s}, {comboDetector->currentIndex()});
|
if (dispDetectorUDPMAC->isModified() || force) {
|
||||||
|
dispDetectorUDPMAC->setModified(false);
|
||||||
|
std::string s = dispDetectorUDPMAC->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Detector UDP MAC:" << s;
|
||||||
|
try {
|
||||||
|
det->setSourceUDPMAC(sls::MacAddr{s},
|
||||||
|
{comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Detector UDP MAC.",
|
||||||
|
"qTabAdvanced::SetDetectorUDPMAC", this,
|
||||||
|
&qTabAdvanced::GetDetectorUDPMAC)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Detector UDP MAC.",
|
|
||||||
"qTabAdvanced::SetDetectorUDPMAC", this,
|
|
||||||
&qTabAdvanced::GetDetectorUDPMAC)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabAdvanced::ForceSetDetectorUDPMAC() { SetDetectorUDPMAC(true); }
|
||||||
|
|
||||||
void qTabAdvanced::SetCltZMQPort(int port) {
|
void qTabAdvanced::SetCltZMQPort(int port) {
|
||||||
LOG(logINFO) << "Setting Client ZMQ Port:" << port;
|
LOG(logINFO) << "Setting Client ZMQ Port:" << port;
|
||||||
try {
|
try {
|
||||||
@ -453,29 +479,44 @@ void qTabAdvanced::SetCltZMQPort(int port) {
|
|||||||
&qTabAdvanced::GetCltZMQPort)
|
&qTabAdvanced::GetCltZMQPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetCltZMQIP() {
|
void qTabAdvanced::SetCltZMQIP(bool force) {
|
||||||
std::string s = dispZMQIP->text().toAscii().constData();
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logINFO) << "Setting Client ZMQ IP:" << s;
|
if (dispZMQIP->isModified() || force) {
|
||||||
try {
|
dispZMQIP->setModified(false);
|
||||||
det->setClientZmqIp(sls::IpAddr{s}, {comboDetector->currentIndex()});
|
std::string s = dispZMQIP->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Client ZMQ IP:" << s;
|
||||||
|
try {
|
||||||
|
det->setClientZmqIp(sls::IpAddr{s},
|
||||||
|
{comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Client ZMQ IP.",
|
||||||
|
"qTabAdvanced::SetCltZMQIP", this,
|
||||||
|
&qTabAdvanced::GetCltZMQIP)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Client ZMQ IP.", "qTabAdvanced::SetCltZMQIP",
|
|
||||||
this, &qTabAdvanced::GetCltZMQIP)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrHostname() {
|
void qTabAdvanced::ForceSetCltZMQIP() { SetCltZMQIP(true); }
|
||||||
std::string s = dispZMQIP->text().toAscii().constData();
|
|
||||||
LOG(logINFO) << "Setting Receiver Hostname:" << s;
|
|
||||||
try {
|
|
||||||
det->setRxHostname(s, {comboDetector->currentIndex()});
|
|
||||||
}
|
|
||||||
CATCH_HANDLE("Could not set Client ZMQ IP.", "qTabAdvanced::SetRxrHostname",
|
|
||||||
this, &qTabAdvanced::GetRxrHostname)
|
|
||||||
|
|
||||||
// update all network widgets (receiver mainly)
|
void qTabAdvanced::SetRxrHostname(bool force) {
|
||||||
SetDetector();
|
// return forces modification (inconsistency from command line)
|
||||||
|
if (dispRxrHostname->isModified() || force) {
|
||||||
|
dispRxrHostname->setModified(false);
|
||||||
|
std::string s = dispRxrHostname->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Receiver Hostname:" << s;
|
||||||
|
try {
|
||||||
|
det->setRxHostname(s, {comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Client ZMQ IP.",
|
||||||
|
"qTabAdvanced::SetRxrHostname", this,
|
||||||
|
&qTabAdvanced::GetRxrHostname)
|
||||||
|
|
||||||
|
// update all network widgets (receiver mainly)
|
||||||
|
SetDetector();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabAdvanced::ForceSetRxrHostname() { SetRxrHostname(true); }
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrTCPPort(int port) {
|
void qTabAdvanced::SetRxrTCPPort(int port) {
|
||||||
LOG(logINFO) << "Setting Receiver TCP Port:" << port;
|
LOG(logINFO) << "Setting Receiver TCP Port:" << port;
|
||||||
try {
|
try {
|
||||||
@ -496,29 +537,42 @@ void qTabAdvanced::SetRxrUDPPort(int port) {
|
|||||||
&qTabAdvanced::GetRxrUDPPort)
|
&qTabAdvanced::GetRxrUDPPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrUDPIP() {
|
void qTabAdvanced::SetRxrUDPIP(bool force) {
|
||||||
std::string s = dispRxrUDPIP->text().toAscii().constData();
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logINFO) << "Setting Receiver UDP IP:" << s;
|
if (dispRxrUDPIP->isModified() || force) {
|
||||||
try {
|
dispRxrUDPIP->setModified(false);
|
||||||
det->setDestinationUDPIP(sls::IpAddr{s},
|
std::string s = dispRxrUDPIP->text().toAscii().constData();
|
||||||
{comboDetector->currentIndex()});
|
LOG(logINFO) << "Setting Receiver UDP IP:" << s;
|
||||||
|
try {
|
||||||
|
det->setDestinationUDPIP(sls::IpAddr{s},
|
||||||
|
{comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Receiver UDP IP.",
|
||||||
|
"qTabAdvanced::SetRxrUDPIP", this,
|
||||||
|
&qTabAdvanced::GetRxrUDPIP)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Receiver UDP IP.", "qTabAdvanced::SetRxrUDPIP",
|
|
||||||
this, &qTabAdvanced::GetRxrUDPIP)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrUDPMAC() {
|
void qTabAdvanced::ForceSetRxrUDPIP() { SetRxrUDPIP(true); }
|
||||||
std::string s = dispRxrUDPMAC->text().toAscii().constData();
|
|
||||||
LOG(logINFO) << "Setting Receiver UDP MAC:" << s;
|
void qTabAdvanced::SetRxrUDPMAC(bool force) {
|
||||||
try {
|
// return forces modification (inconsistency from command line)
|
||||||
det->setDestinationUDPMAC(sls::MacAddr{s},
|
if (dispRxrUDPMAC->isModified() || force) {
|
||||||
{comboDetector->currentIndex()});
|
dispRxrUDPMAC->setModified(false);
|
||||||
|
std::string s = dispRxrUDPMAC->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Receiver UDP MAC:" << s;
|
||||||
|
try {
|
||||||
|
det->setDestinationUDPMAC(sls::MacAddr{s},
|
||||||
|
{comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Receiver UDP MAC.",
|
||||||
|
"qTabAdvanced::SetRxrUDPMAC", this,
|
||||||
|
&qTabAdvanced::GetRxrUDPMAC)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Receiver UDP MAC.",
|
|
||||||
"qTabAdvanced::SetRxrUDPMAC", this,
|
|
||||||
&qTabAdvanced::GetRxrUDPMAC)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabAdvanced::ForceSetRxrUDPMAC() { SetRxrUDPMAC(true); }
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrZMQPort(int port) {
|
void qTabAdvanced::SetRxrZMQPort(int port) {
|
||||||
LOG(logINFO) << "Setting Receiver ZMQ Port:" << port;
|
LOG(logINFO) << "Setting Receiver ZMQ Port:" << port;
|
||||||
try {
|
try {
|
||||||
@ -529,16 +583,23 @@ void qTabAdvanced::SetRxrZMQPort(int port) {
|
|||||||
&qTabAdvanced::GetRxrZMQPort)
|
&qTabAdvanced::GetRxrZMQPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetRxrZMQIP() {
|
void qTabAdvanced::SetRxrZMQIP(bool force) {
|
||||||
std::string s = dispRxrZMQIP->text().toAscii().constData();
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logINFO) << "Setting Receiver ZMQ IP:" << s;
|
if (dispRxrZMQIP->isModified() || force) {
|
||||||
try {
|
dispRxrZMQIP->setModified(false);
|
||||||
det->setRxZmqIP(sls::IpAddr{s}, {comboDetector->currentIndex()});
|
std::string s = dispRxrZMQIP->text().toAscii().constData();
|
||||||
|
LOG(logINFO) << "Setting Receiver ZMQ IP:" << s;
|
||||||
|
try {
|
||||||
|
det->setRxZmqIP(sls::IpAddr{s}, {comboDetector->currentIndex()});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set Receiver ZMQ IP.",
|
||||||
|
"qTabAdvanced::SetRxrZMQIP", this,
|
||||||
|
&qTabAdvanced::GetRxrZMQIP)
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set Receiver ZMQ IP.", "qTabAdvanced::SetRxrZMQIP",
|
|
||||||
this, &qTabAdvanced::GetRxrZMQIP)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabAdvanced::ForceSetRxrZMQIP() { SetRxrZMQIP(true); }
|
||||||
|
|
||||||
void qTabAdvanced::GetROI() {
|
void qTabAdvanced::GetROI() {
|
||||||
LOG(logDEBUG) << "Getting ROI";
|
LOG(logDEBUG) << "Getting ROI";
|
||||||
try {
|
try {
|
||||||
@ -575,7 +636,7 @@ void qTabAdvanced::SetROI() {
|
|||||||
|
|
||||||
void qTabAdvanced::GetAllTrimbits() {
|
void qTabAdvanced::GetAllTrimbits() {
|
||||||
LOG(logDEBUG) << "Getting all trimbits value";
|
LOG(logDEBUG) << "Getting all trimbits value";
|
||||||
disconnect(spinSetAllTrimbits, SIGNAL(editingFinished()), this,
|
disconnect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetAllTrimbits()));
|
SLOT(SetAllTrimbits()));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -584,7 +645,7 @@ void qTabAdvanced::GetAllTrimbits() {
|
|||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get all trimbits.", "qTabAdvanced::GetAllTrimbits")
|
CATCH_DISPLAY("Could not get all trimbits.", "qTabAdvanced::GetAllTrimbits")
|
||||||
|
|
||||||
connect(spinSetAllTrimbits, SIGNAL(editingFinished()), this,
|
connect(spinSetAllTrimbits, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetAllTrimbits()));
|
SLOT(SetAllTrimbits()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,8 @@ void qTabDataOutput::Initialization() {
|
|||||||
SLOT(GetOutputDir()));
|
SLOT(GetOutputDir()));
|
||||||
connect(dispOutputDir, SIGNAL(editingFinished()), this,
|
connect(dispOutputDir, SIGNAL(editingFinished()), this,
|
||||||
SLOT(SetOutputDir()));
|
SLOT(SetOutputDir()));
|
||||||
|
connect(dispOutputDir, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetOutputDir()));
|
||||||
connect(btnOutputBrowse, SIGNAL(clicked()), this, SLOT(BrowseOutputDir()));
|
connect(btnOutputBrowse, SIGNAL(clicked()), this, SLOT(BrowseOutputDir()));
|
||||||
connect(comboFileFormat, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboFileFormat, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetFileFormat(int)));
|
SLOT(SetFileFormat(int)));
|
||||||
@ -69,7 +71,7 @@ void qTabDataOutput::Initialization() {
|
|||||||
SLOT(EnableRateCorrection()));
|
SLOT(EnableRateCorrection()));
|
||||||
connect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
connect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
connect(spinCustomDeadTime, SIGNAL(editingFinished()), this,
|
connect(spinCustomDeadTime, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
}
|
}
|
||||||
// flags, speed
|
// flags, speed
|
||||||
@ -169,35 +171,41 @@ void qTabDataOutput::BrowseOutputDir() {
|
|||||||
dispOutputDir->setText(directory);
|
dispOutputDir->setText(directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetOutputDir() {
|
void qTabDataOutput::SetOutputDir(bool force) {
|
||||||
QString path = dispOutputDir->text();
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logDEBUG) << "Setting output directory to "
|
if (dispOutputDir->isModified() || force) {
|
||||||
<< path.toAscii().constData();
|
dispOutputDir->setModified(false);
|
||||||
|
QString path = dispOutputDir->text();
|
||||||
|
LOG(logDEBUG) << "Setting output directory to "
|
||||||
|
<< path.toAscii().constData();
|
||||||
|
|
||||||
// empty
|
// empty
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
qDefs::Message(qDefs::WARNING,
|
qDefs::Message(qDefs::WARNING,
|
||||||
"Invalid Output Path. Must not be empty.",
|
"Invalid Output Path. Must not be empty.",
|
||||||
"qTabDataOutput::SetOutputDir");
|
"qTabDataOutput::SetOutputDir");
|
||||||
LOG(logWARNING) << "Invalid Output Path. Must not be empty.";
|
LOG(logWARNING) << "Invalid Output Path. Must not be empty.";
|
||||||
GetOutputDir();
|
GetOutputDir();
|
||||||
} else {
|
} else {
|
||||||
// chop off trailing '/'
|
// chop off trailing '/'
|
||||||
if (path.endsWith('/')) {
|
if (path.endsWith('/')) {
|
||||||
while (path.endsWith('/')) {
|
while (path.endsWith('/')) {
|
||||||
path.chop(1);
|
path.chop(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
std::string spath = std::string(path.toAscii().constData());
|
||||||
|
try {
|
||||||
|
det->setFilePath(spath, {comboDetector->currentIndex() - 1});
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set output file path.",
|
||||||
|
"qTabDataOutput::SetOutputDir", this,
|
||||||
|
&qTabDataOutput::GetOutputDir)
|
||||||
}
|
}
|
||||||
std::string spath = std::string(path.toAscii().constData());
|
|
||||||
try {
|
|
||||||
det->setFilePath(spath, {comboDetector->currentIndex() - 1});
|
|
||||||
}
|
|
||||||
CATCH_HANDLE("Could not set output file path.",
|
|
||||||
"qTabDataOutput::SetOutputDir", this,
|
|
||||||
&qTabDataOutput::GetOutputDir)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabDataOutput::ForceSetOutputDir() { SetOutputDir(true); };
|
||||||
|
|
||||||
void qTabDataOutput::GetFileFormat() {
|
void qTabDataOutput::GetFileFormat() {
|
||||||
LOG(logDEBUG) << "Getting File Format";
|
LOG(logDEBUG) << "Getting File Format";
|
||||||
disconnect(comboFileFormat, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(comboFileFormat, SIGNAL(currentIndexChanged(int)), this,
|
||||||
@ -288,7 +296,7 @@ void qTabDataOutput::GetRateCorrection() {
|
|||||||
SLOT(EnableRateCorrection()));
|
SLOT(EnableRateCorrection()));
|
||||||
disconnect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
disconnect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
disconnect(spinCustomDeadTime, SIGNAL(editingFinished()), this,
|
disconnect(spinCustomDeadTime, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
try {
|
try {
|
||||||
spinCustomDeadTime->setValue(-1);
|
spinCustomDeadTime->setValue(-1);
|
||||||
@ -305,7 +313,7 @@ void qTabDataOutput::GetRateCorrection() {
|
|||||||
connect(chkRate, SIGNAL(toggled(bool)), this, SLOT(EnableRateCorrection()));
|
connect(chkRate, SIGNAL(toggled(bool)), this, SLOT(EnableRateCorrection()));
|
||||||
connect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
connect(btnGroupRate, SIGNAL(buttonClicked(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
connect(spinCustomDeadTime, SIGNAL(editingFinished()), this,
|
connect(spinCustomDeadTime, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ void qTabDeveloper::Initialization() {
|
|||||||
SLOT(Refresh()));
|
SLOT(Refresh()));
|
||||||
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetHighVoltage()));
|
SLOT(SetHighVoltage()));
|
||||||
connect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
|
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDeveloper::PopulateDetectors() {
|
void qTabDeveloper::PopulateDetectors() {
|
||||||
@ -312,7 +312,7 @@ void qTabDeveloper::GetHighVoltage() {
|
|||||||
if (!comboHV->isVisible() && !spinHV->isVisible())
|
if (!comboHV->isVisible() && !spinHV->isVisible())
|
||||||
return;
|
return;
|
||||||
LOG(logDEBUG) << "Getting High Voltage";
|
LOG(logDEBUG) << "Getting High Voltage";
|
||||||
disconnect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
|
disconnect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||||
disconnect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetHighVoltage()));
|
SLOT(SetHighVoltage()));
|
||||||
try {
|
try {
|
||||||
@ -359,7 +359,7 @@ void qTabDeveloper::GetHighVoltage() {
|
|||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get high voltage.",
|
CATCH_DISPLAY("Could not get high voltage.",
|
||||||
"qTabDeveloper::GetHighVoltage")
|
"qTabDeveloper::GetHighVoltage")
|
||||||
connect(spinHV, SIGNAL(editingFinished()), this, SLOT(SetHighVoltage()));
|
connect(spinHV, SIGNAL(valueChanged(int)), this, SLOT(SetHighVoltage()));
|
||||||
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboHV, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetHighVoltage()));
|
SLOT(SetHighVoltage()));
|
||||||
}
|
}
|
||||||
|
@ -129,6 +129,8 @@ void qTabMeasurement::Initialization() {
|
|||||||
}
|
}
|
||||||
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(SetFileWrite(bool)));
|
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(SetFileWrite(bool)));
|
||||||
connect(dispFileName, SIGNAL(editingFinished()), this, SLOT(SetFileName()));
|
connect(dispFileName, SIGNAL(editingFinished()), this, SLOT(SetFileName()));
|
||||||
|
connect(dispFileName, SIGNAL(returnPressed()), this,
|
||||||
|
SLOT(ForceSetFileName()));
|
||||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
|
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
|
||||||
if (startingFnumImplemented) {
|
if (startingFnumImplemented) {
|
||||||
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
connect(spinStartingFrameNumber, SIGNAL(valueChanged(int)), this,
|
||||||
@ -723,19 +725,26 @@ void qTabMeasurement::GetFileName() {
|
|||||||
connect(dispFileName, SIGNAL(editingFinished()), this, SLOT(SetFileName()));
|
connect(dispFileName, SIGNAL(editingFinished()), this, SLOT(SetFileName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabMeasurement::SetFileName() {
|
void qTabMeasurement::SetFileName(bool force) {
|
||||||
std::string val = std::string(dispFileName->text().toAscii().constData());
|
// return forces modification (inconsistency from command line)
|
||||||
LOG(logINFO) << "Setting File Name Prefix:" << val;
|
if (dispFileName->isModified() || force) {
|
||||||
try {
|
dispFileName->setModified(false);
|
||||||
det->setFileNamePrefix(val);
|
std::string val =
|
||||||
}
|
std::string(dispFileName->text().toAscii().constData());
|
||||||
CATCH_HANDLE("Could not set file name prefix.",
|
LOG(logINFO) << "Setting File Name Prefix:" << val;
|
||||||
"qTabMeasurement::SetFileName", this,
|
try {
|
||||||
&qTabMeasurement::GetFileName)
|
det->setFileNamePrefix(val);
|
||||||
|
}
|
||||||
|
CATCH_HANDLE("Could not set file name prefix.",
|
||||||
|
"qTabMeasurement::SetFileName", this,
|
||||||
|
&qTabMeasurement::GetFileName)
|
||||||
|
|
||||||
emit FileNameChangedSignal(dispFileName->text());
|
emit FileNameChangedSignal(dispFileName->text());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabMeasurement::ForceSetFileName() { SetFileName(true); }
|
||||||
|
|
||||||
void qTabMeasurement::GetRunIndex() {
|
void qTabMeasurement::GetRunIndex() {
|
||||||
LOG(logDEBUG) << "Getting Acquisition File index";
|
LOG(logDEBUG) << "Getting Acquisition File index";
|
||||||
disconnect(spinIndex, SIGNAL(valueChanged(int)), this,
|
disconnect(spinIndex, SIGNAL(valueChanged(int)), this,
|
||||||
|
@ -87,9 +87,9 @@ void qTabPlot::Initialization() {
|
|||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(spinTimeGap, SIGNAL(editingFinished()), this,
|
connect(spinTimeGap, SIGNAL(valueChanged(double)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(spinNthFrame, SIGNAL(editingFinished()), this,
|
connect(spinNthFrame, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
|
|
||||||
// navigation buttons for options
|
// navigation buttons for options
|
||||||
@ -174,17 +174,17 @@ void qTabPlot::Initialization() {
|
|||||||
connect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
connect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
||||||
connect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
connect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
connect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
connect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
connect(dispXMin, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
connect(dispXMin, SIGNAL(editingFinished()), this, SLOT(isXMinModified()));
|
||||||
connect(dispXMax, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
connect(dispXMax, SIGNAL(editingFinished()), this, SLOT(isXMaxModified()));
|
||||||
connect(dispYMin, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
connect(dispYMin, SIGNAL(editingFinished()), this, SLOT(isYMinModified()));
|
||||||
connect(dispYMax, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
connect(dispYMax, SIGNAL(editingFinished()), this, SLOT(isYMaxModified()));
|
||||||
connect(chkAspectRatio, SIGNAL(toggled(bool)), this,
|
connect(chkAspectRatio, SIGNAL(toggled(bool)), this,
|
||||||
SLOT(CheckAspectRatio()));
|
SLOT(CheckAspectRatio()));
|
||||||
|
|
||||||
connect(chkZMin, SIGNAL(toggled(bool)), this, SLOT(SetZRange()));
|
connect(chkZMin, SIGNAL(toggled(bool)), this, SLOT(SetZRange()));
|
||||||
connect(chkZMax, SIGNAL(toggled(bool)), this, SLOT(SetZRange()));
|
connect(chkZMax, SIGNAL(toggled(bool)), this, SLOT(SetZRange()));
|
||||||
connect(dispZMin, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
connect(dispZMin, SIGNAL(editingFinished()), this, SLOT(isZMinModified()));
|
||||||
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(SetZRange()));
|
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(isZMaxModified()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabPlot::Select1DPlot(bool enable) {
|
void qTabPlot::Select1DPlot(bool enable) {
|
||||||
@ -389,6 +389,48 @@ void qTabPlot::SetTitles() {
|
|||||||
SLOT(SetTitles()));
|
SLOT(SetTitles()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isXMinModified() {
|
||||||
|
if (dispXMin->isModified()) {
|
||||||
|
dispXMin->setModified(false);
|
||||||
|
SetXRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isXMaxModified() {
|
||||||
|
if (dispXMax->isModified()) {
|
||||||
|
dispXMax->setModified(false);
|
||||||
|
SetXRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isYMinModified() {
|
||||||
|
if (dispYMin->isModified()) {
|
||||||
|
dispYMin->setModified(false);
|
||||||
|
SetYRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isYMaxModified() {
|
||||||
|
if (dispYMax->isModified()) {
|
||||||
|
dispYMax->setModified(false);
|
||||||
|
SetYRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isZMinModified() {
|
||||||
|
if (dispZMin->isModified()) {
|
||||||
|
dispZMin->setModified(false);
|
||||||
|
SetZRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabPlot::isZMaxModified() {
|
||||||
|
if (dispZMax->isModified()) {
|
||||||
|
dispZMax->setModified(false);
|
||||||
|
SetZRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void qTabPlot::SetXRange() {
|
void qTabPlot::SetXRange() {
|
||||||
LOG(logDEBUG) << "Enable X axis range";
|
LOG(logDEBUG) << "Enable X axis range";
|
||||||
|
|
||||||
@ -452,10 +494,14 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
|
|||||||
disconnect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
disconnect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
||||||
disconnect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
disconnect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
disconnect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
disconnect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
disconnect(dispXMin, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
disconnect(dispXMin, SIGNAL(editingFinished()), this,
|
||||||
disconnect(dispXMax, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
SLOT(isXMinModified()));
|
||||||
disconnect(dispYMin, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
disconnect(dispXMax, SIGNAL(editingFinished()), this,
|
||||||
disconnect(dispYMax, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
SLOT(isXMaxModified()));
|
||||||
|
disconnect(dispYMin, SIGNAL(editingFinished()), this,
|
||||||
|
SLOT(isYMinModified()));
|
||||||
|
disconnect(dispYMax, SIGNAL(editingFinished()), this,
|
||||||
|
SLOT(isYMaxModified()));
|
||||||
|
|
||||||
// check all, fill all
|
// check all, fill all
|
||||||
chkXMin->setChecked(true);
|
chkXMin->setChecked(true);
|
||||||
@ -550,10 +596,10 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
|
|||||||
connect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
connect(chkXMax, SIGNAL(toggled(bool)), this, SLOT(SetXRange()));
|
||||||
connect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
connect(chkYMin, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
connect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
connect(chkYMax, SIGNAL(toggled(bool)), this, SLOT(SetYRange()));
|
||||||
connect(dispXMin, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
connect(dispXMin, SIGNAL(editingFinished()), this, SLOT(isXMinModified()));
|
||||||
connect(dispXMax, SIGNAL(editingFinished()), this, SLOT(SetXRange()));
|
connect(dispXMax, SIGNAL(editingFinished()), this, SLOT(isXMaxModified()));
|
||||||
connect(dispYMin, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
connect(dispYMin, SIGNAL(editingFinished()), this, SLOT(isYMinModified()));
|
||||||
connect(dispYMax, SIGNAL(editingFinished()), this, SLOT(SetYRange()));
|
connect(dispYMax, SIGNAL(editingFinished()), this, SLOT(isYMaxModified()));
|
||||||
|
|
||||||
bool isRange[4]{true, true, true, true};
|
bool isRange[4]{true, true, true, true};
|
||||||
plot->SetXYRangeChanged(true, ranges, isRange);
|
plot->SetXYRangeChanged(true, ranges, isRange);
|
||||||
@ -583,9 +629,9 @@ void qTabPlot::GetStreamingFrequency() {
|
|||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
disconnect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
disconnect(spinTimeGap, SIGNAL(editingFinished()), this,
|
disconnect(spinTimeGap, SIGNAL(valueChanged(double)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
disconnect(spinNthFrame, SIGNAL(editingFinished()), this,
|
disconnect(spinNthFrame, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
try {
|
try {
|
||||||
int freq = det->getRxZmqFrequency().tsquash(
|
int freq = det->getRxZmqFrequency().tsquash(
|
||||||
@ -621,9 +667,9 @@ void qTabPlot::GetStreamingFrequency() {
|
|||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboTimeGapUnit, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(spinTimeGap, SIGNAL(editingFinished()), this,
|
connect(spinTimeGap, SIGNAL(valueChanged(double)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
connect(spinNthFrame, SIGNAL(editingFinished()), this,
|
connect(spinNthFrame, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetStreamingFrequency()));
|
SLOT(SetStreamingFrequency()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user