Added tooltips and label for distance.
This commit is contained in:
parent
be40ab79cd
commit
f6fb8ede40
|
@ -44,6 +44,9 @@
|
|||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="shape">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Select desired shape of the bone dressup:</p><p><span style=" font-weight:600; font-style:italic;">Dogbone</span> ... take the shortest path to cover the edge,</p><p><span style=" font-weight:600; font-style:italic;">T-bone</span> ... follow a certain direction until corner is covered</p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dogbone</string>
|
||||
|
@ -80,6 +83,9 @@
|
|||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="side">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>On which side of the profile bones are inserted - this also determines which corners are dressed up. The default value is determined based on the profile being dressed up.</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
|
@ -104,6 +110,9 @@
|
|||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="length">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Lenght of the bone to be inserted into the profile.</p><p><span style=" font-weight:600; font-style:italic;">adaptive</span> ... the lenght is adapted to cover the corner based on the angle of it's edges, taking the current tool radius into account (default)</p><p><span style=" font-weight:600; font-style:italic;">fixed</span> ... is the same as adaptive for straight angles. For T-bones it's the radius of the tool (R) and for dogbones it's R * (2/√2 - 1).</p><p><span style=" font-weight:600; font-style:italic;">custom</span> ... let's you sepcify a custom (fixed) distance below</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
|
@ -129,6 +138,9 @@
|
|||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Enter distance for each bone if <span style=" font-weight:600;">Lenght</span> is set to <span style=" font-weight:600;">custom</span>, ignored otherwise.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
|
@ -139,6 +151,19 @@
|
|||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>List of bone locations (with all bones at that location) that are part of this dressup. The list is determined by the corners in the profile and the selected <span style=" font-weight:600;">Side</span> for the bones. </p><p>You can <span style=" font-weight:600;">un-check</span> the bones you don't want to be dressed up.</p><p><br/></p><p>If a bone is <span style=" font-weight:600;">grayed out</span> it means that it is already dressed up by a previous dressup. Or put another way, if you dress up this dogobone dressup again you will only be able to select the bones that are un-checked here.</p><p><br/></p><p>If this list is empty it probably means you're trying to create bones on the wrong side of the profile.</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="customLabel">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Distance</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -194,20 +194,20 @@ class Chord (object):
|
|||
class ObjectDressup:
|
||||
|
||||
def __init__(self, obj):
|
||||
obj.addProperty("App::PropertyLink", "Base","Base", "The base path to modify")
|
||||
obj.addProperty("App::PropertyEnumeration", "Side", "Dressup", "The side of path to insert bones")
|
||||
obj.addProperty("App::PropertyLink", "Base","Base", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "The base path to modify"))
|
||||
obj.addProperty("App::PropertyEnumeration", "Side", "Dressup", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "The side of path to insert bones"))
|
||||
obj.Side = [Side.Left, Side.Right]
|
||||
obj.Side = Side.Right
|
||||
obj.addProperty("App::PropertyEnumeration", "Shape", "Dressup", "The shape of boness")
|
||||
obj.addProperty("App::PropertyEnumeration", "Shape", "Dressup", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "The shape of boness"))
|
||||
obj.Shape = Shape.All
|
||||
obj.Shape = Shape.Dogbone
|
||||
obj.addProperty("App::PropertyIntegerList", "BoneBlacklist", "Dressup", "Bones that aren't dressed up")
|
||||
obj.addProperty("App::PropertyIntegerList", "BoneBlacklist", "Dressup", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "Bones that aren't dressed up"))
|
||||
obj.BoneBlacklist = []
|
||||
obj.setEditorMode('BoneBlacklist', 2) # hide this one
|
||||
obj.addProperty("App::PropertyEnumeration", "Length", "Dressup", "The algorithm to determine the bone length")
|
||||
obj.addProperty("App::PropertyEnumeration", "Length", "Dressup", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "The algorithm to determine the bone length"))
|
||||
obj.Length = Length.All
|
||||
obj.Length = Length.Fixed
|
||||
obj.addProperty("App::PropertyFloat", "Custom", "Dressup", "Dressup length if lenght == custom")
|
||||
obj.Length = Length.Adaptive
|
||||
obj.addProperty("App::PropertyFloat", "Custom", "Dressup", QtCore.QT_TRANSLATE_NOOP("Dogbone_Dressup", "Dressup length if lenght == custom"))
|
||||
obj.Custom = 0.0
|
||||
obj.Proxy = self
|
||||
|
||||
|
@ -576,10 +576,15 @@ class TaskPanel:
|
|||
for item in sorted(itemList, key=lambda item: item.data(self.DataKey)):
|
||||
self.form.bones.addItem(item)
|
||||
|
||||
def updateUI(self):
|
||||
customSelected = self.obj.Length == Length.Custom
|
||||
self.form.custom.setEnabled(customSelected)
|
||||
self.form.customLabel.setEnabled(customSelected)
|
||||
self.updateBoneList()
|
||||
|
||||
def updateModel(self):
|
||||
self.getFields()
|
||||
self.form.custom.setEnabled(self.obj.Length == Length.Custom)
|
||||
self.updateBoneList()
|
||||
self.updateUI()
|
||||
FreeCAD.ActiveDocument.recompute()
|
||||
|
||||
def setupCombo(self, combo, text, items):
|
||||
|
@ -598,8 +603,7 @@ class TaskPanel:
|
|||
self.form.custom.setMinimum(0.0)
|
||||
self.form.custom.setDecimals(3)
|
||||
self.form.custom.setValue(self.obj.Custom)
|
||||
self.form.custom.setEnabled(self.obj.Length == Length.Custom)
|
||||
self.updateBoneList()
|
||||
self.updateUI()
|
||||
|
||||
def open(self):
|
||||
self.s = SelObserver()
|
||||
|
|
Loading…
Reference in New Issue
Block a user