| 79 | }; |
| 80 | |
| 81 | DocumentViewContainer::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 | |
| 108 | DocumentViewContainer::~DocumentViewContainer() |
| 109 | { |
nothing calls this directly
no test coverage detected