File indexing completed on 2024-04-28 04:32:44

0001 /*
0002     SPDX-FileCopyrightText: 2007 Pino Toscano <pino@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef _OKULAR_PAGECONTROLLER_P_H_
0008 #define _OKULAR_PAGECONTROLLER_P_H_
0009 
0010 #include <QObject>
0011 
0012 #include <threadweaver/queue.h>
0013 
0014 namespace Okular
0015 {
0016 class Page;
0017 class RotationJob;
0018 
0019 /* There is one PageController per document. It receives notifications of
0020  * completed RotationJobs */
0021 class PageController : public QObject
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     PageController();
0027     ~PageController() override;
0028 
0029     void addRotationJob(RotationJob *job);
0030 
0031 Q_SIGNALS:
0032     void rotationFinished(int page, Okular::Page *okularPage);
0033 
0034 private Q_SLOTS:
0035     void imageRotationDone(const ThreadWeaver::JobPointer &job);
0036 
0037 private:
0038     ThreadWeaver::Queue m_weaver;
0039 };
0040 
0041 }
0042 
0043 #endif