MCPcopy Create free account
hub / github.com/LibreCAD/LibreCAD / getEnt

Method getEnt

librecad/src/main/doc_plugin_interface.cpp:1211–1230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1209}
1210
1211Plug_Entity *Doc_plugin_interface::getEnt(const QString& message){
1212 QC_ActionGetEnt* a = new QC_ActionGetEnt(*doc, *gView);
1213 if (a) {
1214 if (!(message.isEmpty()) )
1215 a->setMessage(message);
1216 gView->killAllActions();
1217 gView->setCurrentAction(a);
1218 QEventLoop ev;
1219 while (!a->isCompleted())
1220 {
1221 ev.processEvents ();
1222 if (!gView->getEventHandler()->hasAction())
1223 break;
1224 }
1225 }
1226 Plug_Entity *e = reinterpret_cast<Plug_Entity*>(a->getSelected(this));
1227 a->finish();
1228 gView->killAllActions();
1229 return e;
1230}
1231
1232bool Doc_plugin_interface::getSelect(QList<Plug_Entity *> *sel, const QString& message){
1233 bool status = false;

Callers 5

execCommMethod · 0.45
pickCirclesByClickFunction · 0.45
promptReferenceCircleMethod · 0.45
addEntityMethod · 0.45
removeEntityMethod · 0.45

Calls 9

isEmptyMethod · 0.80
hasActionMethod · 0.80
setMessageMethod · 0.45
killAllActionsMethod · 0.45
setCurrentActionMethod · 0.45
isCompletedMethod · 0.45
getEventHandlerMethod · 0.45
getSelectedMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected