Notes tab: Use top RH for depth and duretion fields

Currently the top righthand part of the notes tab is used for
    showing and editing air teperature and water temperature. But
    these fields were moved over to the Information tab and are not
    required in the Notes tab any more. Rather use this space for the
    depth and duration data for manually-entered dives. Currently
    extra vertical space is created in the Notes tab for showing this
    field, resulting in inefficient use of screen space and
    inelegant layout. This code moves the Duration and Depth fields
    into the top righthand of the Notes tab.

Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
willemferguson 2019-11-11 12:52:01 +02:00 committed by Dirk Hohndel
parent 2fe1121b1c
commit 08db77333b
3 changed files with 84 additions and 100 deletions

View file

@ -77,20 +77,19 @@
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="2" column="3">
<widget class="QLabel" name="durationLabel">
<property name="text">
<string>Duration</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="dateLabel">
<property name="text">
<item row="0" column="0">
<widget class="QLabel" name="dateLabel">
<property name="text">
<string>Date</string>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
@ -99,28 +98,53 @@
<property name="text">
<string>Time</string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
</item>
<item row="0" column="2" colspan="2">
<widget class="QLabel" name="depthLabely">
<property name="text">
<string> </string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="airTempLabel">
<property name="text">
<string>Air temp.</string>
<widget class="QLabel" name="depthLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
<property name="text">
<string>Depth</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="waterTempLabel">
<property name="text">
<string>Water temp.</string>
<widget class="QLabel" name="durationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
<property name="text">
<string>Duration (h:mm)</string>
</property>
</widget>
</item>
@ -132,49 +156,61 @@
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QTimeEdit" name="timeEdit">
<widget class="QTimeEdit" name="timeEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="timeSpec">
<enum>Qt::UTC</enum>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QLabel" name="depthLabelx">
<property name="text">
<string> </string>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="airtemp">
<property name="readOnly">
<bool>false</bool>
<widget class="QLineEdit" name="depth">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="watertemp">
<property name="readOnly">
<bool>false</bool>
<widget class="QLineEdit" name="duration">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="depthLabel">
<property name="text">
<string>Depth</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="depth"/>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="duration"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">