| 1348 | } |
| 1349 | |
| 1350 | bool 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 | } |
| 1368 | bool Doc_plugin_interface::getReal(qreal *num, const QString& message, const QString& title){ |
| 1369 | bool ok; |
| 1370 | QString msg, tit; |
no test coverage detected