Commit 3ace91b6 authored by Alexander Semke's avatar Alexander Semke

Locale updates in Datapicker widgets.

parent 5e22cb8b
......@@ -59,6 +59,8 @@ DatapickerCurveWidget::DatapickerCurveWidget(QWidget* parent) : BaseDock(parent)
ui.lYErrorType->setToolTip(info);
ui.cbYErrorType->setToolTip(info);
updateLocale();
connect(ui.leName, &QLineEdit::textChanged, this, &DatapickerCurveWidget::nameChanged);
connect(ui.leComment, &QLineEdit::textChanged, this, &DatapickerCurveWidget::commentChanged);
connect(ui.cbXErrorType, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
......@@ -139,11 +141,6 @@ void DatapickerCurveWidget::setCurves(QList<DatapickerCurve*> list) {
m_curve = list.first();
m_aspect = list.first();
SET_NUMBER_LOCALE
ui.sbSize->setLocale(numberLocale);
ui.sbBorderWidth->setLocale(numberLocale);
ui.sbErrorBarSize->setLocale(numberLocale);
if (list.size() == 1) {
ui.lName->setEnabled(true);
ui.leName->setEnabled(true);
......@@ -188,6 +185,13 @@ void DatapickerCurveWidget::hideErrorBarWidgets(bool on) {
ui.lErrorBarSize->setVisible(!on);
}
void DatapickerCurveWidget::updateLocale() {
SET_NUMBER_LOCALE
ui.sbSize->setLocale(numberLocale);
ui.sbBorderWidth->setLocale(numberLocale);
ui.sbErrorBarSize->setLocale(numberLocale);
}
//*************************************************************
//**** SLOTs for changes triggered in DatapickerCurveWidget ***
//*************************************************************
......
......@@ -44,6 +44,7 @@ public:
void setCurves(QList<DatapickerCurve*>);
void load();
void updateLocale() override;
private:
Ui::DatapickerCurveWidget ui;
......
......@@ -211,6 +211,8 @@ DatapickerImageWidget::DatapickerImageWidget(QWidget* parent) : BaseDock(parent)
editTabLayout->addWidget(gvForeground, 10, 2);
gvForeground->setScalePixmap(valueFile);
updateLocale();
//SLOTS
//general
connect(ui.leName, &QLineEdit::textChanged, this, &DatapickerImageWidget::nameChanged);
......@@ -389,6 +391,19 @@ void DatapickerImageWidget::handleWidgetActions() {
}
}
void DatapickerImageWidget::updateLocale() {
SET_NUMBER_LOCALE
ui.sbRotation->setLocale(numberLocale);
ui.sbPositionX1->setLocale(numberLocale);
ui.sbPositionX2->setLocale(numberLocale);
ui.sbPositionX3->setLocale(numberLocale);
ui.sbPositionY1->setLocale(numberLocale);
ui.sbPositionY2->setLocale(numberLocale);
ui.sbPositionY3->setLocale(numberLocale);
ui.sbSymbolSize->setLocale(numberLocale);
ui.sbSymbolBorderWidth->setLocale(numberLocale);
}
//**********************************************************
//****** SLOTs for changes triggered in DatapickerImageWidget ********
//**********************************************************
......
......@@ -65,6 +65,7 @@ public:
void setImages(QList<DatapickerImage*>);
void load();
void updateLocale() override;
private:
Ui::DatapickerImageWidget ui;
......
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