MCPcopy Create free account
hub / github.com/cpvrlab/ImagePlay / createProcessStep

Method createProcessStep

ImagePlay/src/IPProcessGridScene.cpp:266–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266IPProcessStep* IPProcessGridScene::createProcessStep(QString processID, QPointF scenePos)
267{
268 if(processID.length() == 0)
269 return NULL;
270
271 MainWindow* mainWindow = ((IPProcessGrid*) parent())->mainWindow();
272
273 // create process step
274 IPProcessStep* newProcessStep = new IPProcessStep(mainWindow, processID); //(this);
275
276 // calculate relative position
277 QPointF pos = scenePos - QPointF(newProcessStep->boundingRect().width()/2, newProcessStep->boundingRect().height()/2);
278 newProcessStep->setPos(pos);
279 newProcessStep->snapToGrid();
280
281 mainWindow->addStep(newProcessStep);
282
283 return newProcessStep;
284}

Callers

nothing calls this directly

Calls 7

lengthMethod · 0.80
mainWindowMethod · 0.80
widthMethod · 0.80
heightMethod · 0.80
snapToGridMethod · 0.80
boundingRectMethod · 0.45
addStepMethod · 0.45

Tested by

no test coverage detected