MCPcopy Create free account
hub / github.com/KDE/gwenview / DocumentViewContainer

Method DocumentViewContainer

lib/documentview/documentviewcontainer.cpp:81–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79};
80
81DocumentViewContainer::DocumentViewContainer(QWidget *parent)
82 : QGraphicsView(parent)
83 , d(new DocumentViewContainerPrivate)
84{
85 d->q = this;
86 d->mScene = new QGraphicsScene(this);
87#ifndef QT_NO_OPENGL
88 if (GwenviewConfig::animationMethod() == DocumentView::GLAnimation) {
89 auto glWidget = new QOpenGLWidget;
90 setViewport(glWidget);
91 }
92#endif
93 setScene(d->mScene);
94 setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
95
96 setFrameStyle(QFrame::NoFrame);
97 setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
98 setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
99
100 d->mLayoutUpdateTimer = new QTimer(this);
101 d->mLayoutUpdateTimer->setInterval(0);
102 d->mLayoutUpdateTimer->setSingleShot(true);
103 connect(d->mLayoutUpdateTimer, &QTimer::timeout, this, &DocumentViewContainer::updateLayout);
104
105 connect(GwenviewConfig::self(), &GwenviewConfig::configChanged, this, &DocumentViewContainer::slotConfigChanged);
106}
107
108DocumentViewContainer::~DocumentViewContainer()
109{

Callers

nothing calls this directly

Calls 1

setIntervalMethod · 0.80

Tested by

no test coverage detected