Skip to content

Commit

Permalink
[TD]expose SymbolScale preference
Browse files Browse the repository at this point in the history
  • Loading branch information
WandererFan committed Apr 10, 2020
1 parent 186af3d commit b2a7cb9
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 72 deletions.
175 changes: 103 additions & 72 deletions src/Mod/TechDraw/Gui/DlgPrefsTechDraw2.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>440</width>
<height>450</height>
<height>532</height>
</rect>
</property>
<property name="sizePolicy">
Expand Down Expand Up @@ -404,15 +404,8 @@ Each unit is approx. 0.1 mm wide</string>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Vertex Scale</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbVertexScale">
<item row="2" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbToleranceScale">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand All @@ -425,8 +418,14 @@ Each unit is approx. 0.1 mm wide</string>
<height>0</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Scale of vertex dots. Multiplier of line width.</string>
<string>Tolerance font size adjustment. Multiplier of dimension font size.</string>
</property>
<property name="accessibleName">
<string/>
Expand All @@ -435,25 +434,51 @@ Each unit is approx. 0.1 mm wide</string>
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>5.000000000000000</double>
<double>0.500000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>VertexScale</cstring>
<cstring>TolSizeAdjust</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/TechDraw/General</cstring>
<cstring>Mod/TechDraw/Dimensions</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<italic>true</italic>
</font>
<item row="3" column="2">
<widget class="Gui::PrefUnitSpinBox" name="pdsbTemplateMark">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>174</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Size of template field click handles</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>3.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>TemplateDotSize</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/TechDraw/General</cstring>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Center Mark Scale</string>
<string>Vertex Scale</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -504,41 +529,57 @@ Each unit is approx. 0.1 mm wide</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lbl_LabelFont">
<item row="0" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbVertexScale">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<width>174</width>
<height>0</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>0</height>
</size>
<property name="toolTip">
<string>Scale of vertex dots. Multiplier of line width.</string>
</property>
<property name="accessibleName">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>VertexScale</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/TechDraw/General</cstring>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Tolerance Text Scale</string>
<string>Center Mark Scale</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbToleranceScale">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item row="2" column="0">
<widget class="QLabel" name="lbl_LabelFont">
<property name="minimumSize">
<size>
<width>174</width>
<width>0</width>
<height>0</height>
</size>
</property>
Expand All @@ -548,23 +589,13 @@ Each unit is approx. 0.1 mm wide</string>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Tolerance font size adjustment. Multiplier of dimension font size.</string>
</property>
<property name="accessibleName">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>0.500000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>TolSizeAdjust</cstring>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/TechDraw/Dimensions</cstring>
<property name="text">
<string>Tolerance Text Scale</string>
</property>
</widget>
</item>
Expand All @@ -575,34 +606,29 @@ Each unit is approx. 0.1 mm wide</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="Gui::PrefUnitSpinBox" name="pdsbTemplateMark">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>174</width>
<height>0</height>
</size>
<item row="4" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string>Welding Symbol Scale</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="Gui::PrefDoubleSpinBox" name="pdsbSymbolScale">
<property name="toolTip">
<string>Size of template field click handles</string>
<string>Multiplier for size of welding symbols</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="value">
<double>3.000000000000000</double>
<double>1.250000000000000</double>
</property>
<property name="prefEntry" stdset="0">
<cstring>TemplateDotSize</cstring>
<cstring>SymbolFactor</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/TechDraw/General</cstring>
<cstring>Mod/TechDraw/Decorations</cstring>
</property>
</widget>
</item>
Expand Down Expand Up @@ -646,6 +672,11 @@ Each unit is approx. 0.1 mm wide</string>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>Gui::QuantitySpinBox</class>
<extends>QWidget</extends>
<header>Gui/QuantitySpinBox.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefComboBox</class>
<extends>QComboBox</extends>
Expand Down
2 changes: 2 additions & 0 deletions src/Mod/TechDraw/Gui/DlgPrefsTechDraw2Imp.cpp
Expand Up @@ -69,6 +69,7 @@ void DlgPrefsTechDraw2Imp::saveSettings()
pdsbEdgeFuzz->onSave();
pdsbMarkFuzz->onSave();
pdsbTemplateMark->onSave();
pdsbSymbolScale->onSave();
}

void DlgPrefsTechDraw2Imp::loadSettings()
Expand All @@ -85,6 +86,7 @@ void DlgPrefsTechDraw2Imp::loadSettings()
pdsbEdgeFuzz->onRestore();
pdsbMarkFuzz->onRestore();
pdsbTemplateMark->onRestore();
pdsbSymbolScale->onRestore();
}

/**
Expand Down

0 comments on commit b2a7cb9

Please sign in to comment.