| 22 | namespace QtPDF { |
| 23 | |
| 24 | PDFDocumentWidget::PDFDocumentWidget(QWidget * parent /* = nullptr */, const double dpi /* = -1 */) |
| 25 | : PDFDocumentView(parent) |
| 26 | { |
| 27 | if (dpi > 0) |
| 28 | _dpi = dpi; |
| 29 | else { |
| 30 | #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) |
| 31 | _dpi = QApplication::desktop()->physicalDpiX(); |
| 32 | #else |
| 33 | _dpi = screen()->physicalDotsPerInch(); |
| 34 | #endif |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // Loads the file specified by filename. If this succeeds, the new file is |
| 39 | // displayed and true is returned. Otherwise, the view is not altered and false |
nothing calls this directly
no outgoing calls
no test coverage detected