[Part] cleanup new preferences Feature
- correct preferences location - handle preferences packs - remove unused code
This commit is contained in:
@@ -6,6 +6,7 @@ SET(PreferencePackTemplates_Files
|
||||
Editor_Colors.cfg
|
||||
Editor_Font.cfg
|
||||
Main_window_layout.cfg
|
||||
Part_Colors.cfg
|
||||
Path_Colors.cfg
|
||||
Sketcher_Colors.cfg
|
||||
Start_Colors.cfg
|
||||
|
||||
16
src/Gui/PreferencePackTemplates/Part_Colors.cfg
Normal file
16
src/Gui/PreferencePackTemplates/Part_Colors.cfg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<FCParameters>
|
||||
<FCParamGroup Name="Root">
|
||||
<FCParamGroup Name="BaseApp">
|
||||
<FCParamGroup Name="Preferences">
|
||||
<FCParamGroup Name="Mod">
|
||||
<FCParamGroup Name="Part">
|
||||
<FCUInt Name="Dimensions3dColor" Value="4278190335"/>
|
||||
<FCUInt Name="DimensionsAngularColor" Value="65535"/>
|
||||
<FCUInt Name="DimensionsDeltaColor" Value="16711935"/>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParamGroup>
|
||||
</FCParameters>
|
||||
@@ -21,6 +21,11 @@
|
||||
<FCUInt Name="gridColor" Value="842157055"/>
|
||||
<FCUInt Name="snapcolor" Value="4294967295"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Part">
|
||||
<FCUInt Name="Dimensions3dColor" Value="4278190335"/>
|
||||
<FCUInt Name="DimensionsAngularColor" Value="65535"/>
|
||||
<FCUInt Name="DimensionsDeltaColor" Value="16711935"/>
|
||||
</FCParamGroup>
|
||||
<FCParamGroup Name="Path">
|
||||
<FCUInt Name="DefaultNormalPathColor" Value="11141375"/>
|
||||
<FCUInt Name="DefaultRapidPathColor" Value="2852126975"/>
|
||||
|
||||
@@ -62,7 +62,6 @@ set(PartGui_UIC_SRCS
|
||||
DlgSettingsGeneral.ui
|
||||
DlgSettingsMeasure.ui
|
||||
DlgSettingsObjectColor.ui
|
||||
DlgSettingsMeasure.ui
|
||||
DlgProjectionOnSurface.ui
|
||||
SectionCutting.ui
|
||||
ShapeFromMesh.ui
|
||||
|
||||
@@ -20,14 +20,13 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Gui/Command.h>
|
||||
|
||||
#include "DlgSettingsMeasure.h"
|
||||
#include "ui_DlgSettingsMeasure.h"
|
||||
#include <Gui/PrefWidgets.h>
|
||||
|
||||
#include <Gui/Command.h>
|
||||
|
||||
using namespace PartGui;
|
||||
|
||||
@@ -86,7 +85,6 @@ void DlgSettingsMeasure::changeEvent(QEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DlgSettingsMeasure::onMeasureRefresh()
|
||||
{
|
||||
DlgSettingsMeasure::saveSettings();
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<cstring>Dimensions3dColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
<cstring>Mod/Part</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -78,7 +78,7 @@
|
||||
<cstring>DimensionsDeltaColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
<cstring>Mod/Part</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -102,7 +102,7 @@
|
||||
<cstring>DimensionsAngularColor</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
<cstring>Mod/Part</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -135,7 +135,7 @@
|
||||
<cstring>DimensionsFontSize</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
<cstring>Mod/Part</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -192,7 +192,7 @@
|
||||
<cstring>DimensionsFontName</cstring>
|
||||
</property>
|
||||
<property name="prefPath" stdset="0">
|
||||
<cstring>View</cstring>
|
||||
<cstring>Mod/Part</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -226,7 +226,7 @@ void PartGui::dumpLinearResults(const BRepExtrema_DistShapeShape &measure)
|
||||
|
||||
auto PartGui::getDimensionsFontName()
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/View");
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/Mod/Part");
|
||||
std::string fontName = group->GetASCII("DimensionsFontName", "defaultFont")
|
||||
+ (group->GetBool("DimensionsFontStyleBold", false) ? " :Bold" : "")
|
||||
+ (group->GetBool("DimensionsFontStyleItalic", false) ? " :Italic" : "");
|
||||
@@ -235,7 +235,7 @@ auto PartGui::getDimensionsFontName()
|
||||
|
||||
auto PartGui::getDimensionsFontSize()
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/View");
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/Mod/Part");
|
||||
return group->GetInt("DimensionsFontSize", 30);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ Gui::View3DInventorViewer * PartGui::getViewer()
|
||||
|
||||
void PartGui::addLinearDimensions(const BRepExtrema_DistShapeShape &measure)
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/View");
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/Mod/Part");
|
||||
App::Color c((uint32_t) group->GetUnsigned("Dimensions3dColor", 0xFF000000));
|
||||
App::Color d((uint32_t) group->GetUnsigned("DimensionsDeltaColor", 0x00FF0000));
|
||||
|
||||
@@ -1118,7 +1118,7 @@ void PartGui::goDimensionAngularNoTask(const VectorAdapter &vector1Adapter, cons
|
||||
dimSys = dimSys.transpose();
|
||||
}
|
||||
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/View");
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().GetGroup("BaseApp/Preferences/Mod/Part");
|
||||
App::Color c((uint32_t) group->GetUnsigned("DimensionsAngularColor", 0x0000FF00));
|
||||
|
||||
DimensionAngular *dimension = new DimensionAngular();
|
||||
|
||||
Reference in New Issue
Block a user