MCPcopy Create free account
hub / github.com/TeXworks/texworks / PDFDocumentWidget

Method PDFDocumentWidget

modules/QtPDF/src/PDFDocumentWidget.cpp:24–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace QtPDF {
23
24PDFDocumentWidget::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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected