/***
   This file is part of fly-ocr.

   Copyright (C) 2021 LLC "RusBITech-Astra" (https://astralinux.ru)

   Foobar 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 3 of the License, or
   (at your option) any later version.

   Foobar is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with fly-ocr. If not, see <https://www.gnu.org/licenses/>.
***/

#ifndef OUTPUTVIEWERHTML_H
#define OUTPUTVIEWERHTML_H

#include "outputeditor.h"

class QWebEngineView;

class OutputViewerHtml : public OutputEditor
{
    Q_OBJECT
public:
    OutputViewerHtml(QWidget* parent = nullptr);
    ~OutputViewerHtml();

    void read(int pageNumber, const SourceDocumentPage* page) override;
    bool isModified() const override;
    void commit() override;
    void clear() override;
    void setLanguage(const QString& code) override;

    BatchProcessor* createBatchProcessor(const QMap<QString, QVariant>&) const override { return nullptr; }

private:
    QWebEngineView* m_browser;
};

#endif // OUTPUTVIEWERHTML_H
