[TD]allow showing units on individual dimensions

This commit is contained in:
wandererfan
2025-01-24 13:04:00 -05:00
parent 06143dcb15
commit 2bc9f2ea1f
7 changed files with 29 additions and 26 deletions

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>440</width>
<height>508</height>
<width>495</width>
<height>692</height>
</rect>
</property>
<property name="sizePolicy">
@@ -35,7 +35,7 @@
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="8" column="2">
<widget class="Gui::PrefUnitSpinBox" name="plsb_ArrowSize">
<widget class="Gui::PrefUnitSpinBox" name="plsb_ArrowSize" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -45,7 +45,7 @@
<property name="toolTip">
<string>Arrowhead size</string>
</property>
<property name="value">
<property name="value" stdset="0">
<double>5.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
@@ -156,6 +156,11 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="toolTip">
<string>Append unit to dimension values</string>
</property>
@@ -183,7 +188,7 @@
</widget>
</item>
<item row="4" column="2">
<widget class="Gui::PrefUnitSpinBox" name="plsb_FontSize">
<widget class="Gui::PrefUnitSpinBox" name="plsb_FontSize" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -193,7 +198,7 @@
<property name="toolTip">
<string>Dimension text font size</string>
</property>
<property name="value">
<property name="value" stdset="0">
<double>4.000000000000000</double>
</property>
<property name="prefEntry" stdset="0">
@@ -544,7 +549,7 @@ Multiplier of 'Font Size'</string>
</property>
</widget>
</item>
<item row="0" column="1">
<item row="0" column="1">
<widget class="QComboBox" name="dimensioningMode">
<property name="toolTip">
<string>Select the type of dimensioning tools for your toolbar:
@@ -562,7 +567,7 @@ This setting is only for the toolbar. Whichever you choose, all tools are always
</property>
</widget>
</item>
<item row="1" column="1">
<item row="1" column="1">
<widget class="QComboBox" name="radiusDiameterMode">
<property name="toolTip">
<string>While using the Dimension tool you may choose how to handle circles and arcs:
@@ -627,9 +632,7 @@ This setting is only for the toolbar. Whichever you choose, all tools are always
<header>Gui/PrefWidgets.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="Resources/TechDraw.qrc"/>
</resources>
<resources/>
<connections>
<connection>
<sender>cbGlobalDecimals</sender>

View File

@@ -548,19 +548,6 @@ void QGIDatumLabel::setToleranceString()
updateFrameRect();
}
void QGIDatumLabel::setUnitString(QString text)
{
prepareGeometryChange();
if (text.isEmpty()) {
m_unitText->hide();
}
else {
m_unitText->setPlainText(text);
m_unitText->show();
}
updateFrameRect();
}
int QGIDatumLabel::getPrecision()
{

View File

@@ -83,7 +83,6 @@ public:
QFont getFont() const { return m_dimText->font(); }
void setDimString(QString text);
void setDimString(QString text, qreal maxWidth);
void setUnitString(QString text);
void setToleranceString();
void setPrettySel();
void setPrettyPre();