Commit 3802257ab32f62e2491053428145f3ab578d312a
Committed by
David Graeff
1 parent
8eec0c4a
Make openhantek compile with Qt5 (drop Qt4 support)
Showing
4 changed files
with
4 additions
and
4 deletions
openhantek/OpenHantek.pro
openhantek/src/dsowidget.cpp
| @@ -445,7 +445,6 @@ bool DsoWidget::exportAs() { | @@ -445,7 +445,6 @@ bool DsoWidget::exportAs() { | ||
| 445 | QStringList filters; | 445 | QStringList filters; |
| 446 | filters | 446 | filters |
| 447 | << tr("Portable Document Format (*.pdf)") | 447 | << tr("Portable Document Format (*.pdf)") |
| 448 | - << tr("PostScript (*.ps)") | ||
| 449 | << tr("Image (*.png *.xpm *.jpg)") | 448 | << tr("Image (*.png *.xpm *.jpg)") |
| 450 | << tr("Comma-Separated Values (*.csv)"); | 449 | << tr("Comma-Separated Values (*.csv)"); |
| 451 | 450 | ||
| @@ -457,7 +456,7 @@ bool DsoWidget::exportAs() { | @@ -457,7 +456,7 @@ bool DsoWidget::exportAs() { | ||
| 457 | 456 | ||
| 458 | Exporter exporter(this->settings, this->dataAnalyzer, static_cast<QWidget *>(this->parent())); | 457 | Exporter exporter(this->settings, this->dataAnalyzer, static_cast<QWidget *>(this->parent())); |
| 459 | exporter.setFilename(fileDialog.selectedFiles().first()); | 458 | exporter.setFilename(fileDialog.selectedFiles().first()); |
| 460 | - exporter.setFormat((ExportFormat) (EXPORT_FORMAT_PDF + filters.indexOf(fileDialog.selectedFilter()))); | 459 | + exporter.setFormat((ExportFormat) (EXPORT_FORMAT_PDF + filters.indexOf(fileDialog.selectedNameFilter()))); |
| 461 | 460 | ||
| 462 | return exporter.doExport(); | 461 | return exporter.doExport(); |
| 463 | } | 462 | } |
openhantek/src/exporter.cpp
| @@ -99,7 +99,7 @@ bool Exporter::doExport() { | @@ -99,7 +99,7 @@ bool Exporter::doExport() { | ||
| 99 | else { | 99 | else { |
| 100 | // Configure the QPrinter | 100 | // Configure the QPrinter |
| 101 | static_cast<QPrinter *>(paintDevice)->setOutputFileName(this->filename); | 101 | static_cast<QPrinter *>(paintDevice)->setOutputFileName(this->filename); |
| 102 | - static_cast<QPrinter *>(paintDevice)->setOutputFormat((this->format == EXPORT_FORMAT_PDF) ? QPrinter::PdfFormat : QPrinter::PostScriptFormat); | 102 | + static_cast<QPrinter *>(paintDevice)->setOutputFormat((this->format == EXPORT_FORMAT_PDF) ? QPrinter::PdfFormat : QPrinter::NativeFormat); |
| 103 | } | 103 | } |
| 104 | } | 104 | } |
| 105 | else { | 105 | else { |
openhantek/src/exporter.h
| @@ -40,7 +40,7 @@ class DataAnalyzer; | @@ -40,7 +40,7 @@ class DataAnalyzer; | ||
| 40 | /// \brief Possible file formats for the export. | 40 | /// \brief Possible file formats for the export. |
| 41 | enum ExportFormat { | 41 | enum ExportFormat { |
| 42 | EXPORT_FORMAT_PRINTER, | 42 | EXPORT_FORMAT_PRINTER, |
| 43 | - EXPORT_FORMAT_PDF, EXPORT_FORMAT_PS, | 43 | + EXPORT_FORMAT_PDF, |
| 44 | EXPORT_FORMAT_IMAGE, | 44 | EXPORT_FORMAT_IMAGE, |
| 45 | EXPORT_FORMAT_CSV | 45 | EXPORT_FORMAT_CSV |
| 46 | }; | 46 | }; |