2021-05-24 09:28:38 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2008 Tobias Koenig <tokoe@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2008-09-19 09:21:20 +00:00
|
|
|
|
|
|
|
#ifndef OKULAR_GENERATOR_FAX_H
|
|
|
|
#define OKULAR_GENERATOR_FAX_H
|
|
|
|
|
|
|
|
#include <core/generator.h>
|
|
|
|
|
2018-08-31 09:23:45 +00:00
|
|
|
#include <QImage>
|
2008-09-19 09:21:20 +00:00
|
|
|
|
2014-05-11 09:17:49 +00:00
|
|
|
#include "faxdocument.h"
|
|
|
|
|
2008-09-19 09:21:20 +00:00
|
|
|
class FaxGenerator : public Okular::Generator
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2015-04-22 12:34:32 +00:00
|
|
|
Q_INTERFACES(Okular::Generator)
|
2008-09-19 09:21:20 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
FaxGenerator(QObject *parent, const QVariantList &args);
|
2019-12-18 11:51:13 +00:00
|
|
|
~FaxGenerator() override;
|
2008-09-19 09:21:20 +00:00
|
|
|
|
2017-03-02 19:39:24 +00:00
|
|
|
bool loadDocument(const QString &fileName, QVector<Okular::Page *> &pagesVector) override;
|
2008-09-19 09:21:20 +00:00
|
|
|
|
2017-03-02 19:39:24 +00:00
|
|
|
Okular::DocumentInfo generateDocumentInfo(const QSet<Okular::DocumentInfo::Key> &keys) const override;
|
2008-09-19 09:21:20 +00:00
|
|
|
|
2021-12-14 22:52:30 +00:00
|
|
|
Okular::Document::PrintError print(QPrinter &printer) override;
|
2008-09-19 09:21:20 +00:00
|
|
|
|
|
|
|
protected:
|
2017-03-02 19:39:24 +00:00
|
|
|
bool doCloseDocument() override;
|
|
|
|
QImage image(Okular::PixmapRequest *request) override;
|
2008-09-19 09:21:20 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QImage m_img;
|
2014-05-11 09:17:49 +00:00
|
|
|
FaxDocument::DocumentType m_type;
|
2008-09-19 09:21:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|