mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
19d98d6a74
find . \( -name "*.cpp" -or -name "*.h" -or -name "*.c" -or -name "*.cc" \) -exec clang-format -i {} \; If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
44 lines
1.3 KiB
C++
44 lines
1.3 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2007 by Pino Toscano <pino@kde.org> *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
***************************************************************************/
|
|
|
|
#include "pagecontroller_p.h"
|
|
|
|
// local includes
|
|
#include "page_p.h"
|
|
#include "rotationjob_p.h"
|
|
|
|
#include <threadweaver/queueing.h>
|
|
|
|
using namespace Okular;
|
|
|
|
PageController::PageController()
|
|
: QObject()
|
|
{
|
|
}
|
|
|
|
PageController::~PageController()
|
|
{
|
|
}
|
|
|
|
void PageController::addRotationJob(RotationJob *job)
|
|
{
|
|
connect(job, &RotationJob::done, this, &PageController::imageRotationDone);
|
|
ThreadWeaver::enqueue(&m_weaver, job);
|
|
}
|
|
|
|
void PageController::imageRotationDone(const ThreadWeaver::JobPointer &j)
|
|
{
|
|
RotationJob *job = static_cast<RotationJob *>(j.data());
|
|
|
|
if (job->page()) {
|
|
job->page()->imageRotationDone(job);
|
|
|
|
emit rotationFinished(job->page()->m_number, job->page()->m_page);
|
|
}
|
|
}
|