From 07798bbf469530b10802a06b70f0607df4292113 Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Tue, 9 Jan 2024 10:53:49 +0100
Subject: [PATCH] Config: Disable meshing tools tab and add some self
 documentation for solver command line.

---
 src/View/Configure/Window.py            | 24 ++++++------
 src/View/ui/ConfigureAddSolverDialog.ui |  9 +++++
 src/View/ui/ConfigureDialog.ui          | 52 -------------------------
 3 files changed, 21 insertions(+), 64 deletions(-)

diff --git a/src/View/Configure/Window.py b/src/View/Configure/Window.py
index f380e868..14ba0442 100644
--- a/src/View/Configure/Window.py
+++ b/src/View/Configure/Window.py
@@ -119,9 +119,9 @@ class ConfigureWindow(PamhyrDialog):
         )
 
     def setup_data(self):
-        # Meshing_Tool
-        self.set_line_edit_text("lineEdit_meshing_tool",
-                                self._config.meshing_tool)
+        # # Meshing_Tool
+        # self.set_line_edit_text("lineEdit_meshing_tool",
+        #                         self._config.meshing_tool)
 
         # Const
         self.set_line_edit_text("lineEdit_segment", str(self._config.segment))
@@ -168,12 +168,12 @@ class ConfigureWindow(PamhyrDialog):
                     "lineEdit_backup_path", f[0]
                 )
             ),
-            "pushButton_meshing_tool": lambda: self.file_dialog(
-                select_file=True,
-                callback=lambda f: self.set_line_edit_text(
-                    "lineEdit_meshing_tool", f[0]
-                )
-            ),
+            # "pushButton_meshing_tool": lambda: self.file_dialog(
+            #     select_file=True,
+            #     callback=lambda f: self.set_line_edit_text(
+            #         "lineEdit_meshing_tool", f[0]
+            #     )
+            # ),
         }
 
         for button in buttons:
@@ -183,9 +183,9 @@ class ConfigureWindow(PamhyrDialog):
         # Solvers
         self._config.solvers = self.solver_table_model._data.copy()
 
-        # Meshing_Tool
-        self._config.meshing_tool = self.get_line_edit_text(
-            "lineEdit_meshing_tool")
+        # # Meshing_Tool
+        # self._config.meshing_tool = self.get_line_edit_text(
+        #     "lineEdit_meshing_tool")
 
         # Const
         self._config.segment = self.get_line_edit_text("lineEdit_segment")
diff --git a/src/View/ui/ConfigureAddSolverDialog.ui b/src/View/ui/ConfigureAddSolverDialog.ui
index c6219577..336f125d 100644
--- a/src/View/ui/ConfigureAddSolverDialog.ui
+++ b/src/View/ui/ConfigureAddSolverDialog.ui
@@ -13,6 +13,9 @@
   <property name="windowTitle">
    <string>Dialog</string>
   </property>
+  <property name="locale">
+   <locale language="English" country="Europe"/>
+  </property>
   <layout class="QGridLayout" name="gridLayout_3">
    <item row="0" column="0">
     <layout class="QVBoxLayout" name="verticalLayout">
@@ -103,6 +106,12 @@
        </item>
        <item row="0" column="2">
         <widget class="QLabel" name="label_8">
+         <property name="toolTip">
+          <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Command line format, for input formater (optional), solver execution and output formater (optional). This format can use some replacement values like:&lt;/p&gt;&lt;p&gt;- &lt;span style=&quot; font-style:italic;&quot;&gt;@install_dir&lt;/span&gt;: The Pamhyr2 install path&lt;/p&gt;&lt;p&gt;- &lt;span style=&quot; font-style:italic;&quot;&gt;@path&lt;/span&gt;: The associate path&lt;/p&gt;&lt;p&gt;- &lt;span style=&quot; font-style:italic;&quot;&gt;@input&lt;/span&gt;: Solver input data (depend of solver type)&lt;/p&gt;&lt;p&gt;-&lt;span style=&quot; font-style:italic;&quot;&gt; @output&lt;/span&gt;: Solver output data (depend of solver type)&lt;/p&gt;&lt;p&gt;- &lt;span style=&quot; font-style:italic;&quot;&gt;@dir&lt;/span&gt;: The working dir at solver execution&lt;/p&gt;&lt;p&gt;- &lt;span style=&quot; font-style:italic;&quot;&gt;@args&lt;/span&gt;: Solver arguments and additional arguments defined on solver parameters&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+         </property>
+         <property name="whatsThis">
+          <string/>
+         </property>
          <property name="text">
           <string>Command line</string>
          </property>
diff --git a/src/View/ui/ConfigureDialog.ui b/src/View/ui/ConfigureDialog.ui
index bbde334e..ca54d07d 100644
--- a/src/View/ui/ConfigureDialog.ui
+++ b/src/View/ui/ConfigureDialog.ui
@@ -113,58 +113,6 @@
          </item>
         </layout>
        </widget>
-       <widget class="QWidget" name="tab_mesh">
-        <property name="autoFillBackground">
-         <bool>false</bool>
-        </property>
-        <attribute name="title">
-         <string>Meshing tool</string>
-        </attribute>
-        <layout class="QGridLayout" name="gridLayout_3">
-         <item row="0" column="0">
-          <layout class="QVBoxLayout" name="verticalLayout_5">
-           <item>
-            <layout class="QHBoxLayout" name="horizontalLayout_7">
-             <item>
-              <widget class="QLabel" name="label_6">
-               <property name="text">
-                <string>Meshing tool path</string>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <widget class="QLineEdit" name="lineEdit_meshing_tool"/>
-             </item>
-             <item>
-              <widget class="QPushButton" name="pushButton_meshing_tool">
-               <property name="text">
-                <string/>
-               </property>
-               <property name="icon">
-                <iconset>
-                 <normaloff>ressources/open.png</normaloff>ressources/open.png</iconset>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <spacer name="verticalSpacer">
-             <property name="orientation">
-              <enum>Qt::Vertical</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>20</width>
-               <height>40</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-          </layout>
-         </item>
-        </layout>
-       </widget>
        <widget class="QWidget" name="tab_constant">
         <attribute name="title">
          <string>Constants</string>
-- 
GitLab