| 150 | } |
| 151 | |
| 152 | void MainWindow::saveToReadableFile() |
| 153 | { |
| 154 | QString fileName = QFileDialog::getSaveFileName(this, tr("Save To Readable File")); |
| 155 | if (!fileName.isEmpty()) |
| 156 | { |
| 157 | QFile file(fileName); |
| 158 | if (!file.open(QFile::WriteOnly | QFile::Text)) { |
| 159 | QMessageBox::warning(this, tr("QHexEdit"), |
| 160 | tr("Cannot write file %1:\n%2.") |
| 161 | .arg(fileName) |
| 162 | .arg(file.errorString())); |
| 163 | return; |
| 164 | } |
| 165 | |
| 166 | QApplication::setOverrideCursor(Qt::WaitCursor); |
| 167 | file.write(hexEdit->toReadableString().toLatin1()); |
| 168 | QApplication::restoreOverrideCursor(); |
| 169 | |
| 170 | statusBar()->showMessage(tr("File saved"), 2000); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | void MainWindow::setAddress(qint64 address) |
| 175 | { |
nothing calls this directly
no test coverage detected