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:
Dirk Hohndel 2014-06-10 11:45:20 -07:00
parent 6998dcdf6a
commit e6fe4760a0
2 changed files with 25 additions and 25 deletions

View file

@ -533,10 +533,10 @@ void MainTab::updateDiveInfo(int dive)
// now let's get some gas use statistics
QVector<QPair<QString, int> > gasUsed;
QString gasUsedString;
QPair<QString, int> topGases[8] = { };
QPair<QString, int> topGases[20] = { };
volume_t vol;
selectedDivesGasUsed(gasUsed);
for (int j = 0; j < 8; j++) {
for (int j = 0; j < 20; j++) {
if (gasUsed.isEmpty())
break;
QPair<QString, int> gasPair = gasUsed.last();

View file

@ -289,8 +289,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>100</width>
<height>30</height>
<width>668</width>
<height>658</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_5">
@ -369,8 +369,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>285</height>
<width>668</width>
<height>658</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_6">
@ -679,8 +679,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>337</width>
<height>157</height>
<width>668</width>
<height>658</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_7">
@ -785,7 +785,23 @@
</layout>
</widget>
</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">
<property name="title">
<string>Gas Consumption</string>
@ -804,22 +820,6 @@
</layout>
</widget>
</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>
<zorder>groupBox_8b</zorder>
<zorder>groupBox_4b</zorder>