MCPcopy Create free account
hub / github.com/KDE/labplot / autoRangeChanged

Method autoRangeChanged

src/frontend/dockwidgets/XYFourierFilterCurveDock.cpp:232–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void XYFourierFilterCurveDock::autoRangeChanged() {
233 bool autoRange = uiGeneralTab.cbAutoRange->isChecked();
234 m_filterData.autoRange = autoRange;
235
236 uiGeneralTab.lMin->setEnabled(!autoRange);
237 uiGeneralTab.leMin->setEnabled(!autoRange);
238 uiGeneralTab.lMax->setEnabled(!autoRange);
239 uiGeneralTab.leMax->setEnabled(!autoRange);
240 uiGeneralTab.lMinDateTime->setEnabled(!autoRange);
241 uiGeneralTab.dateTimeEditMin->setEnabled(!autoRange);
242 uiGeneralTab.lMaxDateTime->setEnabled(!autoRange);
243 uiGeneralTab.dateTimeEditMax->setEnabled(!autoRange);
244 if (autoRange) {
245 const AbstractColumn* xDataColumn = nullptr;
246 if (m_filterCurve->dataSourceType() == XYAnalysisCurve::DataSourceType::Spreadsheet)
247 xDataColumn = m_filterCurve->xDataColumn();
248 else {
249 if (m_filterCurve->dataSourceCurve())
250 xDataColumn = m_filterCurve->dataSourceCurve()->xColumn();
251 }
252
253 if (xDataColumn) {
254 const auto numberLocale = QLocale();
255 uiGeneralTab.leMin->setText(numberLocale.toString(xDataColumn->minimum()));
256 uiGeneralTab.leMax->setText(numberLocale.toString(xDataColumn->maximum()));
257 }
258 }
259}
260void XYFourierFilterCurveDock::xRangeMinChanged() {
261 SET_DOUBLE_FROM_LE_REC(m_filterData.xRange.first(), uiGeneralTab.leMin);
262}

Callers 1

initGeneralTabMethod · 0.95

Calls 5

setEnabledMethod · 0.45
setTextMethod · 0.45
toStringMethod · 0.45
minimumMethod · 0.45
maximumMethod · 0.45

Tested by

no test coverage detected