From 428f59b1223cd725ac2ae3d177cb0cd58bc09a5e Mon Sep 17 00:00:00 2001
From: Rafael <Syping@users.noreply.github.com>
Date: Tue, 12 Apr 2016 16:42:04 +0200
Subject: [PATCH] first sketch of OptionsDialog

---
 OptionsDialog.ui  | 170 ++++++++++++++++++++++++++++++++++++++++++++--
 UserInterface.cpp |  12 ++++
 UserInterface.h   |   1 +
 3 files changed, 178 insertions(+), 5 deletions(-)

diff --git a/OptionsDialog.ui b/OptionsDialog.ui
index ac637a4..c033f0f 100755
--- a/OptionsDialog.ui
+++ b/OptionsDialog.ui
@@ -6,18 +6,178 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>320</width>
-    <height>300</height>
+    <width>400</width>
+    <height>350</height>
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Options</string>
+   <string>gta5sync - Options</string>
   </property>
   <property name="modal">
    <bool>true</bool>
   </property>
-  <layout class="QVBoxLayout" name="vlOptions"/>
+  <layout class="QVBoxLayout" name="vlOptions">
+   <item>
+    <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
+     <widget class="QWidget" name="tabProfile">
+      <attribute name="title">
+       <string>Profile</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="vlProfile">
+       <item>
+        <widget class="QGroupBox" name="gbWidgets">
+         <property name="title">
+          <string>Content Open/Select Mode</string>
+         </property>
+         <layout class="QVBoxLayout" name="vlProfileContentMode">
+          <item>
+           <widget class="QRadioButton" name="rbOpenWithSC">
+            <property name="text">
+             <string>Open with Singleclick</string>
+            </property>
+            <property name="checked">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="rbOpenWithDC">
+            <property name="text">
+             <string>Open with Doubleclick</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QRadioButton" name="rbSelectWithSC">
+            <property name="text">
+             <string>Select with Singleclick</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="vsProfile">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tabLocalization">
+      <attribute name="title">
+       <string>Localization</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="vlLocalization">
+       <item>
+        <widget class="QGroupBox" name="gbLanguage">
+         <property name="title">
+          <string>Language</string>
+         </property>
+         <layout class="QVBoxLayout" name="vlLanguage">
+          <item>
+           <widget class="QComboBox" name="cbLanguage">
+            <item>
+             <property name="text">
+              <string>System</string>
+             </property>
+            </item>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+       <item>
+        <spacer name="vsInterface">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>0</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="tabSync">
+      <attribute name="title">
+       <string>Sync</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="vlSync">
+       <item>
+        <widget class="QLabel" name="labSync">
+         <property name="text">
+          <string>Sync is not implemented at current time</string>
+         </property>
+         <property name="alignment">
+          <set>Qt::AlignCenter</set>
+         </property>
+         <property name="wordWrap">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="hlButtons">
+     <item>
+      <spacer name="hsButtons">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>0</width>
+         <height>0</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cmdClose">
+       <property name="text">
+        <string>&amp;Close</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>cmdClose</sender>
+   <signal>clicked()</signal>
+   <receiver>OptionsDialog</receiver>
+   <slot>close()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>352</x>
+     <y>328</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>199</x>
+     <y>174</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
diff --git a/UserInterface.cpp b/UserInterface.cpp
index b0f61cb..4535659 100755
--- a/UserInterface.cpp
+++ b/UserInterface.cpp
@@ -20,6 +20,7 @@
 #include "ui_UserInterface.h"
 #include "ProfileInterface.h"
 #include "StandardPaths.h"
+#include "OptionsDialog.h"
 #include "AboutDialog.h"
 #include "IconLoader.h"
 #include "AppEnv.h"
@@ -238,3 +239,14 @@ void UserInterface::on_actionDelete_selected_triggered()
 {
     profileUI->deleteSelected();
 }
+
+void UserInterface::on_actionOptions_triggered()
+{
+    OptionsDialog *optionsDialog = new OptionsDialog(this);
+    optionsDialog->setWindowFlags(optionsDialog->windowFlags()^Qt::WindowContextHelpButtonHint);
+    optionsDialog->setModal(true);
+    optionsDialog->show();
+    optionsDialog->exec();
+    optionsDialog->deleteLater();
+    delete optionsDialog;
+}
diff --git a/UserInterface.h b/UserInterface.h
index da661e0..7d07ab0 100755
--- a/UserInterface.h
+++ b/UserInterface.h
@@ -52,6 +52,7 @@ private slots:
     void on_actionDeselect_all_triggered();
     void on_actionExport_selected_triggered();
     void on_actionDelete_selected_triggered();
+    void on_actionOptions_triggered();
 
 private:
     ProfileDatabase *profileDB;