Skip to content

Commit

Permalink
FEM: add new pref for use of ccx standard path
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Sep 13, 2016
1 parent 0da41bb commit 2857951
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 36 deletions.
157 changes: 125 additions & 32 deletions src/Mod/Fem/Gui/DlgSettingsFemCcx.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>555</width>
<height>628</height>
<height>652</height>
</rect>
</property>
<property name="windowTitle">
Expand Down Expand Up @@ -39,8 +39,40 @@
</property>
<item>
<layout class="QGridLayout" name="gl_ccx">
<item row="0" column="2">
<widget class="Gui::PrefFileChooser" name="fc_ccx_binary" native="true">
<item row="5" column="2">
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>ExternalEditorPath</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/Ccx</cstring>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="l_ccx_binary_path">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>ccx binary path:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="Gui::PrefFileChooser" name="fc_ccx_binary_path" native="true">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -76,23 +108,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="l_ext_editor">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>External editor:</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="3" column="2">
<widget class="Gui::PrefCheckBox" name="cb_int_editor">
<property name="text">
<string>Use internal editor for .inp files</string>
Expand All @@ -108,36 +124,49 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="3" column="0">
<widget class="QLabel" name="l_editor">
<property name="text">
<string>Editor</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="Gui::PrefFileChooser" name="fc_ext_editor" native="true">
<item row="5" column="0">
<widget class="QLabel" name="l_ext_editor">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>External editor:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Gui::PrefCheckBox" name="cb_ccx_binary_std">
<property name="text">
<string>Use standard ccx binary path</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>ExternalEditorPath</cstring>
<cstring>UseStandardCcxLocation</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/Ccx</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="l_ccx_binary">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<widget class="QLabel" name="l_ccx_binary_std">
<property name="text">
<string>ccx binary</string>
<string>CalculiX binary</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -704,5 +733,69 @@
</hint>
</hints>
</connection>
<connection>
<sender>cb_ccx_binary_std</sender>
<signal>toggled(bool)</signal>
<receiver>l_ccx_binary_path</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>45</y>
</hint>
<hint type="destinationlabel">
<x>148</x>
<y>68</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_ccx_binary_std</sender>
<signal>toggled(bool)</signal>
<receiver>fc_ccx_binary_path</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>45</y>
</hint>
<hint type="destinationlabel">
<x>406</x>
<y>68</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_ccx_binary_std</sender>
<signal>toggled(bool)</signal>
<receiver>l_ccx_binary_path</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>45</y>
</hint>
<hint type="destinationlabel">
<x>148</x>
<y>68</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_ccx_binary_std</sender>
<signal>toggled(bool)</signal>
<receiver>fc_ccx_binary_path</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>406</x>
<y>45</y>
</hint>
<hint type="destinationlabel">
<x>406</x>
<y>68</y>
</hint>
</hints>
</connection>
</connections>
</ui>
9 changes: 6 additions & 3 deletions src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp
@@ -1,7 +1,8 @@
/***************************************************************************
* Copyright (c) 2015 FreeCAD Developers *
* Author: Przemo Firszt <przemo@firszt.eu> *
* Based on src/Mod/Raytracing/Gui/DlgSettingsRayImp.cpp *
* Author: Bernd Hahnebach <bernd@bimstatik.ch> *
* Based on src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp *
* *
* This file is part of the FreeCAD CAx development system. *
* *
Expand Down Expand Up @@ -66,7 +67,8 @@ void DlgSettingsFemCcxImp::saveSettings()

cb_int_editor->onSave();
fc_ext_editor->onSave();
fc_ccx_binary->onSave();
cb_ccx_binary_std->onSave();
fc_ccx_binary_path->onSave();
}

void DlgSettingsFemCcxImp::loadSettings()
Expand All @@ -88,7 +90,8 @@ void DlgSettingsFemCcxImp::loadSettings()

cb_int_editor->onRestore();
fc_ext_editor->onRestore();
fc_ccx_binary->onRestore();
cb_ccx_binary_std->onRestore();
fc_ccx_binary_path->onRestore();

ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Mod/Fem/Ccx");
Expand Down
3 changes: 2 additions & 1 deletion src/Mod/Fem/Gui/DlgSettingsFemCcxImp.h
@@ -1,7 +1,8 @@
/**************************************************************************
* Copyright (c) 2015 FreeCAD Developers *
* Author: Przemo Firszt <przemo@firszt.eu> *
* Based on src/Mod/Raytracing/Gui/DlgSettingsRayImp.h *
* Author: Bernd Hahnebach <bernd@bimstatik.ch> *
* Based on src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h *
* *
* This file is part of the FreeCAD CAx development system. *
* *
Expand Down

0 comments on commit 2857951

Please sign in to comment.