[TD] LeadlerLine dialog beautifications

(add tooltips, use a display widget)

see https://forum.freecadweb.org/viewtopic.php?f=35&t=43360&p=369885#p369885
This commit is contained in:
donovaly
2020-02-18 02:37:36 +01:00
committed by WandererFan
parent 119a12aa06
commit bf9e646ebe
4 changed files with 35 additions and 12 deletions

View File

@@ -57,7 +57,7 @@ DrawLeaderLine::DrawLeaderLine(void)
ADD_PROPERTY_TYPE(StartSymbol, (-1), group, App::Prop_None, "Symbol (arrowhead) for start of line");
ADD_PROPERTY_TYPE(EndSymbol, (-1), group, App::Prop_None, "Symbol (arrowhead) for end of line");
ADD_PROPERTY_TYPE(Scalable ,(false),group,App::Prop_None,"Scale line with LeaderParent");
ADD_PROPERTY_TYPE(AutoHorizontal ,(getDefAuto()),group,App::Prop_None,"Forces last line segment horizontal");
ADD_PROPERTY_TYPE(AutoHorizontal ,(getDefAuto()),group,App::Prop_None,"Forces last line segment to be horizontal");
//hide the DrawView properties that don't apply to Leader
ScaleType.setStatus(App::Property::ReadOnly,true);

View File

@@ -540,8 +540,11 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Forces last leader line segment to be horizontal</string>
</property>
<property name="text">
<string>Leader Auto Horizontal</string>
<string>Leader Line Auto Horizontal</string>
</property>
<property name="checked">
<bool>true</bool>

View File

@@ -250,7 +250,7 @@ void TaskLeaderLine::setUiPrimary()
if (m_baseFeat != nullptr) {
std::string baseName = m_baseFeat->getNameInDocument();
ui->leBaseView->setText(Base::Tools::fromStdString(baseName));
ui->tbBaseView->setText(Base::Tools::fromStdString(baseName));
}
ui->pbTracker->setText(QString::fromUtf8("Pick points"));
@@ -289,7 +289,7 @@ void TaskLeaderLine::setUiEdit()
if (m_lineFeat != nullptr) {
std::string baseName = m_lineFeat->LeaderParent.getValue()->getNameInDocument();
ui->leBaseView->setText(Base::Tools::fromStdString(baseName));
ui->tbBaseView->setText(Base::Tools::fromStdString(baseName));
ui->cboxStartSym->setCurrentIndex(m_lineFeat->StartSymbol.getValue() + 1);
ui->cboxEndSym->setCurrentIndex(m_lineFeat->EndSymbol.getValue() + 1);
ui->pbTracker->setText(QString::fromUtf8("Edit points"));

View File

@@ -49,10 +49,29 @@
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="leBaseView">
<widget class="QTextBrowser" name="tbBaseView">
<property name="enabled">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>22</height>
</size>
</property>
<property name="mouseTracking">
<bool>false</bool>
@@ -63,12 +82,8 @@
<property name="acceptDrops">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Base View</string>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
@@ -111,6 +126,11 @@
</item>
<item>
<widget class="QPushButton" name="pbTracker">
<property name="toolTip">
<string>First pick the start pint of the line,
then at least a second point.
You can pick further points to get line segments.</string>
</property>
<property name="text">
<string>Pick Points</string>
</property>