mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Improve statistic on used gas
This raises the maximum number of gas mixes listed to 20 and also changes the layout / design of the stats tab to make it much more attractive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6998dcdf6a
commit
e6fe4760a0
2 changed files with 25 additions and 25 deletions
|
@ -533,10 +533,10 @@ void MainTab::updateDiveInfo(int dive)
|
||||||
// now let's get some gas use statistics
|
// now let's get some gas use statistics
|
||||||
QVector<QPair<QString, int> > gasUsed;
|
QVector<QPair<QString, int> > gasUsed;
|
||||||
QString gasUsedString;
|
QString gasUsedString;
|
||||||
QPair<QString, int> topGases[8] = { };
|
QPair<QString, int> topGases[20] = { };
|
||||||
volume_t vol;
|
volume_t vol;
|
||||||
selectedDivesGasUsed(gasUsed);
|
selectedDivesGasUsed(gasUsed);
|
||||||
for (int j = 0; j < 8; j++) {
|
for (int j = 0; j < 20; j++) {
|
||||||
if (gasUsed.isEmpty())
|
if (gasUsed.isEmpty())
|
||||||
break;
|
break;
|
||||||
QPair<QString, int> gasPair = gasUsed.last();
|
QPair<QString, int> gasPair = gasUsed.last();
|
||||||
|
|
|
@ -289,8 +289,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>100</width>
|
<width>668</width>
|
||||||
<height>30</height>
|
<height>658</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
@ -369,8 +369,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>387</width>
|
<width>668</width>
|
||||||
<height>285</height>
|
<height>658</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
|
@ -679,8 +679,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>337</width>
|
<width>668</width>
|
||||||
<height>157</height>
|
<height>658</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
<layout class="QGridLayout" name="gridLayout_7">
|
||||||
|
@ -785,7 +785,23 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="4" column="2">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" rowspan="3">
|
||||||
<widget class="QGroupBox" name="groupBox_13">
|
<widget class="QGroupBox" name="groupBox_13">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Gas Consumption</string>
|
<string>Gas Consumption</string>
|
||||||
|
@ -804,22 +820,6 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
<zorder>groupBox_8b</zorder>
|
<zorder>groupBox_8b</zorder>
|
||||||
<zorder>groupBox_4b</zorder>
|
<zorder>groupBox_4b</zorder>
|
||||||
|
|
Loading…
Reference in a new issue