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

Method getReal

librecad/src/main/doc_plugin_interface.cpp:1368–1384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1366 return ok;
1367}
1368bool Doc_plugin_interface::getReal(qreal *num, const QString& message, const QString& title){
1369 bool ok;
1370 QString msg, tit;
1371 if ( message.isEmpty() )
1372 msg = QObject::tr("enter a number");
1373 else
1374 msg = message;
1375 if ( title.isEmpty() )
1376 tit = QObject::tr("LibreCAD query");
1377 else
1378 tit = title;
1379
1380 double data = QInputDialog::getDouble(main_window, tit, msg, 0, -2147483647, 2147483647, 4, &ok);
1381 if (ok )
1382 *num = data;
1383 return ok;
1384}
1385bool Doc_plugin_interface::getString(QString *txt, const QString& message, const QString& title){
1386 bool ok;
1387 QString msg, tit;

Callers 3

promptReferenceCircleMethod · 0.80
opResizeSelectedMethod · 0.80
opFindResizeMethod · 0.80

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected