| 389 | } |
| 390 | |
| 391 | QString GraphicsViewEnvelop::doubleToString(double value, bool accurate) |
| 392 | { |
| 393 | QString txt = QLocale::system().toString(value, 'f', accurate ? 4 : 3); |
| 394 | while (!txt.isEmpty() && (txt.endsWith("0"))) |
| 395 | txt = txt.left(txt.size() - 1); |
| 396 | if (!txt.isEmpty() && (txt.endsWith(".") || txt.endsWith(","))) |
| 397 | txt = txt.left(txt.size() - 1); |
| 398 | return txt; |
| 399 | } |
| 400 | |
| 401 | void GraphicsViewEnvelop::mousePressEvent(QMouseEvent *event) |
| 402 | { |