FEM: Restore and harmonize FEM Task selection hints (#23678)
* FEM: Add hint about selectable geometry types in 'Geometry reference selector' * FEM: Harmonize selection hint in FEM Task dialogs [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci FEM: Add translation support, correct selectable geometry FEM: Harmonize selection hint in FEM Task dialogs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -136,6 +136,13 @@ TaskFemConstraintContact::TaskFemConstraintContact(ViewProviderFemConstraintCont
|
||||
ui->lw_referencesSlave->addItem(makeRefText(Objects[0], SubElements[0]));
|
||||
}
|
||||
|
||||
ui->lbl_info->setText(tr("Select slave geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>; ").arg(tr("Face"))
|
||||
+ tr("click Add or Remove"));
|
||||
ui->lbl_info_2->setText(tr("Select master geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>; ").arg(tr("Face"))
|
||||
+ tr("click Add or Remove"));
|
||||
|
||||
// Selection buttons
|
||||
connect(ui->btnAddSlave,
|
||||
&QToolButton::clicked,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info_2">
|
||||
<property name="text">
|
||||
<string>Select master face, click Add or Remove</string>
|
||||
<string>Select master geometry of type: Face; click Add or Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -76,7 +76,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Select slave face, click Add or Remove</string>
|
||||
<string>Select slave geometry of type: Face; click Add or Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -161,6 +161,9 @@ TaskFemConstraintDisplacement::TaskFemConstraintDisplacement(
|
||||
ui->DisplacementZFormulaCB->setChecked(bStates[8]);
|
||||
ui->FlowForceCB->setChecked(bStates[9]);
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Vertex, Edge, Face")));
|
||||
|
||||
// Selection buttons
|
||||
buttonGroup->addButton(ui->btnAdd, static_cast<int>(SelectionChangeModes::refAdd));
|
||||
buttonGroup->addButton(ui->btnRemove, static_cast<int>(SelectionChangeModes::refRemove));
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select geometric elements</string>
|
||||
<string>Select geometry of type: Vertex, Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -82,6 +82,9 @@ TaskFemConstraintFixed::TaskFemConstraintFixed(ViewProviderFemConstraintFixed* C
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Vertex, Edge, Face")));
|
||||
|
||||
// Selection buttons
|
||||
buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd);
|
||||
buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select geometric elements</string>
|
||||
<string>Select geometry of type: Vertex, Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -370,6 +370,9 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary(
|
||||
ui->buttonDirection->blockSignals(false);
|
||||
ui->checkReverse->blockSignals(false);
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Face")));
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Select multiple faces, click Add or Remove</string>
|
||||
<string>Select geometry of type: Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -86,6 +86,9 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C
|
||||
ui->lineDirection->setText(dir.isEmpty() ? QString() : dir);
|
||||
ui->checkReverse->setChecked(reversed);
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Vertex, Edge, Face")));
|
||||
|
||||
// create a context menu for the listview of the references
|
||||
createActions(ui->listReferences);
|
||||
connect(deleteAction, &QAction::triggered, this, &TaskFemConstraintForce::onReferenceDeleted);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select geometric elements</string>
|
||||
<string>Select geometry of type: Vertex, Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -145,6 +145,9 @@ TaskFemConstraintHeatflux::TaskFemConstraintHeatflux(
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
ui->lbl_references->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Edge, Face")));
|
||||
|
||||
// Selection buttons
|
||||
buttonGroup->addButton(ui->btnAdd, static_cast<int>(SelectionChangeModes::refAdd));
|
||||
buttonGroup->addButton(ui->btnRemove, static_cast<int>(SelectionChangeModes::refRemove));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_references">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select faces</string>
|
||||
<string>Select geometry of type: Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -92,6 +92,9 @@ TaskFemConstraintPlaneRotation::TaskFemConstraintPlaneRotation(
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
ui->lbl_info->setText(tr("Select single geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Face")));
|
||||
|
||||
// Selection buttons
|
||||
connect(ui->btnAdd,
|
||||
&QToolButton::clicked,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Select a single face, click Add or Remove</string>
|
||||
<string>Select single geometry of type: Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -70,6 +70,9 @@ TaskFemConstraintPressure::TaskFemConstraintPressure(
|
||||
bool reversed = pcConstraint->Reversed.getValue();
|
||||
ui->checkBoxReverse->setChecked(reversed);
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Edge, Face")));
|
||||
|
||||
ui->lw_references->clear();
|
||||
for (std::size_t i = 0; i < Objects.size(); i++) {
|
||||
ui->lw_references->addItem(makeRefText(Objects[i], SubElements[i]));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select faces</string>
|
||||
<string>Select geometry of type: Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -248,6 +248,9 @@ TaskFemConstraintRigidBody::TaskFemConstraintRigidBody(
|
||||
buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd);
|
||||
buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove);
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Vertex, Edge, Face")));
|
||||
|
||||
updateUI();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select geometric elements</string>
|
||||
<string>Select geometry of type: Vertex, Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -99,6 +99,9 @@ TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Face")));
|
||||
|
||||
// Selection buttons
|
||||
buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd);
|
||||
buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select faces</string>
|
||||
<string>Select geometry of type: Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -97,6 +97,9 @@ TaskFemConstraintTemperature::TaskFemConstraintTemperature(
|
||||
ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect);
|
||||
}
|
||||
|
||||
ui->lbl_info->setText(tr("Select geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Vertex, Edge, Face")));
|
||||
|
||||
// create a context menu for the listview of the references
|
||||
createActions(ui->lw_references);
|
||||
connect(deleteAction,
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info">
|
||||
<property name="text">
|
||||
<string>Click Add or Remove and select geometric elements</string>
|
||||
<string>Select geometry of type: Vertex, Edge, Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -153,6 +153,9 @@ TaskFemConstraintTransform::TaskFemConstraintTransform(
|
||||
|
||||
ui->lw_Rect->clear();
|
||||
|
||||
ui->lbl_info_2->setText(tr("Select single geometry of type: ")
|
||||
+ QString::fromUtf8("<b>%1</b>").arg(tr("Face")));
|
||||
|
||||
// Transformable surfaces
|
||||
Gui::Command::doCommand(Gui::Command::Doc,
|
||||
TaskFemConstraintTransform::getSurfaceReferences(
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_info_2">
|
||||
<property name="text">
|
||||
<string>Select a face, click Add or Remove</string>
|
||||
<string>Select single geometry of type: Face</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -296,6 +296,13 @@ class GeometryElementsSelection(QtGui.QWidget):
|
||||
# button
|
||||
self.pushButton_Add = QtGui.QPushButton(self.tr("Add"))
|
||||
self.pushButton_Remove = QtGui.QPushButton(self.tr("Remove"))
|
||||
# label
|
||||
self.lb_help = QtGui.QLabel()
|
||||
self.lb_help.setWordWrap(True)
|
||||
selectHelpText = self.tr("Select geometry of type: {}{}{}").format(
|
||||
"<b>", self.sel_elem_text, "</b>"
|
||||
)
|
||||
self.lb_help.setText(selectHelpText)
|
||||
# list
|
||||
self.list_References = QtGui.QListWidget()
|
||||
# radiobutton down the list
|
||||
@@ -314,6 +321,7 @@ class GeometryElementsSelection(QtGui.QWidget):
|
||||
subLayout.addWidget(self.pushButton_Remove)
|
||||
# main layout
|
||||
mainLayout = QtGui.QVBoxLayout()
|
||||
mainLayout.addWidget(self.lb_help)
|
||||
mainLayout.addLayout(subLayout)
|
||||
mainLayout.addWidget(self.list_References)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user