Good deal of Code Cleanup for the maintab

Some cleanup was needed in the MainTab code for ages,
now the Edition / Cancel / Ok of the Notes tab is
way more intuitive on the code level.

This is needed to support multidive edition on the
Cylinders and Weigths too, since it's a bit more
complicated, I didn't want to start with a Spaguetti
Code.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-09-18 21:56:53 -03:00
parent 955c1c1fe5
commit bcefa4baff
3 changed files with 91 additions and 153 deletions

View file

@ -24,14 +24,14 @@
<item row="4" column="0" colspan="2">
<widget class="QLineEdit" name="coordinates">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
<item row="11" column="0" colspan="2">
<widget class="QTextEdit" name="notes">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
@ -45,28 +45,28 @@
<item row="6" column="0">
<widget class="QLineEdit" name="divemaster">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QLineEdit" name="suit">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLineEdit" name="buddy">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLineEdit" name="location">
<property name="readOnly">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
@ -126,30 +126,20 @@
</item>
</layout>
</item>
<item row="12" column="1">
<widget class="QPushButton" name="editReset">
<item row="3" column="0">
<widget class="QLabel" name="CoordinatedLabel">
<property name="text">
<string>Undo</string>
</property>
</widget>
</item>
<item row="12" column="0">
<widget class="QPushButton" name="editAccept">
<property name="text">
<string>Save</string>
</property>
<property name="checkable">
<bool>true</bool>
<string>Coordinates</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="KMessageWidget" name="diveNotesMessage" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="CoordinatedLabel">
<property name="text">
<string>Coordinates</string>
<item row="12" column="0" colspan="2">
<widget class="QDialogButtonBox" name="notesButtonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>