[TD]Welding Symbol Editor alpha release

This commit is contained in:
wandererfan
2019-08-03 22:39:37 -04:00
committed by WandererFan
parent 70a64afa53
commit bec1d493c8
22 changed files with 2197 additions and 640 deletions

827
CMakeLists.txt.user Normal file
View File

@@ -0,0 +1,827 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.5.2, 2019-07-31T13:14:35. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
<value type="QByteArray">{2bb8d980-59c2-4103-9ad9-f84df3b67da6}</value>
</data>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{6576b0bd-ff13-47bd-97c2-c8159848c669}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuelist type="QVariantList" key="CMake.Configuration"/>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Target/freecad-qtcdb-build</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Default</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Default</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=Debug</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-Desktop-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=Release</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-Desktop-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-Desktop-Release with Debug Information</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=MinSizeRel</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-Desktop-Minimum Size Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">FreeCADMainCmd</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/huxster/Target/freecad-qtcdb-build/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">FreeCADMainCmd</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.FreeCADMainCmd</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">FreeCADMain</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/huxster/Target/freecad-qtcdb-build/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">-1</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">FreeCADMain</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.FreeCADMain</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.Target.1</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">FCPy3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">FCPy3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e6789b53-bada-4b34-95c2-99709681bbbb}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuelist type="QVariantList" key="CMake.Configuration"/>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Target/freecad-qtc-build</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Default</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Default</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">BUILD_ADDONMGR:INTERNAL=ON</value>
<value type="QString">BUILD_ARCH:INTERNAL=ON</value>
<value type="QString">BUILD_ASSEMBLY:INTERNAL=OFF</value>
<value type="QString">BUILD_COMPLETE:INTERNAL=OFF</value>
<value type="QString">BUILD_DRAFT:INTERNAL=ON</value>
<value type="QString">BUILD_DRAWING:INTERNAL=ON</value>
<value type="QString">BUILD_FEM:INTERNAL=OFF</value>
<value type="QString">BUILD_FLAT_MESH:INTERNAL=OFF</value>
<value type="QString">BUILD_IDF:INTERNAL=OFF</value>
<value type="QString">BUILD_IMAGE:INTERNAL=OFF</value>
<value type="QString">BUILD_IMPORT:INTERNAL=ON</value>
<value type="QString">BUILD_INSPECTION:INTERNAL=OFF</value>
<value type="QString">BUILD_JTREADER:INTERNAL=OFF</value>
<value type="QString">BUILD_MATERIAL:INTERNAL=ON</value>
<value type="QString">BUILD_MESH:INTERNAL=ON</value>
<value type="QString">BUILD_MESH_PART:INTERNAL=ON</value>
<value type="QString">BUILD_OPENSCAD:INTERNAL=OFF</value>
<value type="QString">BUILD_PART:INTERNAL=ON</value>
<value type="QString">BUILD_PART_DESIGN:INTERNAL=ON</value>
<value type="QString">BUILD_PATH:INTERNAL=OFF</value>
<value type="QString">BUILD_PLOT:INTERNAL=OFF</value>
<value type="QString">BUILD_POINTS:INTERNAL=OFF</value>
<value type="QString">BUILD_QT5:INTERNAL=ON</value>
<value type="QString">BUILD_RAYTRACING:INTERNAL=OFF</value>
<value type="QString">BUILD_REVERSEENGINEERING:INTERNAL=OFF</value>
<value type="QString">BUILD_ROBOT:INTERNAL=OFF</value>
<value type="QString">BUILD_SANDBOX:INTERNAL=OFF</value>
<value type="QString">BUILD_SHIP:INTERNAL=OFF</value>
<value type="QString">BUILD_SHOW:INTERNAL=ON</value>
<value type="QString">BUILD_SKETCHER:INTERNAL=ON</value>
<value type="QString">BUILD_SPREADSHEET:INTERNAL=ON</value>
<value type="QString">BUILD_START:INTERNAL=OFF</value>
<value type="QString">BUILD_SURFACE:INTERNAL=OFF</value>
<value type="QString">BUILD_TECHDRAW:INTERNAL=ON</value>
<value type="QString">BUILD_TEMPLATE:INTERNAL=OFF</value>
<value type="QString">BUILD_TEST:INTERNAL=ON</value>
<value type="QString">BUILD_TUX:INTERNAL=ON</value>
<value type="QString">BUILD_VR:INTERNAL=OFF</value>
<value type="QString">BUILD_WEB:INTERNAL=OFF</value>
<value type="QString">CMAKE_BUILD_TYPE:STRING=Debug</value>
<value type="QString">FREECAD_USE_OCC_VARIANT:INTERNAL=&quot;Official Version&quot;</value>
<value type="QString">OpenCASCADE_DIR:PATH=/usr/local/lib/cmake/opencascade72obs</value>
<value type="QString">PYTHON_EXECUTABLE:INTERNAL=/usr/bin/python3</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Target/freecad-qtcdb-build</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=Release</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-FCPy3-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.3">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=RelWithDebInfo</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-FCPy3-Release with Debug Information</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release with Debug Information</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.4">
<valuelist type="QVariantList" key="CMake.Configuration">
<value type="QString">CMAKE_BUILD_TYPE:STRING=MinSizeRel</value>
</valuelist>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/huxster/Source/build-FreeCAD-src-FCPy3-Minimum Size Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="QString" key="CMakeProjectManager.MakeStep.AdditionalArguments"></value>
<valuelist type="QVariantList" key="CMakeProjectManager.MakeStep.BuildTargets">
<value type="QString">all</value>
</valuelist>
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">CMake Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.MakeStep</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Minimum Size Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeBuildConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">5</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">FreeCADMainCmd</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/huxster/Target/freecad-qtcdb-build/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">FreeCADMainCmd</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.FreeCADMainCmd</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.QmlProfiler.AggregateTraces">false</value>
<value type="bool" key="Analyzer.QmlProfiler.FlushEnabled">false</value>
<value type="uint" key="Analyzer.QmlProfiler.FlushInterval">1000</value>
<value type="QString" key="Analyzer.QmlProfiler.LastTraceFile"></value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguation.Title">FreeCADMain</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.Arguments">-l</value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory.default">/home/huxster/Target/freecad-qtcdb-build/bin</value>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">FreeCADMain</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.FreeCADMain</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">2</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">18</value>
</data>
<data>
<variable>Version</variable>
<value type="int">18</value>
</data>
</qtcreator>

View File

@@ -47,12 +47,12 @@ DrawTile::DrawTile(void)
{
static const char *group = "Tile";
Base::Vector3d defOrg(0.0, 0.0, 0.0);
// Base::Vector3d defOrg(0.0, 0.0, 0.0);
ADD_PROPERTY_TYPE(TileParent,(0),group,(App::PropertyType)(App::Prop_None),
"Object to which this tile is attached");
ADD_PROPERTY_TYPE(TileRow, (0), group, App::Prop_None, "Row in parent");
ADD_PROPERTY_TYPE(TileColumn, (0), group, App::Prop_None, "Column in parent");
ADD_PROPERTY_TYPE(TileOrigin, (defOrg), group, App::Prop_None, "Width limit before auto wrap");
// ADD_PROPERTY_TYPE(TileOrigin, (defOrg), group, App::Prop_None, "Width limit before auto wrap");
}
DrawTile::~DrawTile()
@@ -81,7 +81,7 @@ App::DocumentObjectExecReturn *DrawTile::execute(void)
DrawView* DrawTile::getParent(void) const
{
Base::Console().Message("DT::getParent() - %s\n", getNameInDocument());
// Base::Console().Message("DT::getParent() - %s\n", getNameInDocument());
DrawView* result = nullptr;
App::DocumentObject* baseObj = TileParent.getValue();
if (baseObj != nullptr) {

View File

@@ -42,7 +42,7 @@ public:
App::PropertyLink TileParent; //eg DrawWeldSymbol
App::PropertyInteger TileRow;
App::PropertyInteger TileColumn;
App::PropertyVector TileOrigin; //sb call to TileParent - WeldingSymbol
/* App::PropertyVector TileOrigin; //sb call to TileParent - WeldingSymbol*/
virtual short mustExecute() const;
virtual App::DocumentObjectExecReturn *execute(void);

View File

@@ -74,7 +74,7 @@ short DrawTileWeld::mustExecute() const
App::DocumentObjectExecReturn *DrawTileWeld::execute(void)
{
// Base::Console().Message("DT::execute()\n");
// Base::Console().Message("DTW::execute()\n");
return DrawTile::execute();
}

View File

@@ -36,6 +36,7 @@
#include <Mod/TechDraw/App/DrawWeldSymbolPy.h> // generated from DrawWeldSymbolPy.xml
#include "DrawLeaderLine.h"
#include "DrawTile.h"
#include "DrawTileWeld.h"
#include "DrawWeldSymbol.h"
@@ -55,6 +56,7 @@ DrawWeldSymbol::DrawWeldSymbol(void)
ADD_PROPERTY_TYPE(Leader,(0),group,(App::PropertyType)(App::Prop_None), "Parent Leader");
ADD_PROPERTY_TYPE(AllAround, (false), group, App::Prop_None, "All Around Symbol on/off");
ADD_PROPERTY_TYPE(FieldWeld, (false), group, App::Prop_None, "Field Weld Symbol on/off");
ADD_PROPERTY_TYPE(AlternatingWeld, (false), group, App::Prop_None, "Alternating Weld true/false");
ADD_PROPERTY_TYPE(TailText, (""), group, App::Prop_None, "Text at tail of symbol");
Caption.setStatus(App::Property::Hidden,true);
@@ -87,7 +89,6 @@ App::DocumentObjectExecReturn *DrawWeldSymbol::execute(void)
return App::DocumentObject::StdReturn;
}
return DrawView::execute();
}
@@ -107,10 +108,25 @@ std::vector<DrawTileWeld*> DrawWeldSymbol::getTiles(void) const
}
}
}
// Base::Console().Message("DWS::getTiles - returns: %d tiles\n",result.size());
return result;
}
bool DrawWeldSymbol::isTailRightSide()
{
bool result = true;
App::DocumentObject* obj = Leader.getValue();
TechDraw::DrawLeaderLine* realLeader = dynamic_cast<TechDraw::DrawLeaderLine*>(obj);
if (realLeader != nullptr) {
Base::Vector3d tail = realLeader->getTailPoint();
Base::Vector3d kink = realLeader->getKinkPoint();
if (tail.x < kink.x) { //tail is to left
result = false;
}
}
return result;
}
PyObject *DrawWeldSymbol::getPyObject(void)
{
if (PythonObject.is(Py::_None())) {

View File

@@ -43,9 +43,9 @@ public:
virtual ~DrawWeldSymbol();
App::PropertyLink Leader;
// App::PropertyLinkList Tiles;
App::PropertyBool AllAround;
App::PropertyBool FieldWeld;
App::PropertyBool AlternatingWeld;
App::PropertyString TailText;
virtual short mustExecute() const;
@@ -57,8 +57,8 @@ public:
virtual PyObject *getPyObject(void);
virtual QRectF getRect() const { return QRectF(0,0,1,1);}
bool isTailRightSide();
std::vector<DrawTileWeld*> getTiles(void) const;
// void addTile(App::DocumentObject* d);
protected:
virtual void onChanged(const App::Property* prop);

View File

@@ -65,6 +65,7 @@ set(TechDrawGui_MOC_HDRS
mtextedit.h
TaskBalloon.h
QGIWeldSymbol.h
SymbolChooser.h
)
fc_wrap_cpp(TechDrawGui_MOC_SRCS ${TechDrawGui_MOC_HDRS})
@@ -94,6 +95,7 @@ set(TechDrawGui_UIC_SRCS
TaskLineDecor.ui
TaskRestoreLines.ui
TaskWeldingSymbol.ui
SymbolChooser.ui
)
if(BUILD_QT5)
@@ -178,6 +180,9 @@ SET(TechDrawGui_SRCS
DrawGuiUtil.h
Rez.cpp
Rez.h
SymbolChooser.ui
SymbolChooser.cpp
SymbolChooser.h
)
SET(TechDrawGuiView_SRCS
@@ -338,6 +343,7 @@ SET(TechDrawGuiTaskDlgs_SRCS
TaskRestoreLines.ui
TaskCL2Lines.ui
TaskWeldingSymbol.ui
SymbolChooser.ui
)
SOURCE_GROUP("TaskDialogs" FILES ${TechDrawGuiTaskDlgs_SRCS})

View File

@@ -1318,15 +1318,23 @@ void CmdTechDrawWeldSymbol::activated(int iMsg)
std::vector<App::DocumentObject*> leaders = getSelection().
getObjectsOfType(TechDraw::DrawLeaderLine::getClassTypeId());
if (leaders.size() != 1) {
std::vector<App::DocumentObject*> welds = getSelection().
getObjectsOfType(TechDraw::DrawWeldSymbol::getClassTypeId());
TechDraw::DrawLeaderLine* leadFeat = nullptr;
TechDraw::DrawWeldSymbol* weldFeat = nullptr;
if ( (leaders.size() != 1) &&
(welds.size() != 1) ) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select exactly one Leader line."));
QObject::tr("Select exactly one Leader line or one Weld symbol."));
return;
}
TechDraw::DrawLeaderLine* baseFeat = nullptr;
baseFeat = static_cast<TechDraw::DrawLeaderLine*> (leaders.front());
Gui::Control().showDialog(new TaskDlgWeldingSymbol(baseFeat));
if (!leaders.empty()) {
leadFeat = static_cast<TechDraw::DrawLeaderLine*> (leaders.front());
Gui::Control().showDialog(new TaskDlgWeldingSymbol(leadFeat));
} else if (!welds.empty()) {
weldFeat = static_cast<TechDraw::DrawWeldSymbol*> (welds.front());
Gui::Control().showDialog(new TaskDlgWeldingSymbol(weldFeat));
}
}
bool CmdTechDrawWeldSymbol::isActive(void)

View File

@@ -48,9 +48,11 @@ QGIArrow::QGIArrow() :
m_dirMode(false),
m_dir(Base::Vector3d(1.0,0.0,0.0))
{
isFlipped = false;
setFlipped(false);
setFill(Qt::SolidPattern);
m_brush.setStyle(m_fill);
m_colDefFill = getNormalColor();
m_colNormalFill = m_colDefFill;
setCacheMode(QGraphicsItem::NoCache);
setAcceptHoverEvents(false);
@@ -58,11 +60,6 @@ QGIArrow::QGIArrow() :
setFlag(QGraphicsItem::ItemIsMovable, false);
}
void QGIArrow::flip(bool state) {
isFlipped = state;
}
void QGIArrow::draw() {
QPainterPath path;
if (m_style == 0) {
@@ -122,7 +119,7 @@ QPainterPath QGIArrow::makeFilledTriangle(double length, double width, bool flip
path.lineTo(QPointF(Rez::guiX(length),Rez::guiX(-width)));
path.lineTo(QPointF(Rez::guiX(length),Rez::guiX(width)));
path.closeSubpath();
m_fill = Qt::SolidPattern;
setFill(Qt::SolidPattern);
return path;
}
@@ -141,7 +138,7 @@ QPainterPath QGIArrow::makeFilledTriangle(Base::Vector3d dir, double length, dou
path.lineTo(QPointF(Rez::guiX(barb1.x),Rez::guiX(barb1.y)));
path.lineTo(QPointF(Rez::guiX(barb2.x),Rez::guiX(barb2.y)));
path.closeSubpath();
m_fill = Qt::SolidPattern;
setFill(Qt::SolidPattern);
return path;
}

View File

@@ -23,9 +23,9 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QPainter>
#include <QPainterPathStroker>
#include <QStyleOptionGraphicsItem>
#include <QFile>
#include <QFileInfo>
#endif
#include <App/Application.h>
@@ -36,6 +36,7 @@
#include <Mod/TechDraw/App/DrawUtil.h>
#include <Mod/TechDraw/App/DrawTile.h>
#include <Mod/TechDraw/App/DrawTileWeld.h>
#include <Mod/TechDraw/App/DrawWeldSymbol.h>
#include <qmath.h>
#include "Rez.h"
@@ -45,14 +46,11 @@
using namespace TechDrawGui;
QGITile::QGITile(TechDraw::DrawTile* feat) :
QGITile::QGITile(TechDraw::DrawTileWeld* feat) :
m_tileFeat(feat),
m_textL(QString()),
m_textR(QString()),
m_textC(QString()),
m_textSize(0.0),
m_row(0),
m_col(0),
m_scale(1.0)
{
m_qgSvg = new QGCustomSvg();
@@ -67,15 +65,17 @@ QGITile::QGITile(TechDraw::DrawTile* feat) :
m_wide = getSymbolWidth();
m_high = getFontSize();
m_textSize = getFontSize();
m_textL = QString();
m_textR = QString();
m_textC = QString();
m_fontName = getTextFont();
m_font = QFont(m_fontName);
// setHandlesChildEvents(true); //qt4
#if PY_MAJOR_VERSION < 3
setHandlesChildEvents(true); //qt4 deprecated in qt5
#else
setFiltersChildEvents(true); //qt5
#endif
setAcceptHoverEvents(true);
setFlag(QGraphicsItem::ItemIsSelectable, false);
setFlag(QGraphicsItem::ItemIsMovable, false);
@@ -106,31 +106,67 @@ void QGITile::draw(void)
double textWidthL = m_qgTextL->boundingRect().width();
double textWidthR = m_qgTextR->boundingRect().width();
double totalWidth = m_wide + textWidthL + textWidthR;
double x = m_origin.x() + m_col * totalWidth; //bit of a hack. sb 0.5 of prev tile + 0.5 of this tile
double y = m_origin.y() - (m_row * m_high) - (m_high * 0.5); //inverted y!!
setPos(x,y);
int row = m_tileFeat->TileRow.getValue();
int col = m_tileFeat->TileColumn.getValue();
if (row == 0) { //arrowSide
double x = m_origin.x();
double y = m_origin.y() - (m_high * 0.5); //inverted y!!
setPos(x,y);
} else if (row == -1) { //otherSide
if (getAltWeld()) {
if (isTailRight()) {
double x = m_origin.x() + (0.5 * totalWidth); //move to right 1/2 tile width
double y = m_origin.y() + (m_high * 0.5); //inverted y!!
setPos(x,y);
} else {
double x = m_origin.x() - (0.5 * totalWidth); //move to left 1/2 tile width
double y = m_origin.y() + (m_high * 0.5); //inverted y!!
setPos(x,y);
}
} else {
double x = m_origin.x();
double y = m_origin.y() + (m_high * 0.5); //inverted y!!
setPos(x,y);
}
} else {
double x = m_origin.x() + col * totalWidth;
double y = m_origin.y() - (row * m_high) - (m_high * 0.5); //inverted y!!
setPos(x,y);
}
}
void QGITile::makeSymbol(void)
{
// Base::Console().Message("QGIT::makeSymbol()\n");
m_effect->setColor(m_colCurrent);
if (m_svgPath.isEmpty()) {
Base::Console().Warning("QGIT::makeSymbol - no symbol file set\n");
return;
}
m_qgSvg->setGraphicsEffect(m_effect);
QFile svgFile(m_svgPath);
if(svgFile.open(QIODevice::ReadOnly)) {
QByteArray qba = svgFile.readAll();
if (!m_qgSvg->load(&qba)) {
Base::Console().Error("Error - Could not load SVG renderer with %s\n", qPrintable(m_svgPath));
}
svgFile.close();
} else {
Base::Console().Error("Error - Could not open file %s\n", qPrintable(m_svgPath));
}
m_qgSvg->setScale(scaleToFont());
m_qgSvg->centerAt(0.0, 0.0); //(0,0) is based on symbol size
QFileInfo fi(m_svgPath);
if (fi.isReadable()) {
QFile svgFile(m_svgPath);
if(svgFile.open(QIODevice::ReadOnly)) {
QByteArray qba = svgFile.readAll();
if (!m_qgSvg->load(&qba)) {
Base::Console().Error("Error - Could not load SVG renderer with **%s**\n", qPrintable(m_svgPath));
return;
}
svgFile.close();
m_qgSvg->setScale(scaleToFont());
m_qgSvg->centerAt(0.0, 0.0); //(0,0) is based on symbol size
} else {
Base::Console().Error("Error - Could not open file **%s**\n", qPrintable(m_svgPath));
}
} else {
Base::Console().Error("QGIT::makeSymbol - file: **%s** is not readable\n",qPrintable(m_svgPath));
return;
}
}
void QGITile::makeText(void)
@@ -138,8 +174,11 @@ void QGITile::makeText(void)
// Base::Console().Message("QGIT::makeText()\n");
prepareGeometryChange();
m_font.setPixelSize(getFontSize());
double verticalFudge = 0.10; //% of textHeight
double verticalFudge = 0.10;
int row = m_tileFeat->TileRow.getValue();
//(0, 0) is 1/2 up (above line symbol)!
m_qgTextL->setFont(m_font);
m_qgTextL->setPlainText(m_textL);
m_qgTextL->setColor(m_colCurrent);
@@ -148,52 +187,45 @@ void QGITile::makeText(void)
double hMargin = (m_wide / 2.0) + (charWidth / 2.0);
double textHeightL = m_qgTextL->boundingRect().height();
double offsetAdjustL = 0.0;
if (m_row < 0) {
offsetAdjustL = -textHeightL * verticalFudge;
double vOffset = 0.0;
if (row < 0) { // below line
vOffset = textHeightL * verticalFudge;
} else {
offsetAdjustL = textHeightL * verticalFudge;
vOffset = 0.0;
}
double offset = (textHeightL * verticalFudge * m_row) + offsetAdjustL;
m_qgTextL->justifyRightAt(-hMargin, -offset, true);
m_qgTextL->justifyRightAt(-hMargin, vOffset, true);
m_qgTextR->setFont(m_font);
m_qgTextR->setPlainText(m_textR);
m_qgTextR->setColor(m_colCurrent);
textWidth = m_qgTextR->boundingRect().width();
charWidth = textWidth / m_textR.size();
hMargin = (m_wide / 2.0) + (charWidth / 2.0);
double textHeightR = m_qgTextR->boundingRect().height();
double offsetAdjustR = 0.0;
if (m_row < 0) {
offsetAdjustR = -textHeightR * verticalFudge;
if (row < 0) { // below line
vOffset = textHeightR * verticalFudge;
} else {
offsetAdjustR = textHeightR * verticalFudge;
vOffset = 0.0;
}
offset = (textHeightR * verticalFudge * m_row) + offsetAdjustR;
m_qgTextR->justifyLeftAt(hMargin, -offset, true);
m_qgTextR->justifyLeftAt(hMargin, vOffset, true);
m_qgTextC->setFont(m_font);
m_qgTextC->setPlainText(m_textC);
m_qgTextC->setColor(m_colCurrent);
double textHeightC = m_qgTextC->boundingRect().height();
textHeightC = textHeightC;
int rowAdjustC = m_row;
if (m_row >= 0) {
rowAdjustC++;
if (row < 0) { // below line
vOffset = m_high * (1 + verticalFudge);
} else {
vOffset = -0.5 * (m_high + textHeightC);
}
double offsetAdjustC = textHeightC * verticalFudge;
if (m_row < 0) {
offsetAdjustC = - offsetAdjustC;
}
offset = (textHeightC * rowAdjustC) - offsetAdjustC;
m_qgTextC->centerAt(0.0, -offset);
m_qgTextC->centerAt(0.0, vOffset);
}
void QGITile::setTilePosition(QPointF org, int r, int c)
void QGITile::setTilePosition(QPointF org)
{
m_origin = org;
m_row = r;
m_col = c;
}
void QGITile::setTileScale(double s)
@@ -264,6 +296,29 @@ void QGITile::setPrettySel() {
draw();
}
bool QGITile::isTailRight(void)
{
bool right = false;
App::DocumentObject* obj = m_tileFeat->TileParent.getValue();
TechDraw::DrawWeldSymbol* realParent = dynamic_cast<TechDraw::DrawWeldSymbol*>(obj);
if (realParent != nullptr) {
right = realParent->isTailRightSide();
}
return right;
}
bool QGITile::getAltWeld(void)
{
bool alt = false;
App::DocumentObject* obj = m_tileFeat->TileParent.getValue();
TechDraw::DrawWeldSymbol* realParent = dynamic_cast<TechDraw::DrawWeldSymbol*>(obj);
if (realParent != nullptr) {
alt = realParent->AlternatingWeld.getValue();
} else {
Base::Console().Message("QGIT::getAltWeld - real parent not found!\n");
}
return alt;
}
//TODO: this is Pen, not Brush. sb Brush to colour background
QColor QGITile::getTileColor(void) const

View File

@@ -51,7 +51,7 @@ namespace TechDrawGui
class TechDrawGuiExport QGITile : public QGIDecoration
{
public:
explicit QGITile(TechDraw::DrawTile* tileFeat);
explicit QGITile(TechDraw::DrawTileWeld* tileFeat);
~QGITile(void) {}
enum {Type = QGraphicsItem::UserType + 325};
@@ -65,10 +65,11 @@ public:
void setTileTextCenter(std::string s);
void setFont(QFont f, double fsize);
void setSymbolFile(std::string s);
void setTilePosition(QPointF org, int row, int col);
void setTilePosition(QPointF org);
void setTileScale(double s);
// double getSymbolScale(void) const;
virtual void draw(void);
bool isTailRight(void);
protected:
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
@@ -87,8 +88,10 @@ protected:
void makeSymbol(void);
void makeText(void);
bool getAltWeld(void);
private:
TechDraw::DrawTile* m_tileFeat;
TechDraw::DrawTileWeld* m_tileFeat;
QGCustomText* m_qgTextL;
QGCustomText* m_qgTextR;
QGCustomText* m_qgTextC;
@@ -100,9 +103,6 @@ private:
QString m_textC;
QString m_fontName;
QFont m_font;
double m_textSize;
int m_row;
int m_col;
QPointF m_origin;
double m_wide;
double m_high;

View File

@@ -525,6 +525,7 @@ void QGIView::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, Q
QStyleOptionGraphicsItem myOption(*option);
myOption.state &= ~QStyle::State_Selected;
// painter->setPen(Qt::red);
// painter->drawRect(boundingRect()); //good for debugging
QGraphicsItemGroup::paint(painter, &myOption, widget);
@@ -541,8 +542,12 @@ QRectF QGIView::customChildrenBoundingRect() const
int textLeaderItemType = QGraphicsItem::UserType + 233; // TODO: Magic number warning
int editablePathItemType = QGraphicsItem::UserType + 301; // TODO: Magic number warning
int movableTextItemType = QGraphicsItem::UserType + 300;
int weldingSymbolItemType = QGraphicsItem::UserType + 340;
QRectF result;
for (QList<QGraphicsItem*>::iterator it = children.begin(); it != children.end(); ++it) {
if (!(*it)->isVisible()) {
continue;
}
if ( ((*it)->type() != dimItemType) &&
((*it)->type() != leaderItemType) &&
((*it)->type() != textLeaderItemType) &&
@@ -550,6 +555,7 @@ QRectF QGIView::customChildrenBoundingRect() const
((*it)->type() != movableTextItemType) &&
((*it)->type() != borderItemType) &&
((*it)->type() != labelItemType) &&
((*it)->type() != weldingSymbolItemType) &&
((*it)->type() != captionItemType) ) {
QRectF childRect = mapFromItem(*it,(*it)->boundingRect()).boundingRect();
result = result.united(childRect);

View File

@@ -97,6 +97,14 @@ QGIWeldSymbol::QGIWeldSymbol(QGILeaderLine* myParent,
m_tailText = new QGCustomText();
addToGroup(m_tailText);
m_tailText->hide();
m_tailText->setPos(0.0, 0.0); //avoid bRect issues
m_allAround = new QGIVertex(-1);
m_allAround->setParentItem(this);
m_fieldFlag = new QGIPrimPath();
m_fieldFlag->setParentItem(this);
m_colCurrent = getNormalColor(); //preference
m_colSetting = m_colCurrent;
}
@@ -137,15 +145,40 @@ void QGIWeldSymbol::draw()
removeDecorations();
std::vector<TechDraw::DrawTileWeld*> tiles = m_weldFeat->getTiles();
for (auto& t: tiles) {
if (t != nullptr) {
QGITile* qt = new QGITile(t);
qt->setParentItem(this);
m_tiles.push_back(qt);
drawTile(t, qt);
TechDraw::DrawTileWeld* arrowTile = nullptr;
TechDraw::DrawTileWeld* otherTile = nullptr;
if (!tiles.empty()) {
TechDraw::DrawTileWeld* tempTile = tiles.at(0);
if (tempTile->TileRow.getValue() == 0) {
arrowTile = tempTile;
} else {
otherTile = tempTile;
}
}
if (tiles.size() > 1) {
TechDraw::DrawTileWeld* tempTile = tiles.at(1);
if (tempTile->TileRow.getValue() == 0) {
arrowTile = tempTile;
} else {
otherTile = tempTile;
}
}
if (arrowTile != nullptr) {
QGITile* qt = new QGITile(arrowTile);
m_arrowTile = qt;
qt->setParentItem(this);
drawTile(arrowTile, m_arrowTile);
}
if (otherTile != nullptr) {
QGITile* qt = new QGITile(otherTile);
m_otherTile = qt;
qt->setParentItem(this);
drawTile(otherTile, m_otherTile);
}
if (m_weldFeat->AllAround.getValue()) {
drawAllAround();
}
@@ -154,9 +187,7 @@ void QGIWeldSymbol::draw()
drawFieldFlag();
}
if (strlen(m_weldFeat->TailText.getValue()) != 0) {
drawTailText();
}
drawTailText();
}
void QGIWeldSymbol::drawTile(TechDraw::DrawTileWeld* dtw,
@@ -169,12 +200,10 @@ void QGIWeldSymbol::drawTile(TechDraw::DrawTileWeld* dtw,
std::string tileTextR = dtw->RightText.getValue();
std::string tileTextC = dtw->CenterText.getValue();
tile->setSymbolFile(dtw->SymbolFile.getValue());
int tileRow = dtw->TileRow.getValue();
int tileCol = dtw->TileColumn.getValue();
tile->setTileScale(featScale);
QPointF org = getTileOrigin();
tile->setTilePosition(org, tileRow, tileCol);
tile->setTilePosition(org);
tile->setColor(getCurrentColor());
tile->setTileTextLeft(tileTextL);
tile->setTileTextRight(tileTextR);
@@ -211,26 +240,30 @@ void QGIWeldSymbol::drawAllAround(void)
void QGIWeldSymbol::drawTailText(void)
{
// Base::Console().Message("QGIWS::drawTailText()\n");
m_tailText = new QGCustomText();
m_tailText->setParentItem(this);
QPointF textPos = getTailPoint();
m_tailText->setPos(textPos); //avoid messing up brect with empty item at 0,0
std::string tText = m_weldFeat->TailText.getValue();
if (tText.empty()) {
m_tailText->hide();
return;
} else {
m_tailText->show();
}
m_font.setFamily(getPrefFont());
m_font.setPixelSize(calculateFontPixelSize(getDimFontSize()));
m_tailText->setFont(m_font);
std::string tText = m_weldFeat->TailText.getValue();
m_tailText->setPlainText(
QString::fromUtf8(tText.c_str()));
m_tailText->setColor(getCurrentColor());
m_tailText->setZValue(ZVALUE::DIMENSION);
QPointF textPos = getTailPoint();
double textWidth = m_tailText->boundingRect().width();
double charWidth = textWidth / tText.size();
double hMargin = charWidth + getPrefArrowSize();
if (isTextRightSide()) {
if (getFeature()->isTailRightSide()) {
m_tailText->justifyLeftAt(textPos.x() + hMargin, textPos.y(), true);
} else {
m_tailText->justifyRightAt(textPos.x() - hMargin, textPos.y(), true);
@@ -287,22 +320,18 @@ void QGIWeldSymbol::removeDecorations()
QGITile* tile = dynamic_cast<QGITile*>(c);
QGIPrimPath* prim = dynamic_cast<QGIPrimPath*>(c); //allAround, fieldFlag
if (tile) {
tile->setParentItem(nullptr);
scene()->removeItem(tile);
delete tile;
} else if (prim) {
prim->setParentItem(nullptr);
scene()->removeItem(prim);
delete prim;
delete tile;
}
}
if (m_tailText != nullptr) {
m_tailText->setParentItem(nullptr);
scene()->removeItem(m_tailText);
delete m_tailText;
}
std::vector<QGITile*> noTiles;
m_tiles = noTiles;
m_arrowTile = nullptr;
m_otherTile = nullptr;
// std::vector<QGITile*> noTiles;
// m_tiles = noTiles;
}
void QGIWeldSymbol::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
@@ -339,10 +368,19 @@ void QGIWeldSymbol::drawBorder()
void QGIWeldSymbol::setPrettyNormal()
{
for (auto t: m_tiles) {
t->setColor(m_colNormal);
t->draw();
// for (auto t: m_tiles) {
// t->setColor(m_colNormal);
// t->draw();
// }
if (m_arrowTile != nullptr) {
m_arrowTile->setColor(m_colNormal);
m_arrowTile->draw();
}
if (m_otherTile != nullptr) {
m_otherTile->setColor(m_colNormal);
m_otherTile->draw();
}
m_colCurrent = m_colNormal;
m_fieldFlag->setNormalColor(m_colCurrent);
m_fieldFlag->setFillColor(m_colCurrent);
@@ -356,24 +394,50 @@ void QGIWeldSymbol::setPrettyNormal()
void QGIWeldSymbol::setPrettyPre()
{
// Base::Console().Message("QGIWS::setPrettyPre()\n");
for (auto t: m_tiles) {
t->setColor(getPreColor());
t->draw();
// for (auto t: m_tiles) {
// t->setColor(getPreColor());
// t->draw();
// }
if (m_arrowTile != nullptr) {
m_arrowTile->setColor(getPreColor());
m_arrowTile->draw();
}
if (m_otherTile != nullptr) {
m_otherTile->setColor(getPreColor());
m_otherTile->draw();
}
m_colCurrent = getPreColor();
m_fieldFlag->setNormalColor(getPreColor());
m_fieldFlag->setFillColor(getPreColor());
m_fieldFlag->setPrettyPre();
m_allAround->setNormalColor(getPreColor());
m_allAround->setPrettyPre();
m_tailText->setColor(getPreColor());
m_tailText->setPrettyPre();
}
void QGIWeldSymbol::setPrettySel()
{
// Base::Console().Message("QGIWS::setPrettySel()\n");
for (auto t: m_tiles) {
t->setColor(getSelectColor());
t->draw();
// for (auto t: m_tiles) {
// t->setColor(getSelectColor());
// t->draw();
// }
if (m_arrowTile != nullptr) {
m_arrowTile->setColor(getSelectColor());
m_arrowTile->draw();
}
if (m_otherTile != nullptr) {
m_otherTile->setColor(getSelectColor());
m_otherTile->draw();
}
m_colCurrent = getSelectColor();
m_fieldFlag->setNormalColor(getSelectColor());
m_fieldFlag->setFillColor(getSelectColor());
m_fieldFlag->setPrettySel();
m_allAround->setNormalColor(getSelectColor());
m_allAround->setPrettySel();
m_tailText->setColor(getSelectColor());
m_tailText->setPrettySel();
}
@@ -398,16 +462,16 @@ QPointF QGIWeldSymbol::getTailPoint(void)
return result;
}
bool QGIWeldSymbol::isTextRightSide()
{
bool result = true;
Base::Vector3d tail = m_leadFeat->getTailPoint();
Base::Vector3d kink = m_leadFeat->getKinkPoint();
if (tail.x < kink.x) { //tail is to left
result = false;
}
return result;
}
//bool QGIWeldSymbol::isTailRightSide()
//{
// bool result = true;
// Base::Vector3d tail = m_leadFeat->getTailPoint();
// Base::Vector3d kink = m_leadFeat->getKinkPoint();
// if (tail.x < kink.x) { //tail is to left
// result = false;
// }
// return result;
//}
TechDraw::DrawWeldSymbol* QGIWeldSymbol::getFeature(void)
{

View File

@@ -77,7 +77,6 @@ public:
QPointF getTileOrigin(void);
QPointF getKinkPoint(void);
QPointF getTailPoint(void);
bool isTextRightSide(void);
virtual void setPrettyNormal();
virtual void setPrettySel();
@@ -105,7 +104,8 @@ protected:
TechDraw::DrawLeaderLine* m_leadFeat;
QGILeaderLine* m_qgLead;
std::vector<QGITile*> m_tiles;
QGITile* m_arrowTile;
QGITile* m_otherTile;
QGCustomText* m_tailText;
QGIPrimPath* m_fieldFlag;
QGIVertex* m_allAround;

View File

@@ -0,0 +1,156 @@
/***************************************************************************
* Copyright (c) 2019 Wandererfan <wandererfan@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "PreCompiled.h"
#ifndef _PreComp_
#endif
#include <App/Application.h>
#include <Gui/FileDialog.h>
#include "DrawGuiStd.h"
#include "Rez.h"
#include <Mod/TechDraw/Gui/ui_SymbolChooser.h>
#include "SymbolChooser.h"
using namespace Gui;
using namespace TechDraw;
using namespace TechDrawGui;
SymbolChooser::SymbolChooser(QWidget *parent,
QString startDir,
QString source) :
QDialog(parent),
ui(new Ui_SymbolChooser),
m_symbolDir(startDir),
m_source(source)
{
ui->setupUi(this);
connect(ui->pbOK, SIGNAL(clicked(bool)),
this, SLOT(onOKClicked(bool)));
connect(ui->pbCancel, SIGNAL(clicked(bool)),
this, SLOT(onCancelClicked(bool)));
connect(ui->fcSymbolDir, SIGNAL(fileNameSelected(const QString&)),
this, SLOT(onDirectorySelected(const QString&)));
connect(ui->lwSymbols, SIGNAL(itemClicked(QListWidgetItem*)), //double click?
this, SLOT(onItemClicked(QListWidgetItem*)));
setUiPrimary();
}
void SymbolChooser::setUiPrimary()
{
// Base::Console().Message("SC::setUiPrimary()\n");
setWindowTitle(QObject::tr("Select a symbol"));
if (!m_symbolDir.isEmpty()) {
ui->fcSymbolDir->setFileName(m_symbolDir);
loadSymbolNames(m_symbolDir);
} else {
std::string resourceDir = App::Application::getResourceDir();
QString defDir = QString::fromUtf8(resourceDir.c_str());
ui->fcSymbolDir->setFileName(defDir);
loadSymbolNames(defDir);
m_symbolDir = defDir;
}
ui->lwSymbols->setViewMode(QListView::IconMode);
ui->lwSymbols->setFlow(QListView::LeftToRight);
ui->lwSymbols->setWrapping(true);
ui->lwSymbols->setDragEnabled(true);
ui->lwSymbols->setSelectionMode(QAbstractItemView::SingleSelection);
ui->lwSymbols->setAcceptDrops(false);
}
void SymbolChooser::onOKClicked(bool b)
{
Q_UNUSED(b);
// Base::Console().Message("SC::OnOKClicked()\n");
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
m_symbolPath = m_symbolDir +
targetText +
QString::fromUtf8(".svg");
Q_EMIT symbolSelected(m_symbolPath, m_source);
// Base::Console().Message("SC::onOKClicked - symbol; %s\n", qPrintable(m_symbolPath));
accept();
}
void SymbolChooser::onCancelClicked(bool b)
{
Q_UNUSED(b);
// Base::Console().Message("SC::OnCancelCicked()\n");
reject();
}
void SymbolChooser::onItemClicked(QListWidgetItem* item)
{
Q_UNUSED(item);
// Base::Console().Message("SCS::onItemClicked(%s)\n", qPrintable(item->text()));
//are item and currentItem() the same? should use item?
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
m_symbolPath = m_symbolDir +
targetText +
QString::fromUtf8(".svg");
Q_EMIT symbolSelected(m_symbolPath, m_source);
// Base::Console().Message("SC::onOKClicked - symbol: %s\n", qPrintable(m_symbolPath));
accept();
}
void SymbolChooser::onDirectorySelected(const QString& newDir)
{
// Base::Console().Message("SC::onDirectorySelected(%s)\n", qPrintable(newDir));
m_symbolDir = newDir + QString::fromUtf8("/");
loadSymbolNames(m_symbolDir);
}
void SymbolChooser::loadSymbolNames(QString pathToSymbols)
{
//fill selection list with names and icons
QDir symbolDir(pathToSymbols);
symbolDir.setFilter(QDir::Files);
QStringList fileNames = symbolDir.entryList();
for (auto& fn: fileNames) {
QListWidgetItem* item = new QListWidgetItem(fn, ui->lwSymbols);
QFileInfo fi(fn);
item->setText(fi.baseName());
QIcon symbolIcon(pathToSymbols + fn);
item->setIcon(symbolIcon);
ui->lwSymbols->addItem(item);
}
ui->lwSymbols->setCurrentRow(0);
ui->lwSymbols->setAcceptDrops(false); //have to do this every time you update the items
}
//QString SymbolChooser::getSymbolPath(void)
//{
// Base::Console().Message("SC::getSymbolPath returns: %s\n", qPrintable(m_symbolPath));
// return m_symbolPath;
//}
#include <Mod/TechDraw/Gui/moc_SymbolChooser.cpp>

View File

@@ -0,0 +1,65 @@
/***************************************************************************
* Copyright (c) 2019 Wandererfan <wandererfan@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef TECHDRAWGUI_SYMBOLCHOOSER_H
#define TECHDRAWGUI_SYMBOLCHOOSER_H
#include <QPushButton>
#include <QDialog>
#include <QListWidget>
#include <Mod/TechDraw/Gui/ui_SymbolChooser.h>
namespace TechDrawGui {
class TechDrawGuiExport SymbolChooser : public QDialog
{
Q_OBJECT
public:
SymbolChooser(QWidget *parent = 0,
QString startDir = QString(),
QString source = QString());
public Q_SLOTS:
void onOKClicked(bool b);
void onCancelClicked(bool b);
void onItemClicked(QListWidgetItem* item);
void onDirectorySelected(const QString& newDir);
Q_SIGNALS:
void symbolSelected(QString symbolPath,
QString source);
protected:
void setUiPrimary(void);
void loadSymbolNames(QString pathToSymbols);
private:
Ui_SymbolChooser* ui;
QString m_symbolDir;
QString m_symbolPath;
QString m_source;
};
}
#endif // #ifndef TECHDRAWGUI_SYMBOLCHOOSER_H

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SymbolChooser</class>
<widget class="QDialog" name="SymbolChooser">
<property name="windowModality">
<enum>Qt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>394</height>
</rect>
</property>
<property name="windowTitle">
<string>SymbolChooser</string>
</property>
<property name="modal">
<bool>true</bool>
</property>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>19</x>
<y>19</y>
<width>361</width>
<height>341</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<property name="lineWidth">
<number>2</number>
</property>
<widget class="QWidget" name="verticalLayoutWidget">
<property name="geometry">
<rect>
<x>9</x>
<y>19</y>
<width>341</width>
<height>191</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListWidget" name="lwSymbols"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>220</y>
<width>341</width>
<height>41</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="pbCancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbOK">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>280</y>
<width>341</width>
<height>35</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Symbol Dir</string>
</property>
</widget>
</item>
<item>
<widget class="Gui::FileChooser" name="fcSymbolDir">
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>Gui::FileChooser</class>
<extends>QWidget</extends>
<header>Gui/FileDialog.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>

View File

@@ -68,6 +68,7 @@
#include "MDIViewPage.h"
#include "ViewProviderPage.h"
#include "ViewProviderViewPart.h"
#include "SymbolChooser.h"
#include "Rez.h"
#include "TaskWeldingSymbol.h"
@@ -80,8 +81,12 @@ using namespace TechDrawGui;
TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawLeaderLine* leader) :
ui(new Ui_TaskWeldingSymbol),
m_leadFeat(leader),
m_arrowCount(0),
m_otherCount(0)
m_weldFeat(nullptr),
m_arrowIn(nullptr),
m_otherIn(nullptr),
m_createMode(true),
m_arrowDirty(false),
m_otherDirty(false)
{
// Base::Console().Message("TWS::TWS() - create mode\n");
if (m_leadFeat == nullptr) {
@@ -89,22 +94,94 @@ TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawLeaderLine* leader) :
Base::Console().Error("TaskWeldingSymbol - bad parameters. Can not proceed.\n");
return;
}
ui->setupUi(this);
connect(ui->pbArrow0, SIGNAL(clicked(bool)),
this, SLOT(onArrow0Clicked(bool)));
connect(ui->pbArrow1, SIGNAL(clicked(bool)),
this, SLOT(onArrow1Clicked(bool)));
connect(ui->pbOther0, SIGNAL(clicked(bool)),
this, SLOT(onOther0Clicked(bool)));
connect(ui->pbOther1, SIGNAL(clicked(bool)),
this, SLOT(onOther1Clicked(bool)));
connect(ui->pbArrowSymbol, SIGNAL(clicked(bool)),
this, SLOT(onArrowSymbolClicked(bool)));
connect(ui->pbOtherSymbol, SIGNAL(clicked(bool)),
this, SLOT(onOtherSymbolClicked(bool)));
connect(ui->pbOtherErase, SIGNAL(clicked(bool)),
this, SLOT(onOtherEraseClicked(bool)));
connect(ui->fcSymbolDir, SIGNAL(fileNameSelected(const QString&)),
this, SLOT(onDirectorySelected(const QString&)));
connect(ui->leArrowTextL, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leArrowTextR, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leArrowTextC, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leOtherTextL, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
connect(ui->leOtherTextR, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
connect(ui->leOtherTextC, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
setUiPrimary();
}
//ctor for edit
TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weld) :
ui(new Ui_TaskWeldingSymbol),
m_leadFeat(nullptr),
m_weldFeat(weld),
m_arrowIn(nullptr),
m_otherIn(nullptr),
m_createMode(false),
m_arrowDirty(false),
m_otherDirty(false)
{
// Base::Console().Message("TWS::TWS() - edit mode\n");
if (m_weldFeat == nullptr) {
//should be caught in CMD caller
Base::Console().Error("TaskWeldingSymbol - bad parameters. Can not proceed.\n");
return;
}
App::DocumentObject* obj = m_weldFeat->Leader.getValue();
if ( (obj != nullptr) &&
(obj->isDerivedFrom(TechDraw::DrawLeaderLine::getClassTypeId())) ) {
m_leadFeat = static_cast<TechDraw::DrawLeaderLine*>(obj);
} else {
Base::Console().Error("TaskWeldingSymbol - no leader for welding symbol. Can not proceed.\n");
return;
}
ui->setupUi(this);
connect(ui->pbArrowSymbol, SIGNAL(clicked(bool)),
this, SLOT(onArrowSymbolClicked(bool)));
connect(ui->pbOtherSymbol, SIGNAL(clicked(bool)),
this, SLOT(onOtherSymbolClicked(bool)));
connect(ui->pbOtherErase, SIGNAL(clicked(bool)),
this, SLOT(onOtherEraseClicked(bool)));
connect(ui->fcSymbolDir, SIGNAL(fileNameSelected(const QString&)),
this, SLOT(onDirectorySelected(const QString&)));
connect(ui->leArrowTextL, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leArrowTextR, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leArrowTextC, SIGNAL(textEdited(const QString&)),
this, SLOT(onArrowTextChanged(const QString&)));
connect(ui->leOtherTextL, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
connect(ui->leOtherTextR, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
connect(ui->leOtherTextC, SIGNAL(textEdited(const QString&)),
this, SLOT(onOtherTextChanged(const QString&)));
saveState();
setUiEdit();
}
TaskWeldingSymbol::~TaskWeldingSymbol()
{
delete ui;
@@ -130,220 +207,214 @@ void TaskWeldingSymbol::setUiPrimary()
setWindowTitle(QObject::tr("Create Welding Symbol"));
m_currDir = QString::fromUtf8(prefSymbolDir().c_str());
ui->fcSymbolDir->setFileName(m_currDir);
loadSymbolNames(m_currDir);
ui->lwSymbols->setViewMode(QListView::IconMode);
ui->lwSymbols->setFlow(QListView::LeftToRight);
ui->lwSymbols->setWrapping(true);
ui->lwSymbols->setDragEnabled(true);
ui->lwSymbols->setSelectionMode(QAbstractItemView::SingleSelection);
ui->lwSymbols->setAcceptDrops(false);
ui->pbArrowSymbol->setFocus();
m_arrowOut.init();
m_arrowPath = QString();
m_otherOut.init();
m_otherPath = QString();
}
void TaskWeldingSymbol::setUiEdit()
{
// Base::Console().Message("TWS::setUiEdit()\n");
setWindowTitle(QObject::tr("Edit Welding Symbol"));
}
void TaskWeldingSymbol::onArrow0Clicked(bool b)
{
// Base::Console().Message("TWS::OnArrow0Clicked()\n");
Q_UNUSED(b);
Qt::KeyboardModifiers km = QApplication::keyboardModifiers();
if (km & Qt::ControlModifier) {
ui->pbArrow0->setText(QString::fromUtf8("Add"));
ui->pbArrow0->setIcon(QIcon());
removePendingTile(0,0);
return;
}
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
TechDrawGui::Tile2Add newTile;
m_currDir = QString::fromUtf8(prefSymbolDir().c_str()); //sb path part of 1st symbol file??
ui->fcSymbolDir->setFileName(m_currDir);
QString iconPath = m_currDir +
targetText +
QString::fromUtf8(".svg") ;
ui->cbAllAround->setChecked(m_weldFeat->AllAround.getValue());
ui->cbFieldWeld->setChecked(m_weldFeat->FieldWeld.getValue());
ui->cbAltWeld->setChecked(m_weldFeat->AlternatingWeld.getValue());
ui->leTailText->setText(QString::fromUtf8(m_weldFeat->TailText.getValue()));
QIcon targetIcon(iconPath);
QSize iconSize(32,32);
ui->pbArrow0->setIcon(targetIcon);
ui->pbArrow0->setIconSize(iconSize);
ui->pbArrow0->setText(QString());
newTile.arrowSide = true;
newTile.symbolPath = Base::Tools::toStdString(iconPath);
newTile.leftText = Base::Tools::toStdString(ui->leLeftText->text());
newTile.centerText = Base::Tools::toStdString(ui->leCenterText->text());
newTile.rightText = Base::Tools::toStdString(ui->leRightText->text());
newTile.row = 0;
newTile.col = 0;
m_tiles2Add.push_back(newTile);
m_arrowCount++;
}
//save existing tiles done in saveState
if (m_arrowIn != nullptr) {
QString qTemp = QString::fromUtf8(m_arrowIn->LeftText.getValue());
ui->leArrowTextL->setText(qTemp);
qTemp = QString::fromUtf8(m_arrowIn->RightText.getValue());
ui->leArrowTextR->setText(qTemp);
qTemp = QString::fromUtf8(m_arrowIn->CenterText.getValue());
ui->leArrowTextC->setText(qTemp);
void TaskWeldingSymbol::onArrow1Clicked(bool b)
{
// Base::Console().Message("TWS::OnArrow1Clicked()\n");
Q_UNUSED(b);
Qt::KeyboardModifiers km = QApplication::keyboardModifiers();
if (km & Qt::ControlModifier) {
ui->pbArrow1->setText(QString::fromUtf8("Add"));
ui->pbArrow1->setIcon(QIcon());
removePendingTile(0,1);
return;
std::string inFile = m_arrowIn->SymbolFile.getValue();
auto fi = Base::FileInfo(inFile);
if (fi.isReadable()) {
qTemp = QString::fromUtf8(m_arrowIn->SymbolFile.getValue());
QIcon targetIcon(qTemp);
QSize iconSize(32,32);
ui->pbArrowSymbol->setIcon(targetIcon);
ui->pbArrowSymbol->setIconSize(iconSize);
ui->pbArrowSymbol->setText(QString());
}
}
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
TechDrawGui::Tile2Add newTile;
if (m_otherIn != nullptr) {
QString qTemp = QString::fromUtf8(m_otherIn->LeftText.getValue());
ui->leOtherTextL->setText(qTemp);
qTemp = QString::fromUtf8(m_otherIn->RightText.getValue());
ui->leOtherTextR->setText(qTemp);
qTemp = QString::fromUtf8(m_otherIn->CenterText.getValue());
ui->leOtherTextC->setText(qTemp);
QString iconPath = m_currDir +
targetText +
QString::fromUtf8(".svg") ;
QIcon targetIcon(iconPath);
QSize iconSize(32,32);
ui->pbArrow1->setIcon(targetIcon);
ui->pbArrow1->setIconSize(iconSize);
ui->pbArrow1->setText(QString());
newTile.arrowSide = true;
newTile.symbolPath = Base::Tools::toStdString(iconPath);
newTile.leftText = Base::Tools::toStdString(ui->leLeftText->text());
newTile.centerText = Base::Tools::toStdString(ui->leCenterText->text());
newTile.rightText = Base::Tools::toStdString(ui->leRightText->text());
newTile.row = 0;
newTile.col = 1;
m_tiles2Add.push_back(newTile);
m_arrowCount++;
}
void TaskWeldingSymbol::onOther0Clicked(bool b)
{
// Base::Console().Message("TWS::onOther0Clicked()\n");
Q_UNUSED(b);
Qt::KeyboardModifiers km = QApplication::keyboardModifiers();
if (km & Qt::ControlModifier) {
ui->pbOther0->setText(QString::fromUtf8("Add"));
ui->pbOther0->setIcon(QIcon());
removePendingTile(-1,0);
return;
std::string inFile = m_otherIn->SymbolFile.getValue();
auto fi = Base::FileInfo(inFile);
if (fi.isReadable()) {
qTemp = QString::fromUtf8(m_otherIn->SymbolFile.getValue());
QIcon targetIcon(qTemp);
QSize iconSize(32,32);
ui->pbOtherSymbol->setIcon(targetIcon);
ui->pbOtherSymbol->setIconSize(iconSize);
ui->pbOtherSymbol->setText(QString());
}
}
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
TechDrawGui::Tile2Add newTile;
QString iconPath = m_currDir +
targetText +
QString::fromUtf8(".svg") ;
QIcon targetIcon(iconPath);
QSize iconSize(32,32);
ui->pbOther0->setIcon(targetIcon);
ui->pbOther0->setIconSize(iconSize);
ui->pbOther0->setText(QString());
newTile.arrowSide = false;
newTile.symbolPath = Base::Tools::toStdString(iconPath);
newTile.leftText = Base::Tools::toStdString(ui->leLeftText->text());
newTile.centerText = Base::Tools::toStdString(ui->leCenterText->text());
newTile.rightText = Base::Tools::toStdString(ui->leRightText->text());
newTile.row = -1;
newTile.col = 0;
m_tiles2Add.push_back(newTile);
m_otherCount++;
ui->pbArrowSymbol->setFocus();
}
void TaskWeldingSymbol::onOther1Clicked(bool b)
void TaskWeldingSymbol::onArrowSymbolClicked(bool b)
{
// Base::Console().Message("TWS::onOther1Clicked()\n");
// Base::Console().Message("TWS::OnArrowSymbolClicked()\n");
Q_UNUSED(b);
Qt::KeyboardModifiers km = QApplication::keyboardModifiers();
if (km & Qt::ControlModifier) {
ui->pbOther1->setText(QString::fromUtf8("Add"));
ui->pbOther1->setIcon(QIcon());
removePendingTile(-1,1);
return;
}
QListWidgetItem* sourceItem = ui->lwSymbols->currentItem();
QString targetText = sourceItem->text();
TechDrawGui::Tile2Add newTile;
QString iconPath = m_currDir +
targetText +
QString::fromUtf8(".svg") ;
QString source = QString::fromUtf8("arrow");
SymbolChooser* dlg = new SymbolChooser(this, m_currDir, source);
connect(dlg, SIGNAL(symbolSelected(QString, QString)),
this, SLOT(onSymbolSelected(QString, QString)));
dlg->setAttribute(Qt::WA_DeleteOnClose);
QIcon targetIcon(iconPath);
QSize iconSize(32,32);
ui->pbOther1->setIcon(targetIcon);
ui->pbOther1->setIconSize(iconSize);
ui->pbOther1->setText(QString());
newTile.arrowSide = false;
newTile.symbolPath = Base::Tools::toStdString(iconPath);
newTile.leftText = Base::Tools::toStdString(ui->leLeftText->text());
newTile.centerText = Base::Tools::toStdString(ui->leCenterText->text());
newTile.rightText = Base::Tools::toStdString(ui->leRightText->text());
newTile.row = -1;
newTile.col = 1;
m_tiles2Add.push_back(newTile);
m_otherCount++;
//int rc =
dlg->exec();
}
void TaskWeldingSymbol::onOtherSymbolClicked(bool b)
{
// Base::Console().Message("TWS::OnOtherSymbolClicked()\n");
Q_UNUSED(b);
QString source = QString::fromUtf8("other");
SymbolChooser* dlg = new SymbolChooser(this, m_currDir, source);
connect(dlg, SIGNAL(symbolSelected(QString, QString)),
this, SLOT(onSymbolSelected(QString, QString)));
dlg->setAttribute(Qt::WA_DeleteOnClose);
// int rc =
dlg->exec();
}
void TaskWeldingSymbol::onOtherEraseClicked(bool b)
{
// Base::Console().Message("TWS::onOtherEraseClicked()\n");
Q_UNUSED(b);
m_otherOut.init();
ui->leOtherTextL->setText(QString());
ui->leOtherTextC->setText(QString());
ui->leOtherTextR->setText(QString());
ui->pbOtherSymbol->setIcon(QIcon());
ui->pbOtherSymbol->setText(QString::fromUtf8("Symbol"));
if ( (!m_createMode) &&
(m_otherIn != nullptr) ) {
m_toRemove.push_back(m_otherIn->getNameInDocument());
}
m_otherIn = nullptr;
}
void TaskWeldingSymbol::onArrowTextChanged(const QString& qs)
{
// Base::Console().Message("TWS::onArrowTextChanged(%s)\n", qPrintable(qs));
Q_UNUSED(qs);
m_arrowDirty = true;
}
void TaskWeldingSymbol::onOtherTextChanged(const QString& qs)
{
// Base::Console().Message("TWS::onOtherTextChanged(%s)\n", qPrintable(qs));
Q_UNUSED(qs);
m_otherDirty = true;
}
void TaskWeldingSymbol::onDirectorySelected(const QString& newDir)
{
// Base::Console().Message("TWS::onDirectorySelected(%s)\n", qPrintable(newDir));
m_currDir = newDir + QString::fromUtf8("/");
loadSymbolNames(m_currDir);
}
void TaskWeldingSymbol::removePendingTile(int row, int col)
void TaskWeldingSymbol::onSymbolSelected(QString symbolPath,
QString source)
{
// Base::Console().Message("TWS::removePendingIcon(%d, %d) - tiles in: %d\n",
// row, col, m_tiles2Add.size());
std::vector<Tile2Add> newList;
for (auto& t: m_tiles2Add) {
if ((t.row == row) &&
(t.col == col) ) {
continue;
} else {
newList.push_back(t);
}
// Base::Console().Message("TWS::onSymbolSelected(%s) - source: %s\n",
// qPrintable(symbolPath), qPrintable(source));
QIcon targetIcon(symbolPath);
QSize iconSize(32,32);
QString arrow = QString::fromUtf8("arrow");
QString other = QString::fromUtf8("other");
if (source == arrow) {
m_arrowDirty = true;
ui->pbArrowSymbol->setIcon(targetIcon);
ui->pbArrowSymbol->setIconSize(iconSize);
ui->pbArrowSymbol->setText(QString());
m_arrowPath = symbolPath;
} else if (source == other) {
m_otherDirty = true;
ui->pbOtherSymbol->setIcon(targetIcon);
ui->pbOtherSymbol->setIconSize(iconSize);
ui->pbOtherSymbol->setText(QString());
m_otherPath = symbolPath;
}
m_tiles2Add = newList;
}
void TaskWeldingSymbol::blockButtons(bool b)
{
Q_UNUSED(b);
}
void TaskWeldingSymbol::loadSymbolNames(QString pathToSymbols)
void TaskWeldingSymbol::saveState(void)
{
//fill selection list with names and icons
QDir symbolDir(pathToSymbols);
symbolDir.setFilter(QDir::Files);
QStringList fileNames = symbolDir.entryList();
for (auto& fn: fileNames) {
QListWidgetItem* item = new QListWidgetItem(fn, ui->lwSymbols);
QFileInfo fi(fn);
item->setText(fi.baseName());
QIcon symbolIcon(pathToSymbols + fn);
item->setIcon(symbolIcon);
ui->lwSymbols->addItem(item);
std::vector<DrawTileWeld*> tiles = m_weldFeat->getTiles();
for (auto t: tiles) {
if (t->TileRow.getValue() == 0) {
m_arrowIn = t;
} else if (t->TileRow.getValue() == -1) {
m_otherIn = t;
} else {
Base::Console().Message("TWS::saveState - bad row: %d\n", t->TileRow.getValue());
}
}
ui->lwSymbols->setCurrentRow(0);
ui->lwSymbols->setAcceptDrops(false); //have to do this every time you update the items
}
void TaskWeldingSymbol::collectArrowData(void)
{
// Base::Console().Message("TWS::collectArrowData()\n");
m_arrowOut.toBeSaved = true;
m_arrowOut.arrowSide = false;
m_arrowOut.row = 0;
m_arrowOut.col = 0;
m_arrowOut.leftText = Base::Tools::toStdString(ui->leArrowTextL->text());
m_arrowOut.centerText = Base::Tools::toStdString(ui->leArrowTextC->text());
m_arrowOut.rightText = Base::Tools::toStdString(ui->leArrowTextR->text());
m_arrowOut.symbolPath= Base::Tools::toStdString(m_arrowPath);
m_arrowOut.tileName = "";
}
void TaskWeldingSymbol::collectOtherData(void)
{
// Base::Console().Message("TWS::collectOtherData()\n");
m_otherOut.toBeSaved = true;
m_otherOut.arrowSide = false;
m_otherOut.row = -1;
m_otherOut.col = 0;
m_otherOut.leftText = Base::Tools::toStdString(ui->leOtherTextL->text());
m_otherOut.centerText = Base::Tools::toStdString(ui->leOtherTextC->text());
m_otherOut.rightText = Base::Tools::toStdString(ui->leOtherTextR->text());
m_otherOut.symbolPath= Base::Tools::toStdString(m_otherPath);
m_otherOut.tileName = "";
}
//******************************************************************************
App::DocumentObject* TaskWeldingSymbol::createWeldingSymbol(void)
TechDraw::DrawWeldSymbol* TaskWeldingSymbol::createWeldingSymbol(void)
{
// Base::Console().Message("TWS::createWeldingSymbol()\n");
Gui::Command::openCommand("Create WeldSymbol");
@@ -361,53 +432,85 @@ App::DocumentObject* TaskWeldingSymbol::createWeldingSymbol(void)
Command::doCommand(Command::Doc,"App.activeDocument().%s.Leader = App.activeDocument().%s",
symbolName.c_str(),m_leadFeat->getNameInDocument());
bool allAround = ui->rbAllAround->isChecked();
bool allAround = ui->cbAllAround->isChecked();
std::string allAroundText = allAround ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.AllAround = %s",
symbolName.c_str(), allAroundText.c_str());
bool fieldWeld = ui->rbFieldWeld->isChecked();
bool fieldWeld = ui->cbFieldWeld->isChecked();
std::string fieldWeldText = fieldWeld ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.FieldWeld = %s",
symbolName.c_str(), fieldWeldText.c_str());
bool altWeld = ui->cbAltWeld->isChecked();
std::string altWeldText = altWeld ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.AlternatingWeld = %s",
symbolName.c_str(), altWeldText.c_str());
std::string tailText = Base::Tools::toStdString(ui->leTailText->text());
Command::doCommand(Command::Doc,"App.activeDocument().%s.TailText = '%s'",
symbolName.c_str(), tailText.c_str());
App::DocumentObject* newObj = m_leadFeat->getDocument()->getObject(symbolName.c_str());
if (newObj == nullptr) {
TechDraw::DrawWeldSymbol* newSym = dynamic_cast<TechDraw::DrawWeldSymbol*>(newObj);
if ( (newObj == nullptr) ||
(newSym == nullptr) ) {
throw Base::RuntimeError("TaskWeldingSymbol - new symbol object not found");
}
newObj->recomputeFeature();
Gui::Command::updateActive();
Gui::Command::commitCommand();
return newObj;
return newSym;
}
void TaskWeldingSymbol::updateWeldingSymbol(void)
{
// Base::Console().Message("TWS::updateWeldingSymbol()\n");
std::string symbolName = m_weldFeat->getNameInDocument();
bool allAround = ui->cbAllAround->isChecked();
std::string allAroundText = allAround ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.AllAround = %s",
symbolName.c_str(), allAroundText.c_str());
bool fieldWeld = ui->cbFieldWeld->isChecked();
std::string fieldWeldText = fieldWeld ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.FieldWeld = %s",
symbolName.c_str(), fieldWeldText.c_str());
bool altWeld = ui->cbAltWeld->isChecked();
std::string altWeldText = altWeld ? "True" : "False";
Command::doCommand(Command::Doc,"App.activeDocument().%s.AlternatingWeld = %s",
symbolName.c_str(), altWeldText.c_str());
std::string tailText = Base::Tools::toStdString(ui->leTailText->text());
Command::doCommand(Command::Doc,"App.activeDocument().%s.TailText = '%s'",
symbolName.c_str(), tailText.c_str());
}
std::vector<App::DocumentObject*> TaskWeldingSymbol::createTiles(void)
{
// Base::Console().Message("TWS::createTiles()\n");
Gui::Command::openCommand("Create Welding Tiles");
std::vector<App::DocumentObject*> tileFeats;
std::string tileType("TechDraw::DrawTileWeld");
for (auto& t: m_tiles2Add) {
collectArrowData();
if (m_arrowOut.toBeSaved) {
std::string tileName = m_leadFeat->getDocument()->getUniqueObjectName("DrawTileWeld");
Command::doCommand(Command::Doc,"App.activeDocument().addObject('%s','%s')",
tileType.c_str(),tileName.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileRow = %d",
tileName.c_str(), t.row);
tileName.c_str(), m_arrowOut.row);
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileColumn = %d",
tileName.c_str(), t.col);
tileName.c_str(), m_arrowOut.col);
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = '%s'",
tileName.c_str(), t.symbolPath.c_str());
tileName.c_str(), m_arrowOut.symbolPath.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.LeftText = '%s'",
tileName.c_str(), t.leftText.c_str());
tileName.c_str(), m_arrowOut.leftText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.RightText = '%s'",
tileName.c_str(), t.rightText.c_str());
tileName.c_str(), m_arrowOut.rightText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.CenterText = '%s'",
tileName.c_str(), t.centerText.c_str());
tileName.c_str(), m_arrowOut.centerText.c_str());
App::DocumentObject* newTile = m_leadFeat->getDocument()->getObject(tileName.c_str());
if (newTile == nullptr) {
throw Base::RuntimeError("TaskWeldingSymbol - new tile object not found");
@@ -415,19 +518,132 @@ std::vector<App::DocumentObject*> TaskWeldingSymbol::createTiles(void)
tileFeats.push_back(newTile);
}
Gui::Command::updateActive();
Gui::Command::commitCommand();
if (m_otherDirty) {
collectOtherData();
if (m_otherOut.toBeSaved) {
std::string tileName = m_leadFeat->getDocument()->getUniqueObjectName("DrawTileWeld");
Command::doCommand(Command::Doc,"App.activeDocument().addObject('%s','%s')",
tileType.c_str(),tileName.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileRow = %d",
tileName.c_str(), m_otherOut.row);
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileColumn = %d",
tileName.c_str(), m_otherOut.col);
if (m_otherOut.symbolPath.empty()) {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = ''",
tileName.c_str());
} else {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = '%s'",
tileName.c_str(), m_otherOut.symbolPath.c_str());
}
Command::doCommand(Command::Doc,"App.activeDocument().%s.LeftText = '%s'",
tileName.c_str(), m_otherOut.leftText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.RightText = '%s'",
tileName.c_str(), m_otherOut.rightText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.CenterText = '%s'",
tileName.c_str(), m_otherOut.centerText.c_str());
App::DocumentObject* newTile = m_leadFeat->getDocument()->getObject(tileName.c_str());
if (newTile == nullptr) {
throw Base::RuntimeError("TaskWeldingSymbol - new tile object not found");
}
tileFeats.push_back(newTile);
}
}
return tileFeats;
}
void TaskWeldingSymbol::updateWeldingSymbol(void)
std::vector<App::DocumentObject*> TaskWeldingSymbol::updateTiles(void)
{
// Base::Console().Message("TWS::updateWeldingSymbol()\n");
Gui::Command::openCommand("Edit WeldingSymbol");
m_weldFeat->requestPaint();
// Base::Console().Message("TWS::updateTiles()\n");
std::vector<App::DocumentObject*> tileFeats;
std::string tileType("TechDraw::DrawTileWeld");
std::string tileName;
Gui::Command::updateActive();
Gui::Command::commitCommand();
collectArrowData();
if (m_arrowIn != nullptr) {
tileName = m_arrowIn->getNameInDocument();
}
if (m_arrowIn == nullptr) {
tileName = m_leadFeat->getDocument()->getUniqueObjectName("DrawTileWeld");
Command::doCommand(Command::Doc,"App.activeDocument().addObject('%s','%s')",
tileType.c_str(),tileName.c_str());
App::DocumentObject* newTile = m_leadFeat->getDocument()->getObject(tileName.c_str());
if (newTile == nullptr) {
throw Base::RuntimeError("TaskWeldingSymbol - new tile object not found");
}
tileFeats.push_back(newTile);
}
if (m_arrowOut.toBeSaved) {
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileRow = %d",
tileName.c_str(), m_arrowOut.row);
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileColumn = %d",
tileName.c_str(), m_arrowOut.col);
if (m_otherOut.symbolPath.empty()) {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = ''",
tileName.c_str());
} else {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = '%s'",
tileName.c_str(), m_arrowOut.symbolPath.c_str());
}
Command::doCommand(Command::Doc,"App.activeDocument().%s.LeftText = '%s'",
tileName.c_str(), m_arrowOut.leftText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.RightText = '%s'",
tileName.c_str(), m_arrowOut.rightText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.CenterText = '%s'",
tileName.c_str(), m_arrowOut.centerText.c_str());
}
if (m_otherDirty) {
collectOtherData();
if (m_otherIn != nullptr) {
tileName = m_otherIn->getNameInDocument();
}
if ( (m_otherIn == nullptr) &&
(m_otherOut.toBeSaved) ) {
tileName = m_leadFeat->getDocument()->getUniqueObjectName("DrawTileWeld");
Command::doCommand(Command::Doc,"App.activeDocument().addObject('%s','%s')",
tileType.c_str(),tileName.c_str());
App::DocumentObject* newTile = m_leadFeat->getDocument()->getObject(tileName.c_str());
if (newTile == nullptr) {
throw Base::RuntimeError("TaskWeldingSymbol - new tile object not found");
}
tileFeats.push_back(newTile);
}
if (m_otherOut.toBeSaved) {
Command::doCommand(Command::Doc,"App.activeDocument().addObject('%s','%s')",
tileType.c_str(),tileName.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileRow = %d",
tileName.c_str(), m_otherOut.row);
Command::doCommand(Command::Doc,"App.activeDocument().%s.TileColumn = %d",
tileName.c_str(), m_otherOut.col);
if (m_otherOut.symbolPath.empty()) {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = ''",
tileName.c_str());
} else {
Command::doCommand(Command::Doc,"App.activeDocument().%s.SymbolFile = '%s'",
tileName.c_str(), m_otherOut.symbolPath.c_str());
}
Command::doCommand(Command::Doc,"App.activeDocument().%s.LeftText = '%s'",
tileName.c_str(), m_otherOut.leftText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.RightText = '%s'",
tileName.c_str(), m_otherOut.rightText.c_str());
Command::doCommand(Command::Doc,"App.activeDocument().%s.CenterText = '%s'",
tileName.c_str(), m_otherOut.centerText.c_str());
}
}
return tileFeats;
}
void TaskWeldingSymbol::saveButtons(QPushButton* btnOK,
@@ -458,15 +674,36 @@ std::string TaskWeldingSymbol::prefSymbolDir()
bool TaskWeldingSymbol::accept()
{
// Base::Console().Message("TWS::accept()\n");
std::vector<App::DocumentObject*> tileFeats = createTiles();
App::DocumentObject* weldFeat = createWeldingSymbol();
for (auto& obj: tileFeats) {
TechDraw::DrawTileWeld* tile = dynamic_cast<TechDraw::DrawTileWeld*>(obj);
tile->TileParent.setValue(weldFeat);
if (m_createMode) {
m_weldFeat = createWeldingSymbol();
std::vector<App::DocumentObject*> tileFeats = createTiles();
for (auto& obj: tileFeats) {
TechDraw::DrawTileWeld* tile = dynamic_cast<TechDraw::DrawTileWeld*>(obj);
tile->TileParent.setValue(m_weldFeat);
}
m_weldFeat->recomputeFeature();
// m_weldFeat->requestPaint(); //not a dv!
} else {
try {
updateWeldingSymbol();
std::vector<App::DocumentObject*> tileFeats = updateTiles();
for (auto& obj: tileFeats) { //new tiles only
TechDraw::DrawTileWeld* tile = dynamic_cast<TechDraw::DrawTileWeld*>(obj);
tile->TileParent.setValue(m_weldFeat);
}
for (auto name: m_toRemove) {
Command::doCommand(Command::Doc,
"App.activeDocument().removeObject('%s')", name.c_str());
}
}
catch (...) {
Base::Console().Error("TWS::accept - failed to update symbol\n");
}
m_weldFeat->recomputeFeature();
// m_weldFeat->requestPaint(); //not a dv!
}
weldFeat->recomputeFeature();
// weldFeat->requestPaint(); //not a dv!
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
return true;
@@ -493,6 +730,16 @@ TaskDlgWeldingSymbol::TaskDlgWeldingSymbol(TechDraw::DrawLeaderLine* leader)
Content.push_back(taskbox);
}
TaskDlgWeldingSymbol::TaskDlgWeldingSymbol(TechDraw::DrawWeldSymbol* weld)
: TaskDialog()
{
widget = new TaskWeldingSymbol(weld);
taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/techdraw-weldsymbol"),
widget->windowTitle(), true, 0);
taskbox->groupLayout()->addWidget(widget);
Content.push_back(taskbox);
}
TaskDlgWeldingSymbol::~TaskDlgWeldingSymbol()
{
}

View File

@@ -32,7 +32,6 @@
#include <Mod/TechDraw/Gui/ui_TaskWeldingSymbol.h>
class Ui_TaskWeldingSymbol;
class Ui_TaskCL2Lines;
@@ -46,6 +45,8 @@ class DrawPage;
class DrawView;
class DrawLeaderLine;
class DrawWeldSymbol;
class DrawTileWeld;
class DrawTile;
}
namespace TechDraw
@@ -62,35 +63,55 @@ class QGIWeldSymbol;
class MDIViewPage;
//class ViewProviderWeld;
class Tile2Add
class TileImage
{
public:
Tile2Add() {};
~Tile2Add() = default;
bool arrowSide; // or is row enough?
TileImage() {};
~TileImage() = default;
bool toBeSaved;
bool arrowSide;
int row;
int col;
std::string leftText;
std::string centerText;
std::string rightText;
std::string symbolPath;
std::string tileName;
void init(void) {
toBeSaved = false;
arrowSide = true;
row = 0;
col = 0;
leftText = "";
centerText = "";
rightText = "";
symbolPath= "";
tileName = "";
}
};
class TaskWeldingSymbol : public QWidget
class TechDrawGuiExport TaskWeldingSymbol : public QWidget
{
Q_OBJECT
public:
TaskWeldingSymbol(TechDraw::DrawLeaderLine* baseFeat);
TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weldFeat);
~TaskWeldingSymbol();
public Q_SLOTS:
void onArrow0Clicked(bool b);
void onArrow1Clicked(bool b);
void onOther0Clicked(bool b);
void onOther1Clicked(bool b);
void onArrowSymbolClicked(bool b);
void onOtherSymbolClicked(bool b);
void onOtherEraseClicked(bool b);
void onArrowTextChanged(const QString& qs);
void onOtherTextChanged(const QString& qs);
void onDirectorySelected(const QString& newDir);
void onSymbolSelected(QString symbolPath, QString source);
public:
virtual bool accept();
virtual bool reject();
@@ -98,7 +119,6 @@ public:
void saveButtons(QPushButton* btnOK,
QPushButton* btnCancel);
void enableTaskButtons(bool b);
void setFlipped(bool b);
protected Q_SLOTS:
@@ -109,34 +129,43 @@ protected:
void setUiPrimary(void);
void setUiEdit();
void turnOnArrow();
void turnOnOther();
void removePendingTile(int row, int col);
App::DocumentObject* createWeldingSymbol(void);
TechDraw::DrawWeldSymbol* createWeldingSymbol(void);
void updateWeldingSymbol(void);
std::vector<App::DocumentObject*> createTiles(void);
void loadSymbolNames(QString pathToSymbols);
std::vector<App::DocumentObject*> createTiles(void);
std::vector<App::DocumentObject*> updateTiles(void);
void collectArrowData(void);
void collectOtherData(void);
std::string prefSymbolDir();
void saveState(void);
QString m_currDir;
private:
Ui_TaskWeldingSymbol * ui;
Ui_TaskWeldingSymbol* ui;
TechDraw::DrawLeaderLine* m_leadFeat;
TechDraw::DrawWeldSymbol* m_weldFeat;
TechDraw::DrawTileWeld* m_arrowIn;
TechDraw::DrawTileWeld* m_otherIn;
std::vector<Tile2Add> m_tiles2Add;
TileImage m_arrowOut;
TileImage m_otherOut;
QString m_arrowPath;
QString m_otherPath;
std::vector<std::string> m_toRemove;
QPushButton* m_btnOK;
QPushButton* m_btnCancel;
int m_arrowCount;
int m_otherCount;
bool m_createMode;
bool m_arrowDirty;
bool m_otherDirty;
};
@@ -146,6 +175,7 @@ class TaskDlgWeldingSymbol : public Gui::TaskView::TaskDialog
public:
TaskDlgWeldingSymbol(TechDraw::DrawLeaderLine* leader);
TaskDlgWeldingSymbol(TechDraw::DrawWeldSymbol* weld);
~TaskDlgWeldingSymbol();
public:

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>409</width>
<height>578</height>
<width>423</width>
<height>374</height>
</rect>
</property>
<property name="sizePolicy">
@@ -50,63 +50,63 @@
<item>
<layout class="QHBoxLayout" name="hlArrowSideLayout">
<item>
<widget class="QPushButton" name="pbArrow0">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="toolTip">
<string>Add an Arrow Side Symbol</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbArrow1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="toolTip">
<string>Add an Arrow Side Symbol</string>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QLineEdit" name="leArrowTextL">
<property name="toolTip">
<string>Text before arrow side symbol</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLineEdit" name="leArrowTextR">
<property name="toolTip">
<string>Text after arrow side symbol</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pbArrowSymbol">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="toolTip">
<string>Pick arrow side symbol</string>
</property>
<property name="statusTip">
<string/>
</property>
<property name="text">
<string>Symbol</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="leArrowTextC">
<property name="toolTip">
<string>Text above arrow side symbol</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
@@ -126,176 +126,69 @@
<item>
<layout class="QHBoxLayout" name="hlOtherSideLayout">
<item>
<widget class="QPushButton" name="pbOther0">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="toolTip">
<string>Add an Other Side Symbol</string>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbOther1">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="toolTip">
<string>Add an Other Side Symbol</string>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QListWidget" name="lwSymbols">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>128</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>256</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>64</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>128</height>
</size>
</property>
<property name="toolTip">
<string>Select a symbol</string>
</property>
<property name="movement">
<enum>QListView::Static</enum>
</property>
<property name="flow">
<enum>QListView::LeftToRight</enum>
</property>
<property name="isWrapping" stdset="0">
<bool>true</bool>
</property>
<property name="resizeMode">
<enum>QListView::Adjust</enum>
</property>
<property name="gridSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="viewMode">
<enum>QListView::IconMode</enum>
</property>
<property name="uniformItemSizes">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<property name="currentRow">
<number>-1</number>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Left Text</string>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="2">
<widget class="QLineEdit" name="leOtherTextR">
<property name="toolTip">
<string>Text after other side symbol</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="leLeftText">
<widget class="QPushButton" name="pbOtherSymbol">
<property name="toolTip">
<string>Text before symbol</string>
<string>Pick other side symbol</string>
</property>
<property name="text">
<string>Symbol</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Center Text</string>
<item row="0" column="0">
<widget class="QLineEdit" name="leOtherTextL">
<property name="toolTip">
<string>Text before other side symbol</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="leCenterText">
<widget class="QLineEdit" name="leOtherTextC">
<property name="toolTip">
<string>Text above/below symbol</string>
<string>Text below other side symbol</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<item row="1" column="0">
<widget class="QPushButton" name="pbOtherErase">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>60</width>
<height>30</height>
</size>
</property>
<property name="baseSize">
<size>
<width>60</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
<string>Remove other side symbol</string>
</property>
<property name="text">
<string>Right Text</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="leRightText">
<property name="toolTip">
<string>Text after symbol</string>
<string>Delete</string>
</property>
</widget>
</item>
@@ -313,72 +206,88 @@
</widget>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Symbol Directory</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QCheckBox" name="cbFieldWeld">
<property name="text">
<string>Field Weld</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="cbAllAround">
<property name="text">
<string>All Around</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="cbAltWeld">
<property name="text">
<string>Alternating</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="Gui::FileChooser" name="fcSymbolDir">
<property name="toolTip">
<string>Pick a directory of welding symbols</string>
<item>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="filter">
<string>*.svg</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Process Text</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="leTailText">
<property name="toolTip">
<string>Text at end of symbol</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QRadioButton" name="rbFieldWeld">
<property name="toolTip">
<string>Show on site flag</string>
</property>
<property name="text">
<string>Field Weld</string>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="rbAllAround">
<property name="toolTip">
<string>show perimeter circle</string>
</property>
<property name="text">
<string>All Around</string>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
<item row="0" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Tail Text</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="leTailText">
<property name="toolTip">
<string>Text at end of symbol</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Symbol Directory</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="Gui::FileChooser" name="fcSymbolDir">
<property name="toolTip">
<string>Pick a directory of welding symbols</string>
</property>
<property name="mode">
<enum>Gui::FileChooser::Directory</enum>
</property>
<property name="filter">
<string>*.svg</string>
</property>
</widget>
</item>
</layout>
</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>
</widget>
</item>

View File

@@ -34,9 +34,17 @@
#include <App/Application.h>
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <Gui/SoFCSelection.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Control.h>
#include <Gui/Command.h>
#include <Gui/Document.h>
#include <Gui/MainWindow.h>
#include <Gui/Selection.h>
#include "TaskWeldingSymbol.h"
#include "ViewProviderWeld.h"
using namespace TechDrawGui;
@@ -99,6 +107,42 @@ std::vector<App::DocumentObject*> ViewProviderWeld::claimChildren(void) const
}
}
bool ViewProviderWeld::setEdit(int ModNum)
{
// Base::Console().Message("VPW::setEdit(%d)\n",ModNum);
if (ModNum == ViewProvider::Default ) {
if (Gui::Control().activeDialog()) { //TaskPanel already open!
return false;
}
// clear the selection (convenience)
Gui::Selection().clearSelection();
Gui::Control().showDialog(new TaskDlgWeldingSymbol(getFeature()));
return true;
} else {
return ViewProviderDrawingView::setEdit(ModNum);
}
return true;
}
void ViewProviderWeld::unsetEdit(int ModNum)
{
Q_UNUSED(ModNum);
if (ModNum == ViewProvider::Default) {
Gui::Control().closeDialog();
}
else {
ViewProviderDrawingView::unsetEdit(ModNum);
}
}
bool ViewProviderWeld::doubleClicked(void)
{
// Base::Console().Message("VPW::doubleClicked()\n");
setEdit(ViewProvider::Default);
return true;
}
TechDraw::DrawWeldSymbol* ViewProviderWeld::getViewObject() const
{
return dynamic_cast<TechDraw::DrawWeldSymbol*>(pcObject);

View File

@@ -52,6 +52,9 @@ public:
virtual std::vector<std::string> getDisplayModes(void) const;
virtual void updateData(const App::Property*);
virtual std::vector<App::DocumentObject*> claimChildren(void) const;
virtual bool setEdit(int ModNum);
virtual void unsetEdit(int ModNum);
virtual bool doubleClicked(void);
virtual TechDraw::DrawWeldSymbol* getViewObject() const;
virtual TechDraw::DrawWeldSymbol* getFeature() const;