Okular

pagecontroller.cpp
1/*
2 SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "pagecontroller_p.h"
8
9// local includes
10#include "page_p.h"
11#include "rotationjob_p.h"
12
13#include <threadweaver/queueing.h>
14
15using namespace Okular;
16
17PageController::PageController()
18 : QObject()
19{
20}
21
22PageController::~PageController()
23{
24}
25
26void PageController::addRotationJob(RotationJob *job)
27{
28 connect(job, &RotationJob::done, this, &PageController::imageRotationDone);
29 ThreadWeaver::enqueue(&m_weaver, job);
30}
31
32void PageController::imageRotationDone(const ThreadWeaver::JobPointer &j)
33{
34 RotationJob *job = static_cast<RotationJob *>(j.data());
35
36 if (job->page()) {
37 job->page()->imageRotationDone(job);
38
39 Q_EMIT rotationFinished(job->page()->m_number, job->page()->m_page);
40 }
41}
global.h
Definition action.h:17
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:50 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.