Skip to content

Commit

Permalink
FEM: prefs, move material prefs from general tab into an own tab in FEM
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and yorikvanhavre committed Jun 5, 2018
1 parent 71a2773 commit 7c316ba
Show file tree
Hide file tree
Showing 8 changed files with 297 additions and 190 deletions.
2 changes: 2 additions & 0 deletions src/Mod/Fem/Gui/AppFemGui.cpp
Expand Up @@ -39,6 +39,7 @@
#include "DlgSettingsFemGeneralImp.h"
#include "DlgSettingsFemGmshImp.h"
#include "DlgSettingsFemInOutVtkImp.h"
#include "DlgSettingsFemMaterialImp.h"
#include "DlgSettingsFemZ88Imp.h"
#include "ViewProviderFemMesh.h"
#include "ViewProviderFemMeshShape.h"
Expand Down Expand Up @@ -164,6 +165,7 @@ PyMOD_INIT_FUNC(FemGui)
new Gui::PrefPageProducer<FemGui::DlgSettingsFemCcxImp> (QT_TRANSLATE_NOOP("QObject","FEM"));
new Gui::PrefPageProducer<FemGui::DlgSettingsFemElmerImp> (QT_TRANSLATE_NOOP("QObject","FEM"));
new Gui::PrefPageProducer<FemGui::DlgSettingsFemZ88Imp> (QT_TRANSLATE_NOOP("QObject","FEM"));
new Gui::PrefPageProducer<FemGui::DlgSettingsFemMaterialImp> (QT_TRANSLATE_NOOP("QObject","FEM"));

// register preferences pages on Import-Export
new Gui::PrefPageProducer<FemGui::DlgSettingsFemExportAbaqusImp> (QT_TRANSLATE_NOOP("QObject","Import-Export"));
Expand Down
5 changes: 5 additions & 0 deletions src/Mod/Fem/Gui/CMakeLists.txt
Expand Up @@ -51,6 +51,7 @@ set(FemGui_MOC_HDRS
DlgSettingsFemGeneralImp.h
DlgSettingsFemGmshImp.h
DlgSettingsFemInOutVtkImp.h
DlgSettingsFemMaterialImp.h
DlgSettingsFemZ88Imp.h
PropertyFemMeshItem.h
TaskObjectName.h
Expand Down Expand Up @@ -95,6 +96,7 @@ set(FemGui_UIC_SRCS
DlgSettingsFemGeneral.ui
DlgSettingsFemGmsh.ui
DlgSettingsFemInOutVtk.ui
DlgSettingsFemMaterial.ui
DlgSettingsFemZ88.ui
TaskCreateNodeSet.ui
TaskObjectName.ui
Expand Down Expand Up @@ -158,6 +160,9 @@ SET(FemGui_DLG_SRCS
DlgSettingsFemInOutVtk.ui
DlgSettingsFemInOutVtkImp.cpp
DlgSettingsFemInOutVtkImp.h
DlgSettingsFemMaterial.ui
DlgSettingsFemMaterialImp.cpp
DlgSettingsFemMaterialImp.h
DlgSettingsFemZ88.ui
DlgSettingsFemZ88Imp.cpp
DlgSettingsFemZ88Imp.h
Expand Down
179 changes: 0 additions & 179 deletions src/Mod/Fem/Gui/DlgSettingsFemGeneral.ui
Expand Up @@ -67,9 +67,6 @@
<property name="prefEntry" stdset="0">
<cstring>WorkingDir</cstring>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/General</cstring>
</property>
Expand Down Expand Up @@ -287,9 +284,6 @@
<property name="prefEntry" stdset="0">
<cstring>CustomDirectoryPath</cstring>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -344,115 +338,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_4_materials">
<property name="title">
<string>Materials</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_built_in_materials">
<property name="text">
<string>Use built-in materials</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>UseBuiltInMaterials</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/General</cstring>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_config_dir">
<property name="text">
<string>Use materials from Materials directory in users FreeCAD user pref directory.</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>UseMaterialsFromConfigDir</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/General</cstring>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefCheckBox" name="cb_use_mat_from_custom_dir">
<property name="text">
<string>Use materials from user defined directory</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>UseMaterialsFromCustomDir</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/General</cstring>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="1">
<widget class="Gui::PrefFileChooser" name="fc_custom_mat_dir" native="true">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="prefEntry" stdset="0">
<cstring>CustomMaterialsDir</cstring>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Fem/General</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="l_custom_mat_dir">
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>User directory</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_5_results">
<property name="title">
Expand Down Expand Up @@ -567,70 +452,6 @@
<include location="Resources/Fem.qrc"/>
</resources>
<connections>
<connection>
<sender>cb_use_mat_from_custom_dir</sender>
<signal>toggled(bool)</signal>
<receiver>l_custom_mat_dir</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>93</x>
<y>262</y>
</hint>
<hint type="destinationlabel">
<x>89</x>
<y>289</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_use_mat_from_custom_dir</sender>
<signal>toggled(bool)</signal>
<receiver>fc_custom_mat_dir</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>240</x>
<y>258</y>
</hint>
<hint type="destinationlabel">
<x>241</x>
<y>285</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_use_mat_from_custom_dir</sender>
<signal>toggled(bool)</signal>
<receiver>l_custom_mat_dir</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>123</x>
<y>266</y>
</hint>
<hint type="destinationlabel">
<x>122</x>
<y>297</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_use_mat_from_custom_dir</sender>
<signal>toggled(bool)</signal>
<receiver>fc_custom_mat_dir</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>380</x>
<y>266</y>
</hint>
<hint type="destinationlabel">
<x>380</x>
<y>293</y>
</hint>
</hints>
</connection>
<connection>
<sender>cb_wd_custom</sender>
<signal>toggled(bool)</signal>
Expand Down
10 changes: 0 additions & 10 deletions src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp
Expand Up @@ -48,11 +48,6 @@ void DlgSettingsFemGeneralImp::saveSettings()

cb_analysis_group_meshing->onSave();

cb_use_built_in_materials->onSave();
cb_use_mat_from_config_dir->onSave();
cb_use_mat_from_custom_dir->onSave();
fc_custom_mat_dir->onSave();

cb_restore_result_dialog->onSave();
cb_keep_results_on_rerun->onSave();
cb_hide_constraint->onSave();
Expand All @@ -69,11 +64,6 @@ void DlgSettingsFemGeneralImp::loadSettings()

cb_analysis_group_meshing->onRestore();

cb_use_built_in_materials->onRestore();
cb_use_mat_from_config_dir->onRestore();
cb_use_mat_from_custom_dir->onRestore();
fc_custom_mat_dir->onRestore();

cb_restore_result_dialog->onRestore();
cb_keep_results_on_rerun->onRestore();
cb_hide_constraint->onRestore();
Expand Down

0 comments on commit 7c316ba

Please sign in to comment.