| 383 | } |
| 384 | |
| 385 | void MainWindow::readSettings() |
| 386 | { |
| 387 | QSettings settings; |
| 388 | QPoint pos = settings.value("pos", QPoint(200, 200)).toPoint(); |
| 389 | QSize size = settings.value("size", QSize(610, 460)).toSize(); |
| 390 | move(pos); |
| 391 | resize(size); |
| 392 | |
| 393 | // Note: theme settings is not stored in hexedit, Optionsdialog handles this directly |
| 394 | |
| 395 | if (settings.contains("AddressArea")) |
| 396 | hexEdit->setAddressArea(settings.value("AddressArea").toBool()); |
| 397 | if (settings.contains("AsciiArea")) |
| 398 | hexEdit->setAsciiArea(settings.value("AsciiArea").toBool()); |
| 399 | if (settings.contains("Highlighting")) |
| 400 | hexEdit->setHighlighting(settings.value("Highlighting").toBool()); |
| 401 | if (settings.contains("OverwriteMode")) |
| 402 | hexEdit->setOverwriteMode(settings.value("OverwriteMode").toBool()); |
| 403 | if (settings.contains("ReadOnly")) |
| 404 | hexEdit->setReadOnly(settings.value("ReadOnly").toBool()); |
| 405 | if (settings.contains("DynamicBytesPerLine")) |
| 406 | hexEdit->setDynamicBytesPerLine(settings.value("DynamicBytesPerLine").toBool()); |
| 407 | if (settings.contains("HighlightingColor")) |
| 408 | hexEdit->setHighlightingColor(settings.value("HighlightingColor").value<QColor>()); |
| 409 | if (settings.contains("AddressAreaWidth")) |
| 410 | hexEdit->setAddressWidth(settings.value("AddressAreaWidth").toInt()); |
| 411 | if (settings.contains("BytesPerLine")) |
| 412 | hexEdit->setBytesPerLine(settings.value("BytesPerLine").toInt()); |
| 413 | if (settings.contains("HexCaps")) |
| 414 | hexEdit->setHexCaps(settings.value("HexCaps").toBool()); |
| 415 | if (settings.contains("WidgetFont")) |
| 416 | hexEdit->setFont(settings.value("WidgetFont").value<QFont>()); |
| 417 | } |
| 418 | |
| 419 | bool MainWindow::saveFile(const QString &fileName) |
| 420 | { |
nothing calls this directly
no test coverage detected