| 1383 | return ok; |
| 1384 | } |
| 1385 | bool Doc_plugin_interface::getString(QString *txt, const QString& message, const QString& title){ |
| 1386 | bool ok; |
| 1387 | QString msg, tit; |
| 1388 | if ( message.isEmpty() ) |
| 1389 | msg = QObject::tr("enter text"); |
| 1390 | else |
| 1391 | msg = message; |
| 1392 | if ( title.isEmpty() ) |
| 1393 | tit = QObject::tr("LibreCAD query"); |
| 1394 | else |
| 1395 | tit = title; |
| 1396 | |
| 1397 | QString text = QInputDialog::getText(main_window, tit,msg, QLineEdit::Normal, |
| 1398 | QString(), &ok); |
| 1399 | if (ok && !text.isEmpty()) { |
| 1400 | txt->clear(); |
| 1401 | txt->append(text); |
| 1402 | } |
| 1403 | return ok; |
| 1404 | } |
| 1405 | |
| 1406 | QString Doc_plugin_interface::realToStr(const qreal num, const int units, const int prec){ |
| 1407 | RS2::LinearFormat lf; |
no test coverage detected