Okular

pagecontroller.cpp
1 /*
2  SPDX-FileCopyrightText: 2007 Pino Toscano <[email protected]>
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 
15 using namespace Okular;
16 
17 PageController::PageController()
18  : QObject()
19 {
20 }
21 
22 PageController::~PageController()
23 {
24 }
25 
26 void PageController::addRotationJob(RotationJob *job)
27 {
28  connect(job, &RotationJob::done, this, &PageController::imageRotationDone);
29  ThreadWeaver::enqueue(&m_weaver, job);
30 }
31 
32 void 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 }
The documentation to the global Okular namespace.
Definition: action.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Mar 23 2023 04:04:24 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.