mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Merge branch 'master' of https://github.com/dje29/subsurface
This commit is contained in:
commit
08284275e7
31 changed files with 210 additions and 201 deletions
|
|
@ -400,12 +400,12 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
|
|||
|
||||
void PlannerSettingsWidget::updateUnitsUI()
|
||||
{
|
||||
ui.ascRate75->setValue(rint(prefs.ascrate75 / UNIT_FACTOR));
|
||||
ui.ascRate50->setValue(rint(prefs.ascrate50 / UNIT_FACTOR));
|
||||
ui.ascRateStops->setValue(rint(prefs.ascratestops / UNIT_FACTOR));
|
||||
ui.ascRateLast6m->setValue(rint(prefs.ascratelast6m / UNIT_FACTOR));
|
||||
ui.descRate->setValue(rint(prefs.descrate / UNIT_FACTOR));
|
||||
ui.bestmixEND->setValue(rint(get_depth_units(prefs.bestmixend.mm, NULL, NULL)));
|
||||
ui.ascRate75->setValue(lrint(prefs.ascrate75 / UNIT_FACTOR));
|
||||
ui.ascRate50->setValue(lrint(prefs.ascrate50 / UNIT_FACTOR));
|
||||
ui.ascRateStops->setValue(lrint(prefs.ascratestops / UNIT_FACTOR));
|
||||
ui.ascRateLast6m->setValue(lrint(prefs.ascratelast6m / UNIT_FACTOR));
|
||||
ui.descRate->setValue(lrint(prefs.descrate / UNIT_FACTOR));
|
||||
ui.bestmixEND->setValue(lrint(get_depth_units(prefs.bestmixend.mm, NULL, NULL)));
|
||||
}
|
||||
|
||||
PlannerSettingsWidget::~PlannerSettingsWidget()
|
||||
|
|
|
|||
|
|
@ -140,8 +140,8 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
|
|||
return;
|
||||
|
||||
GeoDataCoordinates here(lon, lat, unit);
|
||||
long lon_udeg = rint(1000000 * here.longitude(GeoDataCoordinates::Degree));
|
||||
long lat_udeg = rint(1000000 * here.latitude(GeoDataCoordinates::Degree));
|
||||
long lon_udeg = lrint(1000000 * here.longitude(GeoDataCoordinates::Degree));
|
||||
long lat_udeg = lrint(1000000 * here.latitude(GeoDataCoordinates::Degree));
|
||||
|
||||
// distance() is in km above the map.
|
||||
// We're going to use that to decide how
|
||||
|
|
@ -155,7 +155,7 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
|
|||
// Trigonometry is hard, but sin x == x
|
||||
// for small x, so let's just do this as
|
||||
// a linear thing.
|
||||
long resolve = rint(distance() * 1000);
|
||||
long resolve = lrint(distance() * 1000);
|
||||
|
||||
int idx;
|
||||
struct dive *dive;
|
||||
|
|
@ -347,8 +347,8 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U
|
|||
centerOn(lon, lat, true);
|
||||
|
||||
// change the location of the displayed_dive and put the UI in edit mode
|
||||
displayed_dive_site.latitude.udeg = lrint(lat * 1000000.0);
|
||||
displayed_dive_site.longitude.udeg = lrint(lon * 1000000.0);
|
||||
displayed_dive_site.latitude.udeg = llrint(lat * 1000000.0);
|
||||
displayed_dive_site.longitude.udeg = llrint(lon * 1000000.0);
|
||||
emit coordinatesChanged();
|
||||
repopulateLabels();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void PreferencesGraph::refreshSettings()
|
|||
ui->show_ccr_sensors->setChecked(prefs.show_ccr_sensors);
|
||||
ui->defaultSetpoint->setValue((double)prefs.defaultsetpoint / 1000.0);
|
||||
ui->psro2rate->setValue(prefs.o2consumption / 1000.0);
|
||||
ui->pscrfactor->setValue(rint(1000.0 / prefs.pscr_ratio));
|
||||
ui->pscrfactor->setValue(lrint(1000.0 / prefs.pscr_ratio));
|
||||
|
||||
ui->display_unused_tanks->setChecked(prefs.display_unused_tanks);
|
||||
ui->show_average_depth->setChecked(prefs.show_average_depth);
|
||||
|
|
@ -50,9 +50,9 @@ void PreferencesGraph::refreshSettings()
|
|||
void PreferencesGraph::syncSettings()
|
||||
{
|
||||
auto general = SettingsObjectWrapper::instance()->general_settings;
|
||||
general->setDefaultSetPoint(rint(ui->defaultSetpoint->value() * 1000.0));
|
||||
general->setO2Consumption(rint(ui->psro2rate->value() *1000.0));
|
||||
general->setPscrRatio(rint(1000.0 / ui->pscrfactor->value()));
|
||||
general->setDefaultSetPoint(lrint(ui->defaultSetpoint->value() * 1000.0));
|
||||
general->setO2Consumption(lrint(ui->psro2rate->value() *1000.0));
|
||||
general->setPscrRatio(lrint(1000.0 / ui->pscrfactor->value()));
|
||||
|
||||
auto pp_gas = SettingsObjectWrapper::instance()->pp_gas;
|
||||
pp_gas->setPheThreshold(ui->pheThreshold->value());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue