DocDiff application: create document report, overlay

This commit is contained in:
Jakub Melka
2021-10-18 16:14:58 +02:00
parent da1efc4ba4
commit 4c12527be0
13 changed files with 257 additions and 29 deletions

View File

@ -23,6 +23,13 @@
#include "pdfdrawspacecontroller.h"
#include "pdfdocumentdrawinterface.h"
#include <QtCore>
namespace pdf
{
class PDFDocumentBuilder;
} // namespace pdf
namespace pdfdocdiff
{
@ -77,6 +84,8 @@ private:
class DifferencesDrawInterface : public pdf::IDocumentDrawInterface
{
Q_DECLARE_TR_FUNCTIONS(pdfdocdiff::DifferencesDrawInterface)
public:
explicit DifferencesDrawInterface(const Settings* settings,
const ComparedDocumentMapper* mapper,
@ -87,8 +96,14 @@ public:
pdf::PDFTextLayoutGetter& layoutGetter,
const QMatrix& pagePointToDevicePointMatrix,
QList<pdf::PDFRenderError>& errors) const override;
virtual void drawPostRendering(QPainter* painter, QRect rect) const override;
/// Draw annotations for differences
/// \param document Document
/// \param builder Builder
void drawAnnotations(const pdf::PDFDocument* document, pdf::PDFDocumentBuilder* builder);
private:
void drawRectangle(QPainter* painter,
const QMatrix& pagePointToDevicePointMatrix,