mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 02:30:44 +00:00
Change height and weight decimals displayed, BMI digits displayed
This commit is contained in:
parent
acd078cc82
commit
7785d7fc9c
@ -432,7 +432,7 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
} else {
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setDecimals(1);
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
}
|
||||
|
||||
@ -835,7 +835,7 @@ void Daily::on_ReloadDay()
|
||||
ui->ouncesSpinBox->setSuffix(STR_UNIT_OUNCE);
|
||||
} else {
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setDecimals(1);
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
}
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
@ -1693,7 +1693,7 @@ void Daily::Load(QDate date)
|
||||
double kg=journal->settings[Journal_Weight].toDouble(&ok);
|
||||
|
||||
if (p_profile->general->unitSystem()==US_Metric) {
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setDecimals(1);
|
||||
ui->weightSpinBox->blockSignals(true);
|
||||
ui->weightSpinBox->setValue(kg);
|
||||
ui->weightSpinBox->blockSignals(false);
|
||||
@ -1783,7 +1783,7 @@ void Daily::UnitsChanged()
|
||||
} else {
|
||||
kg=(ui->weightSpinBox->value()*(ounce_convert*16.0))+(ui->ouncesSpinBox->value()*ounce_convert);
|
||||
kg/=1000.0;
|
||||
ui->weightSpinBox->setDecimals(3);
|
||||
ui->weightSpinBox->setDecimals(1);
|
||||
ui->weightSpinBox->setValue(kg);
|
||||
ui->ouncesSpinBox->setVisible(false);
|
||||
ui->weightSpinBox->setSuffix(STR_UNIT_KG);
|
||||
|
@ -1320,7 +1320,7 @@ QSlider::handle:horizontal {
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="digitCount">
|
||||
<number>5</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="segmentStyle">
|
||||
<enum>QLCDNumber::Flat</enum>
|
||||
|
@ -48,7 +48,7 @@ NewProfile::NewProfile(QWidget *parent, const QString *user) :
|
||||
on_cpapModeCombo_activated(0);
|
||||
m_passwordHashed = false;
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setDecimals(0);
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
|
||||
{
|
||||
@ -397,7 +397,7 @@ void NewProfile::edit(const QString name)
|
||||
} else { // good wholesome metric
|
||||
ui->heightEdit->setValue(v);
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setDecimals(0);
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
}
|
||||
}
|
||||
@ -417,7 +417,7 @@ void NewProfile::on_heightCombo_currentIndexChanged(int index)
|
||||
if (index == 0) {
|
||||
//metric
|
||||
ui->heightEdit2->setVisible(false);
|
||||
ui->heightEdit->setDecimals(2);
|
||||
ui->heightEdit->setDecimals(0);
|
||||
ui->heightEdit->setSuffix(STR_UNIT_CM);
|
||||
double v = ui->heightEdit->value() * 30.48;
|
||||
v += ui->heightEdit2->value() * 2.54;
|
||||
|
Loading…
Reference in New Issue
Block a user