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

Method PDFDocumentMagnifierView

modules/QtPDF/src/PDFDocumentView.cpp:1650–1671  ·  view source on GitHub ↗

PDFDocumentMagnifierView ========================

Source from the content-addressed store, hash-verified

1648// ========================
1649//
1650PDFDocumentMagnifierView::PDFDocumentMagnifierView(PDFDocumentView *parent /* = nullptr */) :
1651 Super(parent != nullptr ? parent->viewport() : nullptr),
1652 _parent_view(parent)
1653{
1654 // the magnifier should initially be hidden
1655 hide();
1656
1657 // suppress scrollbars
1658 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
1659 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
1660 // suppress any border styling (which doesn't work with a mask, e.g., for a
1661 // circular magnifier)
1662 setFrameShape(QFrame::NoFrame);
1663
1664 if (parent) {
1665 // transfer some settings from the parent view
1666 setBackgroundRole(parent->backgroundRole());
1667 setAlignment(parent->alignment());
1668 }
1669
1670 setShape(_shape);
1671}
1672
1673void PDFDocumentMagnifierView::prepareToShow()
1674{

Callers

nothing calls this directly

Calls 1

viewportMethod · 0.80

Tested by

no test coverage detected