| 102 | } |
| 103 | |
| 104 | void XYConvolutionCurveDock::initGeneralTab() { |
| 105 | // show the properties of the first curve |
| 106 | // hide x-Range per default |
| 107 | uiGeneralTab.lXRange->setEnabled(false); |
| 108 | uiGeneralTab.cbAutoRange->setEnabled(false); |
| 109 | |
| 110 | uiGeneralTab.cbDataSourceType->setCurrentIndex(static_cast<int>(m_convolutionCurve->dataSourceType())); |
| 111 | this->dataSourceTypeChanged(uiGeneralTab.cbDataSourceType->currentIndex()); |
| 112 | cbDataSourceCurve->setAspect(m_convolutionCurve->dataSourceCurve()); |
| 113 | cbXDataColumn->setAspect(m_convolutionCurve->xDataColumn(), m_convolutionCurve->xDataColumnPath()); |
| 114 | cbYDataColumn->setAspect(m_convolutionCurve->yDataColumn(), m_convolutionCurve->yDataColumnPath()); |
| 115 | cbY2DataColumn->setAspect(m_convolutionCurve->y2DataColumn(), m_convolutionCurve->y2DataColumnPath()); |
| 116 | uiGeneralTab.sbSamplingInterval->setValue(m_convolutionData.samplingInterval); |
| 117 | uiGeneralTab.cbKernel->setCurrentIndex(m_convolutionData.kernel); |
| 118 | uiGeneralTab.sbKernelSize->setValue((int)m_convolutionData.kernelSize); |
| 119 | uiGeneralTab.cbAutoRange->setChecked(m_convolutionData.autoRange); |
| 120 | |
| 121 | const auto numberLocale = QLocale(); |
| 122 | uiGeneralTab.leMin->setText(numberLocale.toString(m_convolutionData.xRange.first())); |
| 123 | uiGeneralTab.leMax->setText(numberLocale.toString(m_convolutionData.xRange.last())); |
| 124 | this->autoRangeChanged(); |
| 125 | y2DataColumnChanged(cbY2DataColumn->currentModelIndex()); |
| 126 | |
| 127 | // settings |
| 128 | uiGeneralTab.cbDirection->setCurrentIndex(m_convolutionData.direction); |
| 129 | uiGeneralTab.cbType->setCurrentIndex(m_convolutionData.type); |
| 130 | // m_convolutionData.method not used |
| 131 | uiGeneralTab.cbNorm->setCurrentIndex(m_convolutionData.normalize); |
| 132 | uiGeneralTab.cbWrap->setCurrentIndex(m_convolutionData.wrap); |
| 133 | |
| 134 | this->directionChanged(); |
| 135 | |
| 136 | this->showConvolutionResult(); |
| 137 | |
| 138 | uiGeneralTab.chkLegendVisible->setChecked(m_curve->legendVisible()); |
| 139 | uiGeneralTab.chkVisible->setChecked(m_curve->isVisible()); |
| 140 | |
| 141 | // Slots |
| 142 | connect(m_convolutionCurve, &XYConvolutionCurve::dataSourceTypeChanged, this, &XYConvolutionCurveDock::curveDataSourceTypeChanged); |
| 143 | connect(m_convolutionCurve, &XYConvolutionCurve::dataSourceCurveChanged, this, &XYConvolutionCurveDock::curveDataSourceCurveChanged); |
| 144 | connect(m_convolutionCurve, &XYConvolutionCurve::xDataColumnChanged, this, &XYConvolutionCurveDock::curveXDataColumnChanged); |
| 145 | connect(m_convolutionCurve, &XYConvolutionCurve::yDataColumnChanged, this, &XYConvolutionCurveDock::curveYDataColumnChanged); |
| 146 | connect(m_convolutionCurve, &XYConvolutionCurve::y2DataColumnChanged, this, &XYConvolutionCurveDock::curveY2DataColumnChanged); |
| 147 | connect(m_convolutionCurve, &XYConvolutionCurve::convolutionDataChanged, this, &XYConvolutionCurveDock::curveConvolutionDataChanged); |
| 148 | connect(m_convolutionCurve, &XYConvolutionCurve::sourceDataChanged, this, &XYConvolutionCurveDock::enableRecalculate); |
| 149 | } |
| 150 | |
| 151 | /*! |
| 152 | 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