| 80 | } |
| 81 | |
| 82 | void XYFourierTransformCurveDock::initGeneralTab() { |
| 83 | // show the properties of the first curve |
| 84 | cbXDataColumn->setAspect(m_transformCurve->xDataColumn(), m_transformCurve->xDataColumnPath()); |
| 85 | cbYDataColumn->setAspect(m_transformCurve->yDataColumn(), m_transformCurve->yDataColumnPath()); |
| 86 | uiGeneralTab.cbAutoRange->setChecked(m_transformData.autoRange); |
| 87 | const auto numberLocale = QLocale(); |
| 88 | uiGeneralTab.leMin->setText(numberLocale.toString(m_transformData.xRange.first())); |
| 89 | uiGeneralTab.leMax->setText(numberLocale.toString(m_transformData.xRange.last())); |
| 90 | this->autoRangeChanged(); |
| 91 | |
| 92 | uiGeneralTab.cbWindowType->setCurrentIndex(m_transformData.windowType); |
| 93 | this->windowTypeChanged(); |
| 94 | uiGeneralTab.cbType->setCurrentIndex(m_transformData.type); |
| 95 | this->typeChanged(); |
| 96 | uiGeneralTab.cbTwoSided->setChecked(m_transformData.twoSided); |
| 97 | this->twoSidedChanged(); // show/hide shifted check box |
| 98 | uiGeneralTab.cbShifted->setChecked(m_transformData.shifted); |
| 99 | this->shiftedChanged(); |
| 100 | uiGeneralTab.cbXScale->setCurrentIndex(m_transformData.xScale); |
| 101 | this->xScaleChanged(); |
| 102 | this->showTransformResult(); |
| 103 | |
| 104 | // enable the "recalculate"-button if the source data was changed since the last transform |
| 105 | uiGeneralTab.pbRecalculate->setEnabled(m_transformCurve->isSourceDataChangedSinceLastRecalc()); |
| 106 | |
| 107 | uiGeneralTab.chkLegendVisible->setChecked(m_curve->legendVisible()); |
| 108 | uiGeneralTab.chkVisible->setChecked(m_curve->isVisible()); |
| 109 | |
| 110 | // Slots |
| 111 | connect(m_transformCurve, &XYFourierTransformCurve::xDataColumnChanged, this, &XYFourierTransformCurveDock::curveXDataColumnChanged); |
| 112 | connect(m_transformCurve, &XYFourierTransformCurve::yDataColumnChanged, this, &XYFourierTransformCurveDock::curveYDataColumnChanged); |
| 113 | connect(m_transformCurve, &XYFourierTransformCurve::transformDataChanged, this, &XYFourierTransformCurveDock::curveTransformDataChanged); |
| 114 | connect(m_transformCurve, &XYFourierTransformCurve::sourceDataChanged, this, &XYFourierTransformCurveDock::enableRecalculate); |
| 115 | } |
| 116 | |
| 117 | /*! |
| 118 | sets the curves. The properties of the curves in the list \c list can be edited in this widget. |
nothing calls this directly
no test coverage detected