MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / TaskPostFrames

Method TaskPostFrames

src/Mod/Fem/Gui/TaskPostBoxes.cpp:557–584  ·  view source on GitHub ↗

Frames

Source from the content-addressed store, hash-verified

555// ***************************************************************************
556// Frames
557TaskPostFrames::TaskPostFrames(ViewProviderFemPostObject* view, QWidget* parent)
558 : TaskPostWidget(view, Gui::BitmapFactory().pixmap("FEM_PostFrames"), QString(), parent)
559 , ui(new Ui_TaskPostFrames)
560{
561 // setup the ui
562 ui->setupUi(this);
563 setWindowTitle(tr("Result Frames"));
564 setupConnections();
565
566 // populate the data
567 auto pipeline = static_cast<Fem::FemPostPipeline*>(getObject());
568 ui->Type->setText(QString::fromStdString(pipeline->getFrameType()));
569
570 auto unit = pipeline->getFrameUnit();
571 auto steps = pipeline->getFrameValues();
572 for (unsigned long i = 0; i < steps.size(); i++) {
573 QTableWidgetItem* idx = new QTableWidgetItem(QString::number(i));
574 QTableWidgetItem* value = new QTableWidgetItem(
575 QString::fromStdString(Base::Quantity(steps[i], unit).getUserString())
576 );
577
578 int rowIdx = ui->FrameTable->rowCount();
579 ui->FrameTable->insertRow(rowIdx);
580 ui->FrameTable->setItem(rowIdx, 0, idx);
581 ui->FrameTable->setItem(rowIdx, 1, value);
582 }
583 ui->FrameTable->selectRow(pipeline->Frame.getValue());
584}
585
586TaskPostFrames::~TaskPostFrames() = default;
587

Callers

nothing calls this directly

Calls 14

pixmapMethod · 0.80
getFrameTypeMethod · 0.80
getFrameUnitMethod · 0.80
insertRowMethod · 0.80
QStringClass · 0.50
getObjectFunction · 0.50
QuantityClass · 0.50
setupUiMethod · 0.45
setTextMethod · 0.45
getFrameValuesMethod · 0.45
sizeMethod · 0.45
getUserStringMethod · 0.45

Tested by

no test coverage detected