2021-05-24 07:25:56 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2007-03-24 10:47:22 +00:00
|
|
|
|
|
|
|
#ifndef _OKULAR_PAGECONTROLLER_P_H_
|
|
|
|
#define _OKULAR_PAGECONTROLLER_P_H_
|
|
|
|
|
2018-08-31 09:23:45 +00:00
|
|
|
#include <QObject>
|
2007-03-24 10:47:22 +00:00
|
|
|
|
2014-08-09 18:44:25 +00:00
|
|
|
#include <threadweaver/queue.h>
|
2007-07-04 16:55:33 +00:00
|
|
|
|
2007-03-24 10:47:22 +00:00
|
|
|
namespace Okular
|
|
|
|
{
|
|
|
|
class Page;
|
2007-07-04 16:55:33 +00:00
|
|
|
class RotationJob;
|
2007-03-24 10:47:22 +00:00
|
|
|
|
2013-07-30 15:00:32 +00:00
|
|
|
/* There is one PageController per document. It receives notifications of
|
|
|
|
* completed RotationJobs */
|
2007-03-24 10:47:22 +00:00
|
|
|
class PageController : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
PageController();
|
2019-12-18 11:51:13 +00:00
|
|
|
~PageController() override;
|
2007-03-24 10:47:22 +00:00
|
|
|
|
2007-07-04 16:55:33 +00:00
|
|
|
void addRotationJob(RotationJob *job);
|
|
|
|
|
2016-07-11 17:30:31 +00:00
|
|
|
Q_SIGNALS:
|
2009-06-30 17:21:55 +00:00
|
|
|
void rotationFinished(int page, Okular::Page *okularPage);
|
2007-03-24 10:47:22 +00:00
|
|
|
|
2016-07-11 17:30:31 +00:00
|
|
|
private Q_SLOTS:
|
2014-08-09 18:44:25 +00:00
|
|
|
void imageRotationDone(const ThreadWeaver::JobPointer &job);
|
|
|
|
|
|
|
|
private:
|
|
|
|
ThreadWeaver::Queue m_weaver;
|
2007-03-24 10:47:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|