Commit a38645da authored by Stefan Gerlach's avatar Stefan Gerlach

[locale] Use number locale in double spin boxes of all docks

parent 5384d04f
......@@ -121,6 +121,11 @@ void CustomPointDock::setPoints(QList<CustomPoint*> list) {
m_aspect = list.first();
Q_ASSERT(m_point);
SET_NUMBER_LOCALE
ui.sbSymbolSize->setLocale(numberLocale);
ui.sbSymbolBorderWidth->setLocale(numberLocale);
//if there is more then one point in the list, disable the comment and name widgets in "general"
if (list.size() == 1) {
ui.lName->setEnabled(true);
......
......@@ -364,6 +364,14 @@ void HistogramDock::setCurves(QList<Histogram*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
setModel();
SET_NUMBER_LOCALE
ui.sbLineWidth->setLocale(numberLocale);
ui.sbSymbolSize->setLocale(numberLocale);
ui.sbSymbolBorderWidth->setLocale(numberLocale);
ui.sbValuesDistance->setLocale(numberLocale);
ui.sbErrorBarsCapSize->setLocale(numberLocale);
ui.sbErrorBarsWidth->setLocale(numberLocale);
//if there are more then one curve in the list, disable the content in the tab "general"
if (m_curvesList.size() == 1) {
ui.lName->setEnabled(true);
......@@ -399,7 +407,6 @@ void HistogramDock::setCurves(QList<Histogram*> list) {
ui.leName->setToolTip("");
//show the properties of the first curve
SET_NUMBER_LOCALE
ui.cbType->setCurrentIndex(m_curve->type());
ui.cbOrientation->setCurrentIndex(m_curve->orientation());
ui.cbBinningMethod->setCurrentIndex(m_curve->binningMethod());
......
......@@ -138,6 +138,13 @@ void ImageDock::setImages(QList<Image*> list) {
m_image = list.first();
m_aspect = list.first();
SET_NUMBER_LOCALE
ui.sbWidth->setLocale(numberLocale);
ui.sbHeight->setLocale(numberLocale);
ui.sbPositionX->setLocale(numberLocale);
ui.sbPositionY->setLocale(numberLocale);
ui.sbBorderWidth->setLocale(numberLocale);
//if there are more then one image in the list, disable the name and comment field in the tab "general"
if (list.size() == 1) {
ui.lName->setEnabled(true);
......
......@@ -73,6 +73,9 @@ void ReferenceLineDock::setReferenceLines(QList<ReferenceLine*> list) {
m_aspect = list.first();
Q_ASSERT(m_line);
SET_NUMBER_LOCALE
ui.sbLineWidth->setLocale(numberLocale);
//if there is more then one point in the list, disable the comment and name widgets in "general"
if (list.size() == 1) {
ui.lName->setEnabled(true);
......
......@@ -158,6 +158,16 @@ void WorksheetDock::setWorksheets(QList<Worksheet*> list) {
m_worksheet = list.first();
m_aspect = list.first();
SET_NUMBER_LOCALE
ui.sbWidth->setLocale(numberLocale);
ui.sbHeight->setLocale(numberLocale);
ui.sbLayoutTopMargin->setLocale(numberLocale);
ui.sbLayoutBottomMargin->setLocale(numberLocale);
ui.sbLayoutLeftMargin->setLocale(numberLocale);
ui.sbLayoutRightMargin->setLocale(numberLocale);
ui.sbLayoutHorizontalSpacing->setLocale(numberLocale);
ui.sbLayoutVerticalSpacing->setLocale(numberLocale);
//if there are more then one worksheet in the list, disable the name and comment field in the tab "general"
if (list.size() == 1) {
ui.lName->setEnabled(true);
......
......@@ -245,6 +245,12 @@ void XYConvolutionCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_convolutionData = m_convolutionCurve->convolutionData();
SET_NUMBER_LOCALE
uiGeneralTab.sbSamplingInterval->setLocale(numberLocale);
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -228,6 +228,12 @@ void XYCorrelationCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_correlationData = m_correlationCurve->correlationData();
SET_NUMBER_LOCALE
uiGeneralTab.sbSamplingInterval->setLocale(numberLocale);
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -577,6 +577,16 @@ void XYCurveDock::setCurves(QList<XYCurve*> list) {
Q_ASSERT(m_curve);
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
setModel();
SET_NUMBER_LOCALE
ui.sbLineWidth->setLocale(numberLocale);
ui.sbDropLineWidth->setLocale(numberLocale);
ui.sbSymbolSize->setLocale(numberLocale);
ui.sbSymbolBorderWidth->setLocale(numberLocale);
ui.sbValuesDistance->setLocale(numberLocale);
ui.sbErrorBarsCapSize->setLocale(numberLocale);
ui.sbErrorBarsWidth->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -241,6 +241,13 @@ void XYDataReductionCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_dataReductionData = m_dataReductionCurve->dataReductionData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
uiGeneralTab.sbTolerance->setLocale(numberLocale);
uiGeneralTab.sbTolerance2->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -230,6 +230,11 @@ void XYDifferentiationCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_differentiationData = m_differentiationCurve->differentiationData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -224,6 +224,13 @@ void XYFourierFilterCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_filterData = m_filterCurve->filterData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
uiGeneralTab.sbCutoff->setLocale(numberLocale);
uiGeneralTab.sbCutoff2->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -195,6 +195,11 @@ void XYFourierTransformCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_transformData = m_transformCurve->transformData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -230,6 +230,11 @@ void XYIntegrationCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_integrationData = m_integrationCurve->integrationData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -130,6 +130,7 @@ void XYInterpolationCurveDock::setupGeneral() {
connect(uiGeneralTab.sbContinuity, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &XYInterpolationCurveDock::continuityChanged);
connect(uiGeneralTab.sbBias, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &XYInterpolationCurveDock::biasChanged);
connect(uiGeneralTab.cbEval, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XYInterpolationCurveDock::evaluateChanged);
// double?
connect(uiGeneralTab.sbPoints, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &XYInterpolationCurveDock::numberOfPointsChanged);
connect(uiGeneralTab.cbPointsMode, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XYInterpolationCurveDock::pointsModeChanged);
connect(uiGeneralTab.pbRecalculate, &QPushButton::clicked, this, &XYInterpolationCurveDock::recalculateClicked);
......@@ -265,6 +266,15 @@ void XYInterpolationCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_interpolationData = m_interpolationCurve->interpolationData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
uiGeneralTab.sbTension->setLocale(numberLocale);
uiGeneralTab.sbContinuity->setLocale(numberLocale);
uiGeneralTab.sbBias->setLocale(numberLocale);
uiGeneralTab.sbPoints->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -251,6 +251,14 @@ void XYSmoothCurveDock::setCurves(QList<XYCurve*> list) {
m_aspectTreeModel = new AspectTreeModel(m_curve->project());
this->setModel();
m_smoothData = m_smoothCurve->smoothData();
SET_NUMBER_LOCALE
uiGeneralTab.sbMin->setLocale(numberLocale);
uiGeneralTab.sbMax->setLocale(numberLocale);
uiGeneralTab.sbPercentile->setLocale(numberLocale);
uiGeneralTab.sbLeftValue->setLocale(numberLocale);
uiGeneralTab.sbRightValue->setLocale(numberLocale);
initGeneralTab();
initTabs();
m_initializing = false;
......
......@@ -236,6 +236,13 @@ void LabelWidget::setAxes(QList<Axis*> axes) {
connect(axis->title(), &TextLabel::rotationAngleChanged, this, &LabelWidget::labelRotationAngleChanged );
}
SET_NUMBER_LOCALE
ui.sbPositionX->setLocale(numberLocale);
ui.sbPositionY->setLocale(numberLocale);
ui.sbOffsetX->setLocale(numberLocale);
ui.sbOffsetY->setLocale(numberLocale);
ui.sbBorderWidth->setLocale(numberLocale);
m_axesList = axes;
m_label = m_labelsList.first();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment