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

Method getInt

librecad/src/main/doc_plugin_interface.cpp:1350–1367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1348}
1349
1350bool Doc_plugin_interface::getInt(int *num, const QString& message, const QString& title){
1351 bool ok;
1352 QString msg, tit;
1353 if ( message.isEmpty() )
1354 msg = QObject::tr("enter an integer number");
1355 else
1356 msg = message;
1357 if ( title.isEmpty() )
1358 tit = QObject::tr("LibreCAD query");
1359 else
1360 tit = title;
1361
1362 int data = QInputDialog::getInt(main_window, tit, msg, 0, -2147483647, 2147483647, 1, &ok);
1363
1364 if (ok)
1365 *num = data;
1366 return ok;
1367}
1368bool Doc_plugin_interface::getReal(qreal *num, const QString& message, const QString& title){
1369 bool ok;
1370 QString msg, tit;

Callers 1

updateVariablesMethod · 0.45

Calls 1

isEmptyMethod · 0.80

Tested by

no test coverage detected