[FEM] point filter: use a LineEdit to output value

- that one copy the result to the clipboard
- also fix a typo
This commit is contained in:
Uwe
2022-06-14 01:21:17 +02:00
parent 6a0db7c42e
commit f1e3c30d6a
3 changed files with 38 additions and 5 deletions

View File

@@ -1102,7 +1102,7 @@ void TaskPostDataAtPoint::showValue(double pointValue, const char* unitStr)
QString value = QString::fromStdString(toString(pointValue));
QString unit = QString::fromUtf8(unitStr);
ui->ValueAtPoint->setText(tr("Value: %1 %2").arg(value, unit));
ui->ValueAtPoint->setText(tr("%1 %2").arg(value, unit));
QString field = ui->Field->currentText();
QString posX = ui->centerX->text();

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>300</width>
<height>156</height>
<height>184</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
@@ -88,8 +88,41 @@
</widget>
</item>
<item>
<widget class="QLabel" name="ValueAtPoint">
</widget>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QLabel" name="ValueAtPointLabel">
<property name="text">
<string>Value:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="ValueAtPoint">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_2">

View File

@@ -270,7 +270,7 @@ bool ViewProviderFemPostFunction::findScaleFactor(double& scale) const
if (bbox.hasVolume()) {
float dx, dy, dz;
bbox.getSize(dx, dy, dz);
// we want the manipulator to have 20 % if the max size of the object
// we want the manipulator to have 20 % of the max size of the object
scale = 0.2 * std::max(std::max(dx, dy), dz);
return true;
}