| 1435 | } |
| 1436 | |
| 1437 | void MainWindow::exportAsFormat(Converter *converter, const QString &filter) |
| 1438 | { |
| 1439 | const QString fileName = FileDialogHelpers::getSaveFileName(this, tr("Export As"), QString(), filter + ";;All files (*)"); |
| 1440 | |
| 1441 | if (fileName.isEmpty()) { |
| 1442 | return; |
| 1443 | } |
| 1444 | |
| 1445 | QFile f(fileName); |
| 1446 | |
| 1447 | f.open(QIODevice::WriteOnly); |
| 1448 | |
| 1449 | QTextStream s(&f); |
| 1450 | converter->convert(s); |
| 1451 | f.close(); |
| 1452 | } |
| 1453 | |
| 1454 | void MainWindow::copyAsFormat(Converter *converter, const QString &mimeType) |
| 1455 | { |