From 7644083e4d6eec5999ac79534c0cd9559e0205d3 Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Date: Sun, 17 May 2015 15:54:26 -0300
Subject: [PATCH 05/10] Changes on the Locationinformation to handle Location
 Editing

added a few interface items to handle location editiing,
a combobox to show everything, and three buttons:
add, edit, delete.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
---
 qt-ui/locationInformation.ui | 99 +++++++++++++++++++++++++++++++++++---------
 1 file changed, 80 insertions(+), 19 deletions(-)

diff --git a/qt-ui/locationInformation.ui b/qt-ui/locationInformation.ui
index 5260885..38eb361 100644
--- a/qt-ui/locationInformation.ui
+++ b/qt-ui/locationInformation.ui
@@ -17,47 +17,106 @@
    <string>Dive Site</string>
   </property>
   <layout class="QGridLayout" name="gridLayout">
-   <item row="0" column="1">
-    <widget class="KMessageWidget" name="diveSiteMessage" native="true"/>
-   </item>
-   <item row="4" column="0">
-    <widget class="QLabel" name="label_4">
+   <property name="bottomMargin">
+    <number>12</number>
+   </property>
+   <property name="horizontalSpacing">
+    <number>2</number>
+   </property>
+   <property name="verticalSpacing">
+    <number>-1</number>
+   </property>
+   <item row="1" column="0">
+    <widget class="QLabel" name="label_5">
      <property name="text">
-      <string>Notes</string>
+      <string>Current Location</string>
      </property>
     </widget>
    </item>
-   <item row="2" column="1">
-    <widget class="QLineEdit" name="diveSiteCoordinates"/>
+   <item row="1" column="1">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <property name="spacing">
+      <number>1</number>
+     </property>
+     <item>
+      <widget class="QComboBox" name="currentLocation"/>
+     </item>
+     <item>
+      <widget class="QToolButton" name="addLocation">
+       <property name="text">
+        <string>...</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../subsurface.qrc">
+         <normaloff>:/plus</normaloff>:/plus</iconset>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QToolButton" name="editLocation">
+       <property name="text">
+        <string>...</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../subsurface.qrc">
+         <normaloff>:/edit</normaloff>:/edit</iconset>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QToolButton" name="removeLocation">
+       <property name="text">
+        <string>...</string>
+       </property>
+       <property name="icon">
+        <iconset resource="../subsurface.qrc">
+         <normaloff>:/trash</normaloff>:/trash</iconset>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
-   <item row="1" column="0">
+   <item row="2" column="0">
     <widget class="QLabel" name="label">
      <property name="text">
       <string>Name</string>
      </property>
     </widget>
    </item>
-   <item row="1" column="1">
+   <item row="2" column="1">
     <widget class="QLineEdit" name="diveSiteName"/>
    </item>
    <item row="3" column="0">
-    <widget class="QLabel" name="label_3">
+    <widget class="QLabel" name="label_2">
      <property name="text">
-      <string>Description</string>
+      <string>Coordinates</string>
      </property>
     </widget>
    </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="label_2">
+   <item row="3" column="1">
+    <widget class="QLineEdit" name="diveSiteCoordinates"/>
+   </item>
+   <item row="4" column="0">
+    <widget class="QLabel" name="label_3">
      <property name="text">
-      <string>Coordinates</string>
+      <string>Description</string>
      </property>
     </widget>
    </item>
-   <item row="3" column="1">
+   <item row="4" column="1">
     <widget class="QLineEdit" name="diveSiteDescription"/>
    </item>
    <item row="5" column="0">
+    <widget class="QLabel" name="label_4">
+     <property name="text">
+      <string>Notes</string>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="1" rowspan="2" colspan="2">
+    <widget class="QPlainTextEdit" name="diveSiteNotes"/>
+   </item>
+   <item row="6" column="0">
     <spacer name="verticalSpacer">
      <property name="orientation">
       <enum>Qt::Vertical</enum>
@@ -70,8 +129,8 @@
      </property>
     </spacer>
    </item>
-   <item row="4" column="1" rowspan="2">
-    <widget class="QPlainTextEdit" name="diveSiteNotes"/>
+   <item row="0" column="0" colspan="3">
+    <widget class="KMessageWidget" name="diveSiteMessage" native="true"/>
    </item>
   </layout>
  </widget>
@@ -83,6 +142,8 @@
    <container>1</container>
   </customwidget>
  </customwidgets>
- <resources/>
+ <resources>
+  <include location="../subsurface.qrc"/>
+ </resources>
  <connections/>
 </ui>
-- 
2.3.2 (Apple Git-55)

