Compare commits
6 Commits
bstoeger-t
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b126fccb1b | ||
|
|
10fc3bfd47 | ||
|
|
a8c9781205 | ||
|
|
291ed9d7e3 | ||
|
|
a39f0e2891 | ||
|
|
d9f50bb8e0 |
@ -135,7 +135,7 @@ msgid ""
|
||||
"mailto:subsurface@subsurface-divelog.org[our mailing list] and report bugs "
|
||||
"at https://github.com/Subsurface/subsurface/issues[our bugtracker]. "
|
||||
"For instructions on how to build the software and (if needed) its "
|
||||
"dependencies please consult the INSTALL file included with the source code."
|
||||
"dependencies please consult the INSTALL.md file included with the source code."
|
||||
msgstr ""
|
||||
|
||||
#. type: Plain text
|
||||
|
||||
@ -175,7 +175,7 @@ msgid ""
|
||||
"an email to mailto:subsurface@subsurface-divelog.org[our mailing list] and "
|
||||
"report bugs at https://github.com/Subsurface-divelog/subsurface/issues[our "
|
||||
"bugtracker]. For instructions on how to build the software and (if needed) "
|
||||
"its dependencies please consult the INSTALL file included with the source "
|
||||
"its dependencies please consult the INSTALL.md file included with the source "
|
||||
"code."
|
||||
msgstr ""
|
||||
"Ce manuel explique comment utiliser le programme _Subsurface_. Pour "
|
||||
@ -184,7 +184,7 @@ msgstr ""
|
||||
"pouvez envoyer un e-mail sur mailto:subsurface@subsurface-divelog.org[notre "
|
||||
"liste de diffusion] et rapportez les bogues sur http://trac.hohndel."
|
||||
"org[notre bugtracker]. Pour des instructions de compilation du logiciel et "
|
||||
"(si besoin) de ses dépendances, merci de consulter le fichier INSTALL inclus "
|
||||
"(si besoin) de ses dépendances, merci de consulter le fichier INSTALL.md inclus "
|
||||
"dans les sources logicielles."
|
||||
|
||||
#. type: Plain text
|
||||
|
||||
@ -460,7 +460,7 @@ the software, consult the <em>Downloads</em> page on the
|
||||
Please discuss issues with this program by sending an email to
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">our mailing list</a> and report bugs at
|
||||
<a href="https://github.com/Subsurface/subsurface/issues">our bugtracker</a>. For instructions on how to build the
|
||||
software and (if needed) its dependencies please consult the INSTALL file
|
||||
software and (if needed) its dependencies please consult the INSTALL.md file
|
||||
included with the source code.</p></div>
|
||||
<div class="paragraph"><p><strong>Audience</strong>: Recreational Scuba Divers, Free Divers, Tec Divers, Professional
|
||||
Divers</p></div>
|
||||
|
||||
@ -34,7 +34,7 @@ https://subsurface-divelog.org/[_Subsurface_ web site].
|
||||
Please discuss issues with this program by sending an email to
|
||||
mailto:subsurface@subsurface-divelog.org[our mailing list] and report bugs at
|
||||
https://github.com/Subsurface/subsurface/issues[our bugtracker]. For instructions on how to build the
|
||||
software and (if needed) its dependencies please consult the INSTALL file
|
||||
software and (if needed) its dependencies please consult the INSTALL.md file
|
||||
included with the source code.
|
||||
|
||||
*Audience*: Recreational Scuba Divers, Free Divers, Tec Divers, Professional
|
||||
|
||||
@ -517,7 +517,7 @@ web</a>. Por favor, comenta los problemas que tengas con este programa enviando
|
||||
mail a <a href="mailto:subsurface@subsurface-divelog.org">nuestra lista de correo</a> e informa de
|
||||
fallos en <a href="https://github.com/Subsurface/subsurface/issues">nuestro bugtracker</a>.
|
||||
Para instrucciones acerca de como compilar el software y (en caso necesario)
|
||||
sus dependencias, por favor, consulta el archivo INSTALL incluido con el código
|
||||
sus dependencias, por favor, consulta el archivo INSTALL.md incluido con el código
|
||||
fuente.</p></div>
|
||||
<div class="paragraph"><p><strong>Audiencia</strong>: Buceadores recreativos, Buceadores en apnea, Buceadores técnicos,
|
||||
Buceadores profesionales.</p></div>
|
||||
|
||||
@ -61,7 +61,7 @@ web]. Por favor, comenta los problemas que tengas con este programa enviando un
|
||||
mail a mailto:subsurface@subsurface-divelog.org[nuestra lista de correo] e informa de
|
||||
fallos en https://github.com/Subsurface/subsurface/issues[nuestro bugtracker].
|
||||
Para instrucciones acerca de como compilar el software y (en caso necesario)
|
||||
sus dependencias, por favor, consulta el archivo INSTALL incluido con el código
|
||||
sus dependencias, por favor, consulta el archivo INSTALL.md incluido con el código
|
||||
fuente.
|
||||
|
||||
*Audiencia*: Buceadores recreativos, Buceadores en apnea, Buceadores técnicos,
|
||||
|
||||
@ -526,7 +526,7 @@ problème, vous pouvez envoyer un e-mail sur
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">notre liste de diffusion</a> et
|
||||
rapportez les bogues sur <a href="http://trac.hohndel.org">notre bugtracker</a>. Pour
|
||||
des instructions de compilation du logiciel et (si besoin) de ses
|
||||
dépendances, merci de consulter le fichier INSTALL inclus dans les sources
|
||||
dépendances, merci de consulter le fichier INSTALL.md inclus dans les sources
|
||||
logicielles.</p></div>
|
||||
<div class="paragraph"><p><strong>Public</strong> : Plongeurs loisirs, apnéistes, plongeurs Tek et plongeurs
|
||||
professionnels</p></div>
|
||||
|
||||
@ -61,7 +61,7 @@ problème, vous pouvez envoyer un e-mail sur
|
||||
mailto:subsurface@subsurface-divelog.org[notre liste de diffusion] et
|
||||
rapportez les bogues sur http://trac.hohndel.org[notre bugtracker]. Pour
|
||||
des instructions de compilation du logiciel et (si besoin) de ses
|
||||
dépendances, merci de consulter le fichier INSTALL inclus dans les sources
|
||||
dépendances, merci de consulter le fichier INSTALL.md inclus dans les sources
|
||||
logicielles.
|
||||
|
||||
*Public* : Plongeurs loisirs, apnéistes, plongeurs Tek et plongeurs
|
||||
|
||||
@ -516,7 +516,7 @@ het programma kunnen bij de ontwikkelaars gemeld worden via email op
|
||||
<a href="mailto:subsurface@subsurface-divelog.org">onze mailinglijst</a>. Fouten kunnen
|
||||
ook gemeld worden op <a href="https://github.com/Subsurface/subsurface/issues">onze bugtracker</a>.
|
||||
Instructies hoe <em>Subsurface</em> zelf te compileren vanuit de broncode staan ook op
|
||||
onze website en in het INSTALL bestand in de broncode.</p></div>
|
||||
onze website en in het INSTALL.md bestand in de broncode.</p></div>
|
||||
<div class="paragraph"><p><strong>Doelgroep</strong>: Recreatieve duikers, Tec duikers, Apneu duikers,
|
||||
Professionele duikers.</p></div>
|
||||
<div id="toc">
|
||||
|
||||
@ -59,7 +59,7 @@ het programma kunnen bij de ontwikkelaars gemeld worden via email op
|
||||
mailto:subsurface@subsurface-divelog.org[onze mailinglijst]. Fouten kunnen
|
||||
ook gemeld worden op https://github.com/Subsurface/subsurface/issues[onze bugtracker].
|
||||
Instructies hoe _Subsurface_ zelf te compileren vanuit de broncode staan ook op
|
||||
onze website en in het INSTALL bestand in de broncode.
|
||||
onze website en in het INSTALL.md bestand in de broncode.
|
||||
|
||||
*Doelgroep*: Recreatieve duikers, Tec duikers, Apneu duikers,
|
||||
Professionele duikers.
|
||||
|
||||
23
README.md
23
README.md
@ -21,16 +21,9 @@ Report bugs and issues at https://github.com/Subsurface/subsurface/issues
|
||||
|
||||
License: GPLv2
|
||||
|
||||
We frequently make new test versions of Subsurface available at
|
||||
http://subsurface-divelog.org/downloads/test/ and there you can always get
|
||||
the latest builds for Mac, Windows, Linux AppImage and Android (with some
|
||||
caveats about installability). Additionally, those same versions are
|
||||
We are releasing 'nightly' builds of Subsurface that are built from the latest version of the code. Versions of this build for Windows, macOS, Android (requiring sideloading), and a Linux AppImage can be downloaded from the [Latest Dev Release](https://www.subsurface-divelog.org/latest-release/) page on [our website](https://www.subsurface-divelog.org/). Alternatively, they can be downloaded [directly from GitHub](https://github.com/subsurface/nightly-builds/releases). Additionally, those same versions are
|
||||
posted to the Subsurface-daily repos on Ubuntu Launchpad, Fedora COPR, and
|
||||
OpenSUSE OBS.
|
||||
|
||||
These tend to contain the latest bug fixes and features, but also
|
||||
occasionally the latest bugs and issues. Please understand when using them
|
||||
that these are primarily intended for testing.
|
||||
OpenSUSE OBS, and released to [Snapcraft](https://snapcraft.io/subsurface) into the 'edge' channel of subsurface.
|
||||
|
||||
You can get the sources to the latest development version from the git
|
||||
repository:
|
||||
@ -42,17 +35,11 @@ git clone https://github.com/Subsurface/subsurface.git
|
||||
You can also fork the repository and browse the sources at the same site,
|
||||
simply using https://github.com/Subsurface/subsurface
|
||||
|
||||
If you want the latest release (instead of the bleeding edge
|
||||
development version) you can either get this via git or the release tar
|
||||
ball. After cloning run the following command:
|
||||
Additionally, artifacts for Windows, macOS, Android, Linux AppImage, and iOS (simulator build) are generated for all open pull requests and linked in pull request comments. Use these if you want to test the changes in a specific pull request and provide feedback before it has been merged.
|
||||
|
||||
```
|
||||
git checkout v5.0.10 (or whatever the last release is)
|
||||
```
|
||||
If you want a more stable version that is a little bit more tested you can get this from the [Curent Release](https://www.subsurface-divelog.org/current-release/) page on [our website](https://www.subsurface-divelog.org/).
|
||||
|
||||
or download a tarball from http://subsurface-divelog.org/downloads/Subsurface-5.0.10.tgz
|
||||
|
||||
Detailed build instructions can be found in the INSTALL file.
|
||||
Detailed build instructions can be found in the [INSTALL.md](/INSTALL.md) file.
|
||||
|
||||
## System Requirements
|
||||
|
||||
|
||||
@ -1319,8 +1319,7 @@ EditCylinder::EditCylinder(int index, cylinder_t cylIn, EditCylinderType typeIn,
|
||||
void EditCylinder::redo()
|
||||
{
|
||||
for (size_t i = 0; i < dives.size(); ++i) {
|
||||
set_tank_info_size(&tank_info_table, cyl[i].type.description, cyl[i].type.size);
|
||||
set_tank_info_workingpressure(&tank_info_table, cyl[i].type.description, cyl[i].type.workingpressure);
|
||||
set_tank_info_data(&tank_info_table, cyl[i].type.description, cyl[i].type.size, cyl[i].type.workingpressure);
|
||||
std::swap(*get_cylinder(dives[i], indexes[i]), cyl[i]);
|
||||
update_cylinder_related_info(dives[i]);
|
||||
emit diveListNotifier.cylinderEdited(dives[i], indexes[i]);
|
||||
|
||||
@ -109,7 +109,7 @@ void add_tank_info_imperial(struct tank_info_table *table, const char *name, int
|
||||
add_to_tank_info_table(table, table->nr, info);
|
||||
}
|
||||
|
||||
extern struct tank_info *get_tank_info(struct tank_info_table *table, const char *name)
|
||||
static struct tank_info *get_tank_info(struct tank_info_table *table, const char *name)
|
||||
{
|
||||
for (int i = 0; i < table->nr; ++i) {
|
||||
if (same_string(table->infos[i].name, name))
|
||||
@ -118,34 +118,41 @@ extern struct tank_info *get_tank_info(struct tank_info_table *table, const char
|
||||
return NULL;
|
||||
}
|
||||
|
||||
extern void set_tank_info_size(struct tank_info_table *table, const char *name, volume_t size)
|
||||
extern void set_tank_info_data(struct tank_info_table *table, const char *name, volume_t size, pressure_t working_pressure)
|
||||
{
|
||||
struct tank_info *info = get_tank_info(table, name);
|
||||
if (info) {
|
||||
// Try to be smart about metric vs. imperial
|
||||
if (info->cuft == 0 && info->psi == 0)
|
||||
if (info->ml != 0 || info->bar != 0) {
|
||||
info->bar = working_pressure.mbar / 1000;
|
||||
info->ml = size.mliter;
|
||||
else
|
||||
info->cuft = lrint(ml_to_cuft(size.mliter));
|
||||
} else {
|
||||
info->psi = lrint(to_PSI(working_pressure));
|
||||
info->cuft = lrint(ml_to_cuft(size.mliter) * mbar_to_atm(working_pressure.mbar));
|
||||
}
|
||||
} else {
|
||||
// By default add metric...?
|
||||
add_tank_info_metric(table, name, size.mliter, 0);
|
||||
// Metric is a better choice as the volume is independent of the working pressure
|
||||
add_tank_info_metric(table, name, size.mliter, working_pressure.mbar / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
extern void set_tank_info_workingpressure(struct tank_info_table *table, const char *name, pressure_t working_pressure)
|
||||
extern void extract_tank_info(const struct tank_info *info, volume_t *size, pressure_t *working_pressure)
|
||||
{
|
||||
working_pressure->mbar = info->bar != 0 ? info->bar * 1000 : psi_to_mbar(info->psi);
|
||||
if (info->ml != 0)
|
||||
size->mliter = info->ml;
|
||||
else if (working_pressure->mbar != 0)
|
||||
size->mliter = lrint(cuft_to_l(info->cuft) * 1000 / mbar_to_atm(working_pressure->mbar));
|
||||
}
|
||||
|
||||
extern bool get_tank_info_data(struct tank_info_table *table, const char *name, volume_t *size, pressure_t *working_pressure)
|
||||
{
|
||||
struct tank_info *info = get_tank_info(table, name);
|
||||
if (info) {
|
||||
// Try to be smart about metric vs. imperial
|
||||
if (info->cuft == 0 && info->psi == 0)
|
||||
info->bar = working_pressure.mbar / 1000;
|
||||
else
|
||||
info->psi = lrint(mbar_to_PSI(working_pressure.mbar));
|
||||
} else {
|
||||
// By default add metric...?
|
||||
add_tank_info_metric(table, name, 0, working_pressure.mbar / 1000);
|
||||
extract_tank_info(info, size, working_pressure);
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* placeholders for a few functions that we need to redesign for the Qt UI */
|
||||
|
||||
@ -126,9 +126,9 @@ extern void reset_tank_info_table(struct tank_info_table *table);
|
||||
extern void clear_tank_info_table(struct tank_info_table *table);
|
||||
extern void add_tank_info_metric(struct tank_info_table *table, const char *name, int ml, int bar);
|
||||
extern void add_tank_info_imperial(struct tank_info_table *table, const char *name, int cuft, int psi);
|
||||
extern void set_tank_info_size(struct tank_info_table *table, const char *name, volume_t size);
|
||||
extern void set_tank_info_workingpressure(struct tank_info_table *table, const char *name, pressure_t working_pressure);
|
||||
extern struct tank_info *get_tank_info(struct tank_info_table *table, const char *name);
|
||||
extern void extract_tank_info(const struct tank_info *info, volume_t *size, pressure_t *working_pressure);
|
||||
extern bool get_tank_info_data(struct tank_info_table *table, const char *name, volume_t *size, pressure_t *pressure);
|
||||
extern void set_tank_info_data(struct tank_info_table *table, const char *name, volume_t size, pressure_t working_pressure);
|
||||
|
||||
struct ws_info_t {
|
||||
const char *name;
|
||||
|
||||
11
core/trip.c
11
core/trip.c
@ -153,17 +153,6 @@ dive_trip_t *create_trip_from_dive(struct dive *dive)
|
||||
return trip;
|
||||
}
|
||||
|
||||
dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive, struct trip_table *trip_table_arg)
|
||||
{
|
||||
dive_trip_t *dive_trip;
|
||||
|
||||
dive_trip = create_trip_from_dive(dive);
|
||||
|
||||
add_dive_to_trip(dive, dive_trip);
|
||||
insert_trip(dive_trip, trip_table_arg);
|
||||
return dive_trip;
|
||||
}
|
||||
|
||||
/* random threshold: three days without diving -> new trip
|
||||
* this works very well for people who usually dive as part of a trip and don't
|
||||
* regularly dive at a local facility; this is why trips are an optional feature */
|
||||
|
||||
@ -43,7 +43,6 @@ extern void sort_trip_table(struct trip_table *table);
|
||||
|
||||
extern dive_trip_t *alloc_trip(void);
|
||||
extern dive_trip_t *create_trip_from_dive(struct dive *dive);
|
||||
extern dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive, struct trip_table *trip_table_arg);
|
||||
extern dive_trip_t *get_dives_to_autogroup(struct dive_table *table, int start, int *from, int *to, bool *allocated);
|
||||
extern dive_trip_t *get_trip_for_new_dive(struct dive *new_dive, bool *allocated);
|
||||
extern dive_trip_t *get_trip_by_uniq_id(int tripId);
|
||||
|
||||
@ -185,13 +185,12 @@ void DivePlannerWidget::heightChanged(const int height)
|
||||
|
||||
void DivePlannerWidget::waterTypeUpdateTexts()
|
||||
{
|
||||
double density;
|
||||
/* Do not set text in last/custom element */
|
||||
for (int i = 0; i < ui.waterType->count()-1; i++) {
|
||||
if (ui.waterType->itemData(i) != QVariant::Invalid) {
|
||||
QString densityText = ui.waterType->itemText(i).split("(")[0].trimmed();
|
||||
density = ui.waterType->itemData(i).toInt() / 10000.0;
|
||||
densityText.append(QString(" (%L1%2)").arg(density, 0, 'f', 2).arg(tr("kg/ℓ")));
|
||||
double density = ui.waterType->itemData(i).toInt() / 10000.0;
|
||||
densityText.append(QStringLiteral(" (%L1%2)").arg(density, 0, 'f', 3).arg(tr("kg/ℓ")));
|
||||
ui.waterType->setItemText(i, densityText);
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>90</width>
|
||||
<width>100</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -232,6 +232,9 @@
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<double>3</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="4">
|
||||
|
||||
@ -218,18 +218,13 @@ void TankInfoDelegate::setModelData(QWidget *, QAbstractItemModel *model, const
|
||||
mymodel->setData(IDX(CylindersModel::TYPE), cylinderName, CylindersModel::TEMP_ROLE);
|
||||
return;
|
||||
}
|
||||
int tankSize = 0;
|
||||
int tankPressure = 0;
|
||||
tank_info *info = get_tank_info(&tank_info_table, qPrintable(cylinderName));
|
||||
if (info) {
|
||||
// OMG, the units here are a mess.
|
||||
tankSize = info->ml != 0 ? info->ml : lrint(cuft_to_l(info->cuft) * 1000.0);
|
||||
tankPressure = info->bar != 0 ? info->bar * 1000 : psi_to_mbar(info->psi);
|
||||
}
|
||||
|
||||
volume_t tankSize = {0};
|
||||
pressure_t tankPressure = {0};
|
||||
get_tank_info_data(&tank_info_table, qPrintable(cylinderName), &tankSize, &tankPressure);
|
||||
mymodel->setData(IDX(CylindersModel::TYPE), cylinderName, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::WORKINGPRESS), tankPressure, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::SIZE), tankSize, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::WORKINGPRESS), tankPressure.mbar, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::SIZE), tankSize.mliter, CylindersModel::TEMP_ROLE);
|
||||
}
|
||||
|
||||
static QAbstractItemModel *createTankInfoModel(QWidget *parent)
|
||||
|
||||
@ -224,11 +224,8 @@ void TabDiveInformation::updateData(const std::vector<dive *> &, dive *currentDi
|
||||
setIndexNoSignal(ui->atmPressType, 0); // Set the atmospheric pressure combo box to mbar
|
||||
salinity_value = get_dive_salinity(currentDive);
|
||||
if (salinity_value) { // Set water type indicator (EN13319 = 1.020 g/l)
|
||||
if (ui->waterTypeCombo->isVisible()) { // If water salinity is editable then set correct water type in combobox:
|
||||
setIndexNoSignal(ui->waterTypeCombo, updateSalinityComboIndex(salinity_value));
|
||||
} else { // If water salinity is not editable: show water type as a text label
|
||||
ui->waterTypeText->setText(get_water_type_string(salinity_value));
|
||||
}
|
||||
setIndexNoSignal(ui->waterTypeCombo, updateSalinityComboIndex(salinity_value));
|
||||
ui->waterTypeText->setText(get_water_type_string(salinity_value));
|
||||
ui->salinityText->setText(get_salinity_string(salinity_value));
|
||||
} else {
|
||||
setIndexNoSignal(ui->waterTypeCombo, -1);
|
||||
@ -349,6 +346,7 @@ void TabDiveInformation::divesChanged(const QVector<dive *> &dives, DiveField fi
|
||||
else
|
||||
salinity_value = currentDive->salinity;
|
||||
setIndexNoSignal(ui->waterTypeCombo, updateSalinityComboIndex(salinity_value));
|
||||
ui->waterTypeText->setText(get_water_type_string(salinity_value));
|
||||
ui->salinityText->setText(QString("%L1g/ℓ").arg(salinity_value / 10.0));
|
||||
}
|
||||
|
||||
|
||||
@ -399,8 +399,6 @@ Kirigami.Page {
|
||||
delegate: Flickable {
|
||||
id: internalScrollView
|
||||
width: diveDetailsListView.width
|
||||
height: diveDetailsListView.height
|
||||
contentHeight: diveDetails.height
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
property var modelData: model
|
||||
DiveDetailsView {
|
||||
@ -413,7 +411,7 @@ Kirigami.Page {
|
||||
ScrollIndicator.horizontal: ScrollIndicator { }
|
||||
Connections {
|
||||
target: swipeModel
|
||||
onCurrentDiveChanged: {
|
||||
function onCurrentDiveChanged(index) {
|
||||
currentIndex = index.row
|
||||
diveDetailsListView.positionViewAtIndex(currentIndex, ListView.End)
|
||||
}
|
||||
@ -425,7 +423,6 @@ Kirigami.Page {
|
||||
anchors.fill: parent
|
||||
leftMargin: Kirigami.Units.smallSpacing
|
||||
rightMargin: Kirigami.Units.smallSpacing
|
||||
contentHeight: detailsEdit.height
|
||||
// start invisible and scaled down, to get the transition
|
||||
// off to the right start
|
||||
visible: false
|
||||
|
||||
@ -19,7 +19,7 @@ Item {
|
||||
|
||||
Connections {
|
||||
target: rootItem
|
||||
onSettingsChanged: {
|
||||
function onSettingsChanged() {
|
||||
qmlProfile.update()
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,10 +32,10 @@ Kirigami.ScrollablePage {
|
||||
}
|
||||
Connections {
|
||||
target: Backend
|
||||
onLengthChanged: {
|
||||
function onLengthChanged() {
|
||||
reload()
|
||||
}
|
||||
onVolumeChanged: {
|
||||
function onVolumeChanged() {
|
||||
reload()
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ Kirigami.Page {
|
||||
|
||||
Connections {
|
||||
target: manager
|
||||
onRestartDownloadSignal: {
|
||||
function onRestartDownloadSignal() {
|
||||
buttonBar.doDownload()
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,14 +111,14 @@ TemplatePage {
|
||||
}
|
||||
Connections {
|
||||
target: manager
|
||||
onUploadFinish: {
|
||||
function onUploadFinish(success, text) {
|
||||
if (success) {
|
||||
pageStack.pop()
|
||||
}
|
||||
statusText.text = text
|
||||
progress.value = 0
|
||||
}
|
||||
onUploadProgress: {
|
||||
function onUploadProgress(percentage) {
|
||||
progress.value = percentage
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,9 @@ Kirigami.Page {
|
||||
model: statsManager.var1List
|
||||
currentIndex: statsManager.var1Index
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var1Changed(currentIndex)
|
||||
if (currentIndex != statsManager.var1Index) {
|
||||
statsManager.var1Changed(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -127,7 +129,9 @@ Kirigami.Page {
|
||||
model: statsManager.binner1List
|
||||
currentIndex: statsManager.binner1Index
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var1BinnerChanged(currentIndex)
|
||||
if (currentIndex != statsManager.binner1Index) {
|
||||
statsManager.var1BinnerChanged(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -145,7 +149,9 @@ Kirigami.Page {
|
||||
currentIndex: statsManager.var2Index
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var2Changed(currentIndex)
|
||||
if (currentIndex != statsManager.var2Index) {
|
||||
statsManager.var2Changed(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,7 +169,9 @@ Kirigami.Page {
|
||||
currentIndex: statsManager.binner2Index
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var2BinnerChanged(currentIndex)
|
||||
if (currentIndex != statsManager.binner2Index) {
|
||||
statsManager.var2BinnerChanged(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -181,7 +189,9 @@ Kirigami.Page {
|
||||
currentIndex: statsManager.operation2Index
|
||||
Layout.fillWidth: false
|
||||
onCurrentIndexChanged: {
|
||||
statsManager.var2OperationChanged(currentIndex)
|
||||
if (currentIndex != statsManager.operation2Index) {
|
||||
statsManager.var2OperationChanged(currentIndex)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ debuild -S -d
|
||||
# create builds for the newer Ubuntu releases that Launchpad supports
|
||||
#
|
||||
rel=focal
|
||||
others="jammy mantic"
|
||||
others="jammy mantic noble"
|
||||
for next in $others
|
||||
do
|
||||
sed -i "s/${rel}/${next}/g" debian/changelog
|
||||
|
||||
@ -13,17 +13,15 @@ QVariant TankInfoModel::data(const QModelIndex &index, int role) const
|
||||
return defaultModelFont();
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
const struct tank_info &info = tank_info_table.infos[index.row()];
|
||||
int ml = info.ml;
|
||||
double bar = (info.psi) ? psi_to_bar(info.psi) : info.bar;
|
||||
|
||||
if (info.cuft && info.psi)
|
||||
ml = lrint(cuft_to_l(info.cuft) * 1000 / bar_to_atm(bar));
|
||||
volume_t size = {0};
|
||||
pressure_t pressure = {0};
|
||||
extract_tank_info(&info, &size, &pressure);
|
||||
|
||||
switch (index.column()) {
|
||||
case BAR:
|
||||
return bar * 1000;
|
||||
return pressure.mbar;
|
||||
case ML:
|
||||
return ml;
|
||||
return size.mliter;
|
||||
case DESCRIPTION:
|
||||
return info.name;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user