SETTINGS
| 682 | //******************** SETTINGS **************************** |
| 683 | //********************************************************** |
| 684 | void DatapickerImageWidget::load() { |
| 685 | if (!m_image) |
| 686 | return; |
| 687 | |
| 688 | // No lock, because it is done already in the caller function |
| 689 | ui.cbFileEmbedd->setChecked(m_image->embedded()); |
| 690 | embeddedChanged(m_image->embedded()); |
| 691 | ui.cbFileRelativePath->setChecked(m_image->isRelativeFilePath()); |
| 692 | updateFileRelativePathCheckBoxEnable(); |
| 693 | ui.leFileName->setText(m_image->fileName()); |
| 694 | |
| 695 | // highlight the text field for the background image red if an image is used and cannot be found |
| 696 | const QString& fileName = m_image->fileName(); |
| 697 | bool invalid = (!m_image->embedded() && !fileName.isEmpty() && !QFile::exists(fileName)); |
| 698 | GuiTools::highlight(ui.leFileName, invalid); |
| 699 | |
| 700 | imageReferencePointSelected(m_image->currentSelectedReferencePoint()); |
| 701 | |
| 702 | ui.cbGraphType->setCurrentIndex(ui.cbGraphType->findData((int)m_image->axisPoints().type)); |
| 703 | ui.sbTernaryScale->setValue(m_image->axisPoints().ternaryScale); |
| 704 | const bool datetime = m_image->axisPoints().datetime; |
| 705 | ui.cbDatetime->setChecked(datetime); |
| 706 | updateXPositionWidgets(datetime); |
| 707 | |
| 708 | const double x1 = m_image->axisPoints().logicalPos[0].x(); |
| 709 | const double x2 = m_image->axisPoints().logicalPos[1].x(); |
| 710 | const double x3 = m_image->axisPoints().logicalPos[2].x(); |
| 711 | |
| 712 | ui.dtePositionX1->setMSecsSinceEpochUTC(x1); |
| 713 | ui.dtePositionX2->setMSecsSinceEpochUTC(x2); |
| 714 | ui.dtePositionX3->setMSecsSinceEpochUTC(x3); |
| 715 | |
| 716 | ui.sbPositionX1->setValue(x1); |
| 717 | ui.sbPositionY1->setValue(m_image->axisPoints().logicalPos[0].y()); |
| 718 | ui.sbPositionX2->setValue(x2); |
| 719 | ui.sbPositionY2->setValue(m_image->axisPoints().logicalPos[1].y()); |
| 720 | ui.sbPositionX3->setValue(x3); |
| 721 | ui.sbPositionY3->setValue(m_image->axisPoints().logicalPos[2].y()); |
| 722 | ui.sbPositionZ1->setValue(m_image->axisPoints().logicalPos[0].z()); |
| 723 | ui.sbPositionZ2->setValue(m_image->axisPoints().logicalPos[1].z()); |
| 724 | ui.sbPositionZ3->setValue(m_image->axisPoints().logicalPos[2].z()); |
| 725 | ui.cbPlotImageType->setCurrentIndex((int)m_image->plotImageType()); |
| 726 | ssIntensity->setSpan(m_image->settings().intensityThresholdLow, m_image->settings().intensityThresholdHigh); |
| 727 | ssForeground->setSpan(m_image->settings().foregroundThresholdLow, m_image->settings().foregroundThresholdHigh); |
| 728 | ssHue->setSpan(m_image->settings().hueThresholdLow, m_image->settings().hueThresholdHigh); |
| 729 | ssSaturation->setSpan(m_image->settings().saturationThresholdLow, m_image->settings().saturationThresholdHigh); |
| 730 | ssValue->setSpan(m_image->settings().valueThresholdLow, m_image->settings().valueThresholdHigh); |
| 731 | gvIntensity->setSpan(m_image->settings().intensityThresholdLow, m_image->settings().intensityThresholdHigh); |
| 732 | gvForeground->setSpan(m_image->settings().foregroundThresholdLow, m_image->settings().foregroundThresholdHigh); |
| 733 | gvHue->setSpan(m_image->settings().hueThresholdLow, m_image->settings().hueThresholdHigh); |
| 734 | gvSaturation->setSpan(m_image->settings().saturationThresholdLow, m_image->settings().saturationThresholdHigh); |
| 735 | gvValue->setSpan(m_image->settings().valueThresholdLow, m_image->settings().valueThresholdHigh); |
| 736 | ui.sbPointSeparation->setValue(m_image->pointSeparation()); |
| 737 | ui.sbMinSegmentLength->setValue(m_image->minSegmentLength()); |
| 738 | ui.chbSymbolVisible->setChecked(m_image->pointVisibility()); |
| 739 | } |
no test coverage detected