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

Method setDefaultScale

src/PDFDocumentWindow.cpp:1094–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1092}
1093
1094void PDFDocumentWindow::setDefaultScale() {
1095 Tw::Settings settings;
1096 switch (settings.value(QString::fromLatin1("scaleOption"), kDefault_PreviewScaleOption).toInt()) {
1097 case 2:
1098 pdfWidget->zoomFitWidth();
1099 break;
1100 case 3:
1101 pdfWidget->zoomFitWindow();
1102 break;
1103 case 4:
1104 pdfWidget->setZoomLevel(settings.value(QString::fromLatin1("previewScale"), kDefault_PreviewScale).toFloat() / 100.);
1105 break;
1106 case 5:
1107 pdfWidget->zoomFitContentWidth();
1108 break;
1109 default:
1110 pdfWidget->zoom100();
1111 break;
1112 }
1113}
1114
1115void PDFDocumentWindow::maybeOpenUrl(const QUrl & url)
1116{

Callers

nothing calls this directly

Calls 6

zoomFitWidthMethod · 0.80
zoomFitWindowMethod · 0.80
setZoomLevelMethod · 0.80
zoomFitContentWidthMethod · 0.80
zoom100Method · 0.80
valueMethod · 0.45

Tested by

no test coverage detected