Merge remote-tracking branch 'remotes/origin/branch/pdfdiff-REBASED'
@ -28,7 +28,8 @@ SUBDIRS += \
|
||||
Pdf4QtViewerPlugins \
|
||||
Pdf4QtViewerProfi \
|
||||
Pdf4QtViewerLite \
|
||||
Pdf4QtDocPageOrganizer
|
||||
Pdf4QtDocPageOrganizer \
|
||||
Pdf4QtDocDiff
|
||||
|
||||
CodeGenerator.depends = Pdf4QtLib
|
||||
JBIG2_Viewer.depends = Pdf4QtLib
|
||||
@ -40,3 +41,4 @@ Pdf4QtViewerPlugins.depends = Pdf4QtLib
|
||||
Pdf4QtViewerProfi.depends = Pdf4QtViewer
|
||||
Pdf4QtViewerLite.depends = Pdf4QtViewer
|
||||
Pdf4QtDocPageOrganizer.depends = Pdf4QtLib
|
||||
Pdf4QtDocDiff.depends = Pdf4QtLib
|
||||
|
67
Pdf4QtDocDiff/Pdf4QtDocDiff.pro
Normal file
@ -0,0 +1,67 @@
|
||||
# Copyright (C) 2021 Jakub Melka
|
||||
#
|
||||
# This file is part of PDF4QT.
|
||||
#
|
||||
# PDF4QT is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# with the written consent of the copyright owner, any later version.
|
||||
#
|
||||
# PDF4QT 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 Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
QT += core gui widgets winextras
|
||||
|
||||
TARGET = Pdf4QtDocDiff
|
||||
TEMPLATE = app
|
||||
|
||||
VERSION = 1.0.0
|
||||
|
||||
RC_ICONS = $$PWD/app-icon.ico
|
||||
|
||||
QMAKE_TARGET_DESCRIPTION = "PDF Document Diff"
|
||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2021"
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS
|
||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
||||
|
||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
||||
DESTDIR = $$OUT_PWD/..
|
||||
LIBS += -L$$OUT_PWD/..
|
||||
LIBS += -lPDF4QtLib
|
||||
CONFIG += force_debug_info no_check_exist
|
||||
|
||||
application.files = $$DESTDIR/Pdf4QtDocDiff.exe
|
||||
application.path = $$DESTDIR/install
|
||||
application.CONFIG += no_check_exist
|
||||
INSTALLS += application
|
||||
|
||||
SOURCES += \
|
||||
aboutdialog.cpp \
|
||||
differencesdockwidget.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
settingsdockwidget.cpp \
|
||||
utils.cpp
|
||||
|
||||
FORMS += \
|
||||
aboutdialog.ui \
|
||||
differencesdockwidget.ui \
|
||||
mainwindow.ui \
|
||||
settingsdockwidget.ui
|
||||
|
||||
HEADERS += \
|
||||
aboutdialog.h \
|
||||
differencesdockwidget.h \
|
||||
mainwindow.h \
|
||||
settings.h \
|
||||
settingsdockwidget.h \
|
||||
utils.h
|
||||
|
||||
RESOURCES += \
|
||||
resources.qrc
|
64
Pdf4QtDocDiff/aboutdialog.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "aboutdialog.h"
|
||||
#include "ui_aboutdialog.h"
|
||||
|
||||
#include "pdfutils.h"
|
||||
#include "pdfwidgetutils.h"
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
PDFAboutDialog::PDFAboutDialog(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::PDFAboutDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QString html = ui->copyrightLabel->text();
|
||||
html.replace("PdfForQtViewer", QApplication::applicationDisplayName());
|
||||
ui->copyrightLabel->setText(html);
|
||||
|
||||
std::vector<pdf::PDFDependentLibraryInfo> infos = pdf::PDFDependentLibraryInfo::getLibraryInfo();
|
||||
|
||||
ui->tableWidget->setColumnCount(4);
|
||||
ui->tableWidget->setRowCount(static_cast<int>(infos.size()));
|
||||
ui->tableWidget->setHorizontalHeaderLabels(QStringList() << tr("Library") << tr("Version") << tr("License") << tr("URL"));
|
||||
ui->tableWidget->setEditTriggers(QTableWidget::NoEditTriggers);
|
||||
ui->tableWidget->setSelectionMode(QTableView::SingleSelection);
|
||||
ui->tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
||||
|
||||
for (int i = 0; i < infos.size(); ++i)
|
||||
{
|
||||
const pdf::PDFDependentLibraryInfo& info = infos[i];
|
||||
ui->tableWidget->setItem(i, 0, new QTableWidgetItem(info.library));
|
||||
ui->tableWidget->setItem(i, 1, new QTableWidgetItem(info.version));
|
||||
ui->tableWidget->setItem(i, 2, new QTableWidgetItem(info.license));
|
||||
ui->tableWidget->setItem(i, 3, new QTableWidgetItem(info.url));
|
||||
}
|
||||
|
||||
pdf::PDFWidgetUtils::scaleWidget(this, QSize(750, 600));
|
||||
pdf::PDFWidgetUtils::style(this);
|
||||
}
|
||||
|
||||
PDFAboutDialog::~PDFAboutDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
} // namespace pdfdocdiff
|
45
Pdf4QtDocDiff/aboutdialog.h
Normal file
@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef PDFDOCDIFF_PDFABOUTDIALOG_H
|
||||
#define PDFDOCDIFF_PDFABOUTDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class PDFAboutDialog;
|
||||
}
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
class PDFAboutDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PDFAboutDialog(QWidget* parent);
|
||||
virtual ~PDFAboutDialog() override;
|
||||
|
||||
private:
|
||||
Ui::PDFAboutDialog* ui;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
#endif // PDFDOCDIFF_PDFABOUTDIALOG_H
|
269
Pdf4QtDocDiff/aboutdialog.ui
Normal file
@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>PDFAboutDialog</class>
|
||||
<widget class="QDialog" name="PDFAboutDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>900</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>900</width>
|
||||
<height>600</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="copyrightLabel">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">PdfForQtViewer</span></p><p>Copyright 2018-2021 Jakub Melka. All rights reserved.</p><p>THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p></body></html></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:7.875pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> GNU LESSER GENERAL PUBLIC LICENSE</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Version 3, 29 June 2007</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Copyright (C) 2007 Free Software Foundation, Inc. &lt;https://fsf.org/&gt;</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Everyone is permitted to copy and distribute verbatim copies</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> of this license document, but changing it is not allowed.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> This version of the GNU Lesser General Public License incorporates</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the terms and conditions of version 3 of the GNU General Public</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">License, supplemented by the additional permissions listed below.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 0. Additional Definitions.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> As used herein, &quot;this License&quot; refers to version 3 of the GNU Lesser</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">General Public License, and the &quot;GNU GPL&quot; refers to version 3 of the GNU</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">General Public License.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> &quot;The Library&quot; refers to a covered work governed by this License,</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">other than an Application or a Combined Work as defined below.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> An &quot;Application&quot; is any work that makes use of an interface provided</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">by the Library, but which is not otherwise based on the Library.</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Defining a subclass of a class defined by the Library is deemed a mode</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of using an interface provided by the Library.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> A &quot;Combined Work&quot; is a work produced by combining or linking an</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Application with the Library. The particular version of the Library</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">with which the Combined Work was made is also called the &quot;Linked</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version&quot;.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The &quot;Minimal Corresponding Source&quot; for a Combined Work means the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Corresponding Source for the Combined Work, excluding any source code</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">for portions of the Combined Work that, considered in isolation, are</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">based on the Application, and not on the Linked Version.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The &quot;Corresponding Application Code&quot; for a Combined Work means the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">object code and/or source code for the Application, including any data</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">and utility programs needed for reproducing the Combined Work from the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Application, but excluding the System Libraries of the Combined Work.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 1. Exception to Section 3 of the GNU GPL.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> You may convey a covered work under sections 3 and 4 of this License</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">without being bound by section 3 of the GNU GPL.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 2. Conveying Modified Versions.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> If you modify a copy of the Library, and, in your modifications, a</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">facility refers to a function or data to be supplied by an Application</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">that uses the facility (other than as an argument passed when the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">facility is invoked), then you may convey a copy of the modified</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">version:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) under this License, provided that you make a good faith effort to</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> ensure that, in the event an Application does not supply the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> function or data, the facility still operates, and performs</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> whatever part of its purpose remains meaningful, or</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) under the GNU GPL, with none of the additional permissions of</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> this License applicable to that copy.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 3. Object Code Incorporating Material from Library Header Files.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The object code form of an Application may incorporate material from</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">a header file that is part of the Library. You may convey such object</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">code under terms of your choice, provided that, if the incorporated</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">material is not limited to numerical parameters, data structure</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">layouts and accessors, or small macros, inline functions and templates</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">(ten or fewer lines in length), you do both of the following:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) Give prominent notice with each copy of the object code that the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Library is used in it and that the Library and its use are</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> covered by this License.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) Accompany the object code with a copy of the GNU GPL and this license</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> document.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 4. Combined Works.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> You may convey a Combined Work under terms of your choice that,</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">taken together, effectively do not restrict modification of the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">portions of the Library contained in the Combined Work and reverse</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">engineering for debugging such modifications, if you also do each of</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">the following:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) Give prominent notice with each copy of the Combined Work that</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> the Library is used in it and that the Library and its use are</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> covered by this License.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) Accompany the Combined Work with a copy of the GNU GPL and this license</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> document.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> c) For a Combined Work that displays copyright notices during</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> execution, include the copyright notice for the Library among</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> these notices, as well as a reference directing the user to the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> copies of the GNU GPL and this license document.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> d) Do one of the following:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 0) Convey the Minimal Corresponding Source under the terms of this</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> License, and the Corresponding Application Code in a form</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> suitable for, and under terms that permit, the user to</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> recombine or relink the Application with a modified version of</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> the Linked Version to produce a modified Combined Work, in the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> manner specified by section 6 of the GNU GPL for conveying</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Corresponding Source.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 1) Use a suitable shared library mechanism for linking with the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Library. A suitable mechanism is one that (a) uses at run time</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a copy of the Library already present on the user's computer</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> system, and (b) will operate properly with a modified version</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> of the Library that is interface-compatible with the Linked</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Version.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> e) Provide Installation Information, but only if you would otherwise</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> be required to provide such information under section 6 of the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> GNU GPL, and only to the extent that such information is</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> necessary to install and execute a modified version of the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Combined Work produced by recombining or relinking the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Application with a modified version of the Linked Version. (If</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> you use option 4d0, the Installation Information must accompany</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> the Minimal Corresponding Source and Corresponding Application</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Code. If you use option 4d1, you must provide the Installation</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Information in the manner specified by section 6 of the GNU GPL</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> for conveying Corresponding Source.)</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 5. Combined Libraries.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> You may place library facilities that are a work based on the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Library side by side in a single library together with other library</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">facilities that are not Applications and are not covered by this</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">License, and convey such a combined library under terms of your</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">choice, if you do both of the following:</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> a) Accompany the combined library with a copy of the same work based</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> on the Library, uncombined with any other library facilities,</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> conveyed under the terms of this License.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> b) Give prominent notice with the combined library that part of it</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> is a work based on the Library, and explaining where to find the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> accompanying uncombined form of the same work.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> 6. Revised Versions of the GNU Lesser General Public License.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> The Free Software Foundation may publish revised and/or new versions</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of the GNU Lesser General Public License from time to time. Such new</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">versions will be similar in spirit to the present version, but may</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">differ in detail to address new problems or concerns.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Each version is given a distinguishing version number. If the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Library as you received it specifies that a certain numbered version</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">of the GNU Lesser General Public License &quot;or any later version&quot;</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">applies to it, you have the option of following the terms and</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">conditions either of that published version or of any later version</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">published by the Free Software Foundation. If the Library as you</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">received it does not specify a version number of the GNU Lesser</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">General Public License, you may choose any version of the GNU Lesser</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">General Public License ever published by the Free Software Foundation.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> If the Library as you received it specifies that a proxy can decide</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">whether future versions of the GNU Lesser General Public License shall</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">apply, that proxy's public statement of acceptance of any version is</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">permanent authorization for you to choose that version for the</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Library.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="usedLibrariesLabel">
|
||||
<property name="text">
|
||||
<string>Used libraries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>PDFAboutDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>PDFAboutDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
BIN
Pdf4QtDocDiff/app-icon.ico
Normal file
After Width: | Height: | Size: 251 KiB |
305
Pdf4QtDocDiff/differencesdockwidget.cpp
Normal file
@ -0,0 +1,305 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "differencesdockwidget.h"
|
||||
#include "ui_differencesdockwidget.h"
|
||||
|
||||
#include "pdfdiff.h"
|
||||
#include "pdfwidgetutils.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QPainter>
|
||||
#include <QTreeWidgetItem>
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
DifferenceItemDelegate::DifferenceItemDelegate(QObject* parent) :
|
||||
BaseClass(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DifferenceItemDelegate::paint(QPainter* painter,
|
||||
const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const
|
||||
{
|
||||
BaseClass::paint(painter, option, index);
|
||||
}
|
||||
|
||||
QSize DifferenceItemDelegate::sizeHint(const QStyleOptionViewItem& option,
|
||||
const QModelIndex& index) const
|
||||
{
|
||||
QStyleOptionViewItem adjustedOption = option;
|
||||
|
||||
if (!option.rect.isValid())
|
||||
{
|
||||
// Jakub Melka: Why this? We need to use text wrapping. Unfortunately,
|
||||
// standard delegate needs correct text rectangle (at least rectangle width),
|
||||
// for word wrap calculation. So we must manually calculate rectangle width.
|
||||
// Of course, we cant use visualRect of the tree widget, because of cyclical
|
||||
// dependence.
|
||||
|
||||
const QTreeWidget* treeWidget = qobject_cast<const QTreeWidget*>(option.widget);
|
||||
int xOffset = treeWidget->columnViewportPosition(index.column());
|
||||
int height = option.fontMetrics.lineSpacing();
|
||||
int yOffset = 0;
|
||||
int width = treeWidget->columnWidth(index.column());
|
||||
|
||||
int level = treeWidget->rootIsDecorated() ? 1 : 0;
|
||||
QModelIndex currentIndex = index.parent();
|
||||
while (currentIndex.isValid())
|
||||
{
|
||||
++level;
|
||||
currentIndex = currentIndex.parent();
|
||||
}
|
||||
|
||||
xOffset += level * treeWidget->indentation();
|
||||
adjustedOption.rect = QRect(xOffset, yOffset, width - xOffset, height);
|
||||
}
|
||||
|
||||
return BaseClass::sizeHint(adjustedOption, index);
|
||||
}
|
||||
|
||||
DifferencesDockWidget::DifferencesDockWidget(QWidget* parent,
|
||||
pdf::PDFDiffResult* unfilteredDiffResult,
|
||||
pdf::PDFDiffResult* diffResult,
|
||||
pdf::PDFDiffResultNavigator* diffNavigator,
|
||||
Settings* settings) :
|
||||
QDockWidget(parent),
|
||||
ui(new Ui::DifferencesDockWidget),
|
||||
m_unfilteredDiffResult(unfilteredDiffResult),
|
||||
m_diffResult(diffResult),
|
||||
m_diffNavigator(diffNavigator),
|
||||
m_settings(settings),
|
||||
m_disableChangeSelectedResultIndex(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->differencesTreeWidget->setItemDelegate(new DifferenceItemDelegate(this));
|
||||
ui->differencesTreeWidget->setIconSize(pdf::PDFWidgetUtils::scaleDPI(ui->differencesTreeWidget, QSize(16, 16)));
|
||||
connect(diffNavigator, &pdf::PDFDiffResultNavigator::selectionChanged, this, &DifferencesDockWidget::onSelectionChanged);
|
||||
connect(ui->differencesTreeWidget, &QTreeWidget::currentItemChanged, this, &DifferencesDockWidget::onCurrentItemChanged);
|
||||
|
||||
setMinimumWidth(pdf::PDFWidgetUtils::scaleDPI_x(this, 120));
|
||||
}
|
||||
|
||||
DifferencesDockWidget::~DifferencesDockWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QColor DifferencesDockWidget::getColorForIndex(size_t index) const
|
||||
{
|
||||
QColor color;
|
||||
|
||||
const size_t resultIndex = index;
|
||||
|
||||
if (m_diffResult->isReplaceDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorReplaced;
|
||||
}
|
||||
else if (m_diffResult->isRemoveDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorRemoved;
|
||||
}
|
||||
else if (m_diffResult->isAddDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorAdded;
|
||||
}
|
||||
else if (m_diffResult->isPageMoveDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorPageMove;
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
QModelIndex DifferencesDockWidget::findResultIndex(size_t index) const
|
||||
{
|
||||
QAbstractItemModel* model = ui->differencesTreeWidget->model();
|
||||
const int count = ui->differencesTreeWidget->topLevelItemCount();
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
QModelIndex parentIndex = model->index(i, 0);
|
||||
if (parentIndex.isValid())
|
||||
{
|
||||
const int childCount = model->rowCount(parentIndex);
|
||||
for (int j = 0; j < childCount; ++j)
|
||||
{
|
||||
QModelIndex childIndex = parentIndex.child(j, 0);
|
||||
QVariant data = childIndex.data(Qt::UserRole);
|
||||
if (data.isValid())
|
||||
{
|
||||
if (data.toULongLong() == index)
|
||||
{
|
||||
return childIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return QModelIndex();
|
||||
}
|
||||
|
||||
void DifferencesDockWidget::update()
|
||||
{
|
||||
ui->differencesTreeWidget->clear();
|
||||
|
||||
QList<QTreeWidgetItem*> topItems;
|
||||
|
||||
QLocale locale;
|
||||
|
||||
if (m_diffResult && !m_diffResult->isSame())
|
||||
{
|
||||
std::map<QRgb, QIcon> icons;
|
||||
auto getIcon = [this, &icons](QColor color)
|
||||
{
|
||||
auto it = icons.find(color.rgb());
|
||||
if (it == icons.end())
|
||||
{
|
||||
QPixmap pixmap(ui->differencesTreeWidget->iconSize());
|
||||
pixmap.fill(Qt::transparent);
|
||||
|
||||
QPainter painter(&pixmap);
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
painter.setBrush(QBrush(color));
|
||||
painter.drawEllipse(0, 0, pixmap.width(), pixmap.height());
|
||||
painter.end();
|
||||
|
||||
QIcon icon(pixmap);
|
||||
it = icons.insert(std::make_pair(color.rgb(), std::move(icon))).first;
|
||||
}
|
||||
|
||||
return it->second;
|
||||
};
|
||||
|
||||
const size_t differenceCount = m_diffResult->getDifferencesCount();
|
||||
const size_t unfilteredDifferenceCount = m_unfilteredDiffResult->getDifferencesCount();
|
||||
const size_t hiddenDifferences = unfilteredDifferenceCount - differenceCount;
|
||||
|
||||
if (hiddenDifferences > 0)
|
||||
{
|
||||
ui->infoTextLabel->setText(tr("%1 Differences (+%2 hidden)").arg(differenceCount).arg(hiddenDifferences));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->infoTextLabel->setText(tr("%1 Differences").arg(differenceCount));
|
||||
}
|
||||
|
||||
pdf::PDFInteger lastLeftPageIndex = -1;
|
||||
pdf::PDFInteger lastRightPageIndex = -1;
|
||||
|
||||
for (size_t i = 0; i < differenceCount; ++i)
|
||||
{
|
||||
pdf::PDFInteger pageIndexLeft = m_diffResult->getLeftPage(i);
|
||||
pdf::PDFInteger pageIndexRight = m_diffResult->getRightPage(i);
|
||||
|
||||
if (lastLeftPageIndex != pageIndexLeft ||
|
||||
lastRightPageIndex != pageIndexRight ||
|
||||
topItems.empty())
|
||||
{
|
||||
// Create new top level item
|
||||
QStringList captionParts;
|
||||
captionParts << QString("#%1:").arg(topItems.size() + 1);
|
||||
|
||||
if (pageIndexLeft == pageIndexRight)
|
||||
{
|
||||
captionParts << tr("Page %1").arg(locale.toString(pageIndexLeft + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pageIndexLeft != -1)
|
||||
{
|
||||
captionParts << tr("Left %1").arg(locale.toString(pageIndexLeft + 1));
|
||||
}
|
||||
|
||||
if (pageIndexRight != -1)
|
||||
{
|
||||
captionParts << tr("Right %1").arg(locale.toString(pageIndexRight + 1));
|
||||
}
|
||||
}
|
||||
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(QStringList() << captionParts.join(" "));
|
||||
topItems << item;
|
||||
|
||||
lastLeftPageIndex = pageIndexLeft;
|
||||
lastRightPageIndex = pageIndexRight;
|
||||
}
|
||||
|
||||
Q_ASSERT(!topItems.isEmpty());
|
||||
QTreeWidgetItem* parent = topItems.back();
|
||||
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(parent, QStringList() << m_diffResult->getMessage(i));
|
||||
item->setData(0, Qt::UserRole, i);
|
||||
|
||||
QColor color = getColorForIndex(i);
|
||||
|
||||
if (color.isValid())
|
||||
{
|
||||
item->setData(0, Qt::DecorationRole, getIcon(color));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->infoTextLabel->setText(tr("No Differences Found!"));
|
||||
}
|
||||
|
||||
ui->differencesTreeWidget->addTopLevelItems(topItems);
|
||||
ui->differencesTreeWidget->expandAll();
|
||||
}
|
||||
|
||||
void DifferencesDockWidget::onSelectionChanged(size_t currentIndex)
|
||||
{
|
||||
if (m_disableChangeSelectedResultIndex)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFTemporaryValueChange guard(&m_disableChangeSelectedResultIndex, true);
|
||||
|
||||
QModelIndex index = findResultIndex(currentIndex);
|
||||
if (index.isValid())
|
||||
{
|
||||
ui->differencesTreeWidget->scrollTo(index);
|
||||
ui->differencesTreeWidget->setCurrentIndex(index);
|
||||
}
|
||||
}
|
||||
|
||||
void DifferencesDockWidget::onCurrentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous)
|
||||
{
|
||||
Q_UNUSED(previous);
|
||||
|
||||
if (m_disableChangeSelectedResultIndex || !current)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFTemporaryValueChange guard(&m_disableChangeSelectedResultIndex, true);
|
||||
QVariant data = current->data(0, Qt::UserRole);
|
||||
|
||||
if (data.isValid())
|
||||
{
|
||||
m_diffNavigator->select(data.toULongLong());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace pdfdocdiff
|
89
Pdf4QtDocDiff/differencesdockwidget.h
Normal file
@ -0,0 +1,89 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef DIFFERENCESDOCKWIDGET_H
|
||||
#define DIFFERENCESDOCKWIDGET_H
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <QItemDelegate>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class DifferencesDockWidget;
|
||||
}
|
||||
|
||||
class QTreeWidgetItem;
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
class PDFDiffResult;
|
||||
class PDFDiffResultNavigator;
|
||||
}
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
class DifferenceItemDelegate : public QItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
using BaseClass = QItemDelegate;
|
||||
|
||||
public:
|
||||
DifferenceItemDelegate(QObject* parent);
|
||||
|
||||
virtual void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
virtual QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
};
|
||||
|
||||
class DifferencesDockWidget : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit DifferencesDockWidget(QWidget* parent,
|
||||
pdf::PDFDiffResult* unfilteredDiffResult,
|
||||
pdf::PDFDiffResult* diffResult,
|
||||
pdf::PDFDiffResultNavigator* diffNavigator,
|
||||
Settings* settings);
|
||||
virtual ~DifferencesDockWidget() override;
|
||||
|
||||
void update();
|
||||
|
||||
private slots:
|
||||
void onSelectionChanged(size_t currentIndex);
|
||||
void onCurrentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
|
||||
|
||||
private:
|
||||
Ui::DifferencesDockWidget* ui;
|
||||
|
||||
QColor getColorForIndex(size_t index) const;
|
||||
QModelIndex findResultIndex(size_t index) const;
|
||||
|
||||
pdf::PDFDiffResult* m_unfilteredDiffResult;
|
||||
pdf::PDFDiffResult* m_diffResult;
|
||||
pdf::PDFDiffResultNavigator* m_diffNavigator;
|
||||
Settings* m_settings;
|
||||
bool m_disableChangeSelectedResultIndex;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
#endif // DIFFERENCESDOCKWIDGET_H
|
55
Pdf4QtDocDiff/differencesdockwidget.ui
Normal file
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DifferencesDockWidget</class>
|
||||
<widget class="QDockWidget" name="DifferencesDockWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>562</width>
|
||||
<height>537</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Differences</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="infoTextLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>16</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTreeWidget" name="differencesTreeWidget">
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
47
Pdf4QtDocDiff/main.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "pdfconstants.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication::setAttribute(Qt::AA_CompressHighFrequencyEvents, true);
|
||||
QApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||
QApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity, true);
|
||||
QApplication application(argc, argv);
|
||||
|
||||
QCoreApplication::setOrganizationName("MelkaJ");
|
||||
QCoreApplication::setApplicationName("PDF4QT Document Diff");
|
||||
QCoreApplication::setApplicationVersion(pdf::PDF_LIBRARY_VERSION);
|
||||
QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Document Diff"));
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QCoreApplication::applicationName());
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
parser.addPositionalArgument("file1", "The PDF file to be compared.");
|
||||
parser.addPositionalArgument("file2", "The PDF file to be compared.");
|
||||
parser.process(application);
|
||||
|
||||
pdfdocdiff::MainWindow mainWindow(nullptr);
|
||||
mainWindow.show();
|
||||
|
||||
return application.exec();
|
||||
}
|
863
Pdf4QtDocDiff/mainwindow.cpp
Normal file
@ -0,0 +1,863 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
#include "aboutdialog.h"
|
||||
#include "differencesdockwidget.h"
|
||||
#include "settingsdockwidget.h"
|
||||
|
||||
#include "pdfwidgetutils.h"
|
||||
#include "pdfdocumentreader.h"
|
||||
#include "pdfdrawspacecontroller.h"
|
||||
#include "pdfdocumentmanipulator.h"
|
||||
#include "pdfdocumentbuilder.h"
|
||||
#include "pdfdocumentwriter.h"
|
||||
|
||||
#include <QToolBar>
|
||||
#include <QDesktopWidget>
|
||||
#include <QDesktopServices>
|
||||
#include <QMessageBox>
|
||||
#include <QInputDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
MainWindow::MainWindow(QWidget* parent) :
|
||||
QMainWindow(parent),
|
||||
ui(new Ui::MainWindow),
|
||||
m_progress(new pdf::PDFProgress(this)),
|
||||
m_taskbarButton(new QWinTaskbarButton(this)),
|
||||
m_progressTaskbarIndicator(nullptr),
|
||||
m_cmsManager(nullptr),
|
||||
m_pdfWidget(nullptr),
|
||||
m_settingsDockWidget(nullptr),
|
||||
m_differencesDockWidget(nullptr),
|
||||
m_optionalContentActivity(nullptr),
|
||||
m_diff(nullptr),
|
||||
m_isChangingProgressStep(false),
|
||||
m_dontDisplayErrorMessage(false),
|
||||
m_diffNavigator(nullptr),
|
||||
m_drawInterface(&m_settings, &m_documentMapper, &m_filteredDiffResult)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setMinimumSize(pdf::PDFWidgetUtils::scaleDPI(this, QSize(800, 600)));
|
||||
|
||||
// Initialize task bar progress
|
||||
m_progressTaskbarIndicator = m_taskbarButton->progress();
|
||||
|
||||
m_settingsDockWidget = new SettingsDockWidget(&m_settings, this);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, m_settingsDockWidget);;
|
||||
connect(m_settingsDockWidget, &SettingsDockWidget::colorsChanged, this, &MainWindow::onColorsChanged);
|
||||
connect(m_settingsDockWidget, &SettingsDockWidget::transparencySliderChanged, this, &MainWindow::updateOverlayTransparency);
|
||||
|
||||
m_differencesDockWidget = new DifferencesDockWidget(this, &m_diffResult, &m_filteredDiffResult, &m_diffNavigator, &m_settings);
|
||||
addDockWidget(Qt::LeftDockWidgetArea, m_differencesDockWidget);
|
||||
|
||||
ui->documentFrame->setLayout(new QVBoxLayout);
|
||||
|
||||
m_cmsManager = new pdf::PDFCMSManager(this);
|
||||
m_pdfWidget = new pdf::PDFWidget(m_cmsManager, pdf::RendererEngine::Software, 1, ui->documentFrame);
|
||||
m_pdfWidget->getDrawWidgetProxy()->setProgress(m_progress);
|
||||
ui->documentFrame->layout()->addWidget(m_pdfWidget);
|
||||
m_pdfWidget->getDrawWidgetProxy()->registerDrawInterface(&m_drawInterface);
|
||||
|
||||
ui->menuView->addSeparator();
|
||||
ui->menuView->addAction(m_settingsDockWidget->toggleViewAction());
|
||||
ui->menuView->addAction(m_differencesDockWidget->toggleViewAction());
|
||||
|
||||
ui->actionGet_Source->setData(int(Operation::GetSource));
|
||||
ui->actionAbout->setData(int(Operation::About));
|
||||
ui->actionOpen_Left->setData(int(Operation::OpenLeft));
|
||||
ui->actionOpen_Right->setData(int(Operation::OpenRight));
|
||||
ui->actionCompare->setData(int(Operation::Compare));
|
||||
ui->actionClose->setData(int(Operation::Close));
|
||||
ui->actionPrevious_Difference->setData(int(Operation::PreviousDifference));
|
||||
ui->actionNext_Difference->setData(int(Operation::NextDifference));
|
||||
ui->actionCreate_Compare_Report->setData(int(Operation::CreateCompareReport));
|
||||
ui->actionFilter_Text->setData(int(Operation::FilterText));
|
||||
ui->actionFilter_Vector_Graphics->setData(int(Operation::FilterVectorGraphics));
|
||||
ui->actionFilter_Images->setData(int(Operation::FilterImages));
|
||||
ui->actionFilter_Shading->setData(int(Operation::FilterShading));
|
||||
ui->actionFilter_Page_Movement->setData(int(Operation::FilterPageMovement));
|
||||
ui->actionView_Differences->setData(int(Operation::ViewDifferences));
|
||||
ui->actionView_Left->setData(int(Operation::ViewLeft));
|
||||
ui->actionView_Right->setData(int(Operation::ViewRight));
|
||||
ui->actionView_Overlay->setData(int(Operation::ViewOverlay));
|
||||
ui->actionShow_Pages_with_Differences->setData(int(Operation::ShowPageswithDifferences));
|
||||
ui->actionSave_Differences_to_XML->setData(int(Operation::SaveDifferencesToXML));
|
||||
ui->actionDisplay_Differences->setData(int(Operation::DisplayDifferences));
|
||||
ui->actionDisplay_Markers->setData(int(Operation::DisplayMarkers));
|
||||
|
||||
ui->actionSynchronize_View_with_Differences->setChecked(true);
|
||||
|
||||
QActionGroup* actionGroup = new QActionGroup(this);
|
||||
actionGroup->setExclusionPolicy(QActionGroup::ExclusionPolicy::Exclusive);
|
||||
actionGroup->addAction(ui->actionView_Differences);
|
||||
actionGroup->addAction(ui->actionView_Left);
|
||||
actionGroup->addAction(ui->actionView_Right);
|
||||
actionGroup->addAction(ui->actionView_Overlay);
|
||||
ui->actionView_Differences->setChecked(true);
|
||||
|
||||
QToolBar* mainToolbar = addToolBar(tr("Main"));
|
||||
mainToolbar->setObjectName("main_toolbar");
|
||||
mainToolbar->addActions({ ui->actionOpen_Left, ui->actionOpen_Right });
|
||||
mainToolbar->addSeparator();
|
||||
mainToolbar->addAction(ui->actionCompare);
|
||||
mainToolbar->addAction(ui->actionCreate_Compare_Report);
|
||||
mainToolbar->addAction(ui->actionSave_Differences_to_XML);
|
||||
|
||||
QToolBar* differencesToolbar = addToolBar(tr("Differences"));
|
||||
differencesToolbar->setObjectName("differences_toolbar");
|
||||
differencesToolbar->addActions({ ui->actionPrevious_Difference, ui->actionNext_Difference });
|
||||
|
||||
QToolBar* viewToolbar = addToolBar(tr("View"));
|
||||
viewToolbar->setObjectName("view_toolbar");
|
||||
viewToolbar->addActions({ ui->actionView_Differences, ui->actionView_Left, ui->actionView_Right, ui->actionView_Overlay });
|
||||
viewToolbar->addSeparator();
|
||||
viewToolbar->addActions({ ui->actionShow_Pages_with_Differences, ui->actionSynchronize_View_with_Differences });
|
||||
viewToolbar->addSeparator();
|
||||
viewToolbar->addActions({ ui->actionFilter_Text, ui->actionFilter_Vector_Graphics, ui->actionFilter_Images, ui->actionFilter_Shading, ui->actionFilter_Page_Movement });
|
||||
|
||||
QSize iconSize = pdf::PDFWidgetUtils::scaleDPI(this, QSize(24, 24));
|
||||
auto toolbars = findChildren<QToolBar*>();
|
||||
for (QToolBar* toolbar : toolbars)
|
||||
{
|
||||
toolbar->setIconSize(iconSize);
|
||||
ui->menuToolbars->addAction(toolbar->toggleViewAction());
|
||||
}
|
||||
|
||||
connect(&m_mapper, QOverload<int>::of(&QSignalMapper::mapped), this, &MainWindow::onMappedActionTriggered);
|
||||
|
||||
QList<QAction*> actions = findChildren<QAction*>();
|
||||
for (QAction* action : actions)
|
||||
{
|
||||
QVariant actionData = action->data();
|
||||
if (actionData.isValid())
|
||||
{
|
||||
connect(action, &QAction::triggered, &m_mapper, QOverload<>::of(&QSignalMapper::map));
|
||||
m_mapper.setMapping(action, actionData.toInt());
|
||||
}
|
||||
}
|
||||
|
||||
connect(m_progress, &pdf::PDFProgress::progressStarted, this, &MainWindow::onProgressStarted);
|
||||
connect(m_progress, &pdf::PDFProgress::progressStep, this, &MainWindow::onProgressStep);
|
||||
connect(m_progress, &pdf::PDFProgress::progressFinished, this, &MainWindow::onProgressFinished);
|
||||
|
||||
m_diff.setProgress(m_progress);
|
||||
m_diff.setOption(pdf::PDFDiff::Asynchronous, true);
|
||||
connect(&m_diff, &pdf::PDFDiff::comparationFinished, this, &MainWindow::onComparationFinished);
|
||||
|
||||
m_diff.setLeftDocument(&m_leftDocument);
|
||||
m_diff.setRightDocument(&m_rightDocument);
|
||||
|
||||
m_diffNavigator.setResult(&m_filteredDiffResult);
|
||||
connect(&m_diffNavigator, &pdf::PDFDiffResultNavigator::selectionChanged, this, &MainWindow::onSelectionChanged);
|
||||
|
||||
loadSettings();
|
||||
updateAll(false);
|
||||
updateOverlayTransparency();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
saveSettings();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::showEvent(QShowEvent* event)
|
||||
{
|
||||
Q_UNUSED(event);
|
||||
m_taskbarButton->setWindow(windowHandle());
|
||||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
BaseClass::closeEvent(event);
|
||||
m_diff.stop();
|
||||
}
|
||||
|
||||
void MainWindow::onMappedActionTriggered(int actionId)
|
||||
{
|
||||
performOperation(static_cast<Operation>(actionId));
|
||||
}
|
||||
|
||||
void MainWindow::onComparationFinished()
|
||||
{
|
||||
clear(false, false);
|
||||
|
||||
m_diffResult = m_diff.getResult();
|
||||
|
||||
if (!m_dontDisplayErrorMessage)
|
||||
{
|
||||
if (!m_diffResult.getResult())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), m_diffResult.getResult().getErrorMessage());
|
||||
}
|
||||
if (m_diffResult.isSame())
|
||||
{
|
||||
QMessageBox::information(this, tr("Info"), tr("No differences found between the compared documents."), QMessageBox::Ok);
|
||||
}
|
||||
}
|
||||
|
||||
// Create merged document
|
||||
pdf::PDFDocumentManipulator manipulator;
|
||||
manipulator.setOutlineMode(pdf::PDFDocumentManipulator::OutlineMode::NoOutline);
|
||||
manipulator.addDocument(1, &m_leftDocument);
|
||||
manipulator.addDocument(2, &m_rightDocument);
|
||||
|
||||
pdf::PDFDocumentManipulator::AssembledPages assembledPages1 = pdf::PDFDocumentManipulator::createAllDocumentPages(1, &m_leftDocument);
|
||||
pdf::PDFDocumentManipulator::AssembledPages assembledPages2 = pdf::PDFDocumentManipulator::createAllDocumentPages(2, &m_rightDocument);
|
||||
assembledPages1.insert(assembledPages1.end(), std::make_move_iterator(assembledPages2.begin()), std::make_move_iterator(assembledPages2.end()));
|
||||
|
||||
if (manipulator.assemble(assembledPages1))
|
||||
{
|
||||
m_combinedDocument = manipulator.takeAssembledDocument();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_combinedDocument = pdf::PDFDocument();
|
||||
}
|
||||
|
||||
updateAll(true);
|
||||
}
|
||||
|
||||
void MainWindow::onColorsChanged()
|
||||
{
|
||||
updateFilteredResult();
|
||||
m_pdfWidget->update();
|
||||
}
|
||||
|
||||
void MainWindow::updateActions()
|
||||
{
|
||||
QList<QAction*> actions = findChildren<QAction*>();
|
||||
for (QAction* action : actions)
|
||||
{
|
||||
QVariant actionData = action->data();
|
||||
if (actionData.isValid())
|
||||
{
|
||||
bool canPerformAction = canPerformOperation(static_cast<Operation>(actionData.toInt()));
|
||||
action->setEnabled(canPerformAction);
|
||||
|
||||
if (!canPerformAction && action->isCheckable())
|
||||
{
|
||||
action->setChecked(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onSelectionChanged(size_t currentIndex)
|
||||
{
|
||||
if (ui->actionSynchronize_View_with_Differences->isChecked())
|
||||
{
|
||||
pdf::PDFInteger destinationPage = -1;
|
||||
|
||||
if (destinationPage == -1)
|
||||
{
|
||||
pdf::PDFInteger leftPageIndex = m_filteredDiffResult.getLeftPage(currentIndex);
|
||||
if (leftPageIndex != -1)
|
||||
{
|
||||
destinationPage = m_documentMapper.getPageIndexFromLeftPageIndex(leftPageIndex);
|
||||
}
|
||||
}
|
||||
|
||||
if (destinationPage == -1)
|
||||
{
|
||||
pdf::PDFInteger rightPageIndex = m_filteredDiffResult.getRightPage(currentIndex);
|
||||
if (rightPageIndex != -1)
|
||||
{
|
||||
destinationPage = m_documentMapper.getPageIndexFromRightPageIndex(rightPageIndex);
|
||||
}
|
||||
}
|
||||
|
||||
if (destinationPage != -1)
|
||||
{
|
||||
m_pdfWidget->getDrawWidgetProxy()->goToPage(destinationPage);
|
||||
}
|
||||
}
|
||||
|
||||
updateActions();
|
||||
}
|
||||
|
||||
void MainWindow::loadSettings()
|
||||
{
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
|
||||
settings.beginGroup("MainWindow");
|
||||
QByteArray geometry = settings.value("geometry", QByteArray()).toByteArray();
|
||||
if (geometry.isEmpty())
|
||||
{
|
||||
QRect availableGeometry = QApplication::desktop()->availableGeometry(this);
|
||||
QRect windowRect(0, 0, availableGeometry.width() / 2, availableGeometry.height() / 2);
|
||||
windowRect = windowRect.translated(availableGeometry.center() - windowRect.center());
|
||||
setGeometry(windowRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
restoreGeometry(geometry);
|
||||
}
|
||||
|
||||
QByteArray state = settings.value("windowState", QByteArray()).toByteArray();
|
||||
if (!state.isEmpty())
|
||||
{
|
||||
restoreState(state);
|
||||
}
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Settings");
|
||||
m_settings.directory = settings.value("directory").toString();
|
||||
m_settings.colorPageMove = settings.value("colorPageMove", m_settings.colorPageMove).value<QColor>();
|
||||
m_settings.colorAdded = settings.value("colorAdded", m_settings.colorAdded).value<QColor>();
|
||||
m_settings.colorRemoved = settings.value("colorRemoved", m_settings.colorRemoved).value<QColor>();
|
||||
m_settings.colorReplaced = settings.value("colorReplaced", m_settings.colorReplaced).value<QColor>();
|
||||
m_settings.displayDifferences = settings.value("displayDifferences", m_settings.displayDifferences).toBool();
|
||||
m_settings.displayMarkers = settings.value("displayMarkers", m_settings.displayDifferences).toBool();
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Compare");
|
||||
m_settingsDockWidget->setCompareTextsAsVectorGraphics(settings.value("compareTextsAsVectorGraphics", false).toBool());
|
||||
m_settingsDockWidget->setCompareTextCharactersInsteadOfWords(settings.value("compareTextCharactersInsteadOfWords", false).toBool());
|
||||
settings.endGroup();
|
||||
|
||||
ui->actionDisplay_Differences->setChecked(m_settings.displayDifferences);
|
||||
ui->actionDisplay_Markers->setChecked(m_settings.displayMarkers);
|
||||
|
||||
m_settingsDockWidget->loadColors();
|
||||
}
|
||||
|
||||
void MainWindow::saveSettings()
|
||||
{
|
||||
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::organizationName(), QCoreApplication::applicationName());
|
||||
settings.beginGroup("MainWindow");
|
||||
settings.setValue("geometry", saveGeometry());
|
||||
settings.setValue("windowState", saveState());
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Settings");
|
||||
settings.setValue("directory", m_settings.directory);
|
||||
settings.setValue("colorPageMove", m_settings.colorPageMove);
|
||||
settings.setValue("colorAdded", m_settings.colorAdded);
|
||||
settings.setValue("colorRemoved", m_settings.colorRemoved);
|
||||
settings.setValue("colorReplaced", m_settings.colorReplaced);
|
||||
settings.setValue("displayDifferences", m_settings.displayDifferences);
|
||||
settings.setValue("displayMarkers", m_settings.displayMarkers);
|
||||
settings.endGroup();
|
||||
|
||||
settings.beginGroup("Compare");
|
||||
settings.setValue("compareTextsAsVectorGraphics", m_settingsDockWidget->isCompareTextAsVectorGraphics());
|
||||
settings.setValue("compareTextCharactersInsteadOfWords", m_settingsDockWidget->isCompareTextCharactersInsteadOfWords());
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
bool MainWindow::canPerformOperation(Operation operation) const
|
||||
{
|
||||
switch (operation)
|
||||
{
|
||||
case Operation::OpenLeft:
|
||||
case Operation::OpenRight:
|
||||
case Operation::Compare:
|
||||
case Operation::Close:
|
||||
case Operation::GetSource:
|
||||
case Operation::About:
|
||||
return true;
|
||||
|
||||
case Operation::ViewDifferences:
|
||||
case Operation::ViewLeft:
|
||||
case Operation::ViewRight:
|
||||
case Operation::ViewOverlay:
|
||||
return true; // Allow always to change a view
|
||||
|
||||
case Operation::FilterText:
|
||||
return m_diffResult.hasTextDifferences();
|
||||
|
||||
case Operation::FilterVectorGraphics:
|
||||
return m_diffResult.hasVectorGraphicsDifferences();
|
||||
|
||||
case Operation::FilterImages:
|
||||
return m_diffResult.hasImageDifferences();
|
||||
|
||||
case Operation::FilterShading:
|
||||
return m_diffResult.hasShadingDifferences();
|
||||
|
||||
case Operation::FilterPageMovement:
|
||||
return m_diffResult.hasPageMoveDifferences();
|
||||
|
||||
case Operation::PreviousDifference:
|
||||
return m_diffNavigator.canGoPrevious();
|
||||
|
||||
case Operation::NextDifference:
|
||||
return m_diffNavigator.canGoNext();
|
||||
|
||||
case Operation::CreateCompareReport:
|
||||
case Operation::SaveDifferencesToXML:
|
||||
return m_filteredDiffResult.isChanged();
|
||||
|
||||
case Operation::ShowPageswithDifferences:
|
||||
return m_diffResult.isChanged();
|
||||
|
||||
case Operation::DisplayDifferences:
|
||||
case Operation::DisplayMarkers:
|
||||
return true;
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void MainWindow::performOperation(Operation operation)
|
||||
{
|
||||
switch (operation)
|
||||
{
|
||||
case Operation::OpenLeft:
|
||||
{
|
||||
pdf::PDFTemporaryValueChange guard(&m_dontDisplayErrorMessage, true);
|
||||
m_diff.stop();
|
||||
|
||||
std::optional<pdf::PDFDocument> document = openDocument();
|
||||
if (document)
|
||||
{
|
||||
clear(true, false);
|
||||
m_leftDocument = std::move(*document);
|
||||
|
||||
const size_t pageCount = m_leftDocument.getCatalog()->getPageCount();
|
||||
if (pageCount > 1)
|
||||
{
|
||||
m_settingsDockWidget->getLeftPageSelectionEdit()->setText(QString("1-%2").arg(pageCount));
|
||||
}
|
||||
else if (pageCount == 1)
|
||||
{
|
||||
m_settingsDockWidget->getLeftPageSelectionEdit()->setText("1");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settingsDockWidget->getLeftPageSelectionEdit()->clear();
|
||||
}
|
||||
|
||||
updateViewDocument();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::OpenRight:
|
||||
{
|
||||
pdf::PDFTemporaryValueChange guard(&m_dontDisplayErrorMessage, true);
|
||||
m_diff.stop();
|
||||
|
||||
std::optional<pdf::PDFDocument> document = openDocument();
|
||||
if (document)
|
||||
{
|
||||
clear(false, true);
|
||||
m_rightDocument = std::move(*document);
|
||||
|
||||
const size_t pageCount = m_rightDocument.getCatalog()->getPageCount();
|
||||
if (pageCount > 1)
|
||||
{
|
||||
m_settingsDockWidget->getRightPageSelectionEdit()->setText(QString("1-%2").arg(pageCount));
|
||||
}
|
||||
else if (pageCount == 1)
|
||||
{
|
||||
m_settingsDockWidget->getRightPageSelectionEdit()->setText("1");
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settingsDockWidget->getRightPageSelectionEdit()->clear();
|
||||
}
|
||||
|
||||
updateViewDocument();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::Compare:
|
||||
{
|
||||
pdf::PDFTemporaryValueChange guard(&m_dontDisplayErrorMessage, true);
|
||||
m_diff.stop();
|
||||
|
||||
m_diff.setOption(pdf::PDFDiff::CompareTextsAsVector, m_settingsDockWidget->isCompareTextAsVectorGraphics());
|
||||
m_diff.setOption(pdf::PDFDiff::CompareWords, !m_settingsDockWidget->isCompareTextCharactersInsteadOfWords());
|
||||
|
||||
QString errorMessage;
|
||||
|
||||
pdf::PDFClosedIntervalSet rightPageIndices;
|
||||
pdf::PDFClosedIntervalSet leftPageIndices = pdf::PDFClosedIntervalSet::parse(1, qMax<pdf::PDFInteger>(1, m_leftDocument.getCatalog()->getPageCount()), m_settingsDockWidget->getLeftPageSelectionEdit()->text(), &errorMessage);
|
||||
|
||||
if (errorMessage.isEmpty())
|
||||
{
|
||||
rightPageIndices = pdf::PDFClosedIntervalSet::parse(1, qMax<pdf::PDFInteger>(1, m_rightDocument.getCatalog()->getPageCount()), m_settingsDockWidget->getRightPageSelectionEdit()->text(), &errorMessage);
|
||||
}
|
||||
|
||||
// Check if pages are succesfully parsed
|
||||
if (!errorMessage.isEmpty())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), errorMessage);
|
||||
break;
|
||||
}
|
||||
|
||||
leftPageIndices.translate(-1);
|
||||
rightPageIndices.translate(-1);
|
||||
|
||||
m_diff.setPagesForLeftDocument(std::move(leftPageIndices));
|
||||
m_diff.setPagesForRightDocument(std::move(rightPageIndices));
|
||||
|
||||
m_diff.start();
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::Close:
|
||||
{
|
||||
close();
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::GetSource:
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/JakubMelka/PDF4QT"));
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::About:
|
||||
{
|
||||
PDFAboutDialog aboutDialog(this);
|
||||
aboutDialog.exec();
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::PreviousDifference:
|
||||
m_diffNavigator.goPrevious();
|
||||
break;
|
||||
|
||||
case Operation::NextDifference:
|
||||
m_diffNavigator.goNext();
|
||||
break;
|
||||
|
||||
case Operation::FilterText:
|
||||
case Operation::FilterVectorGraphics:
|
||||
case Operation::FilterImages:
|
||||
case Operation::FilterShading:
|
||||
case Operation::FilterPageMovement:
|
||||
{
|
||||
updateFilteredResult();
|
||||
|
||||
if (ui->actionShow_Pages_with_Differences->isChecked())
|
||||
{
|
||||
updateCustomPageLayout();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::ViewDifferences:
|
||||
case Operation::ViewLeft:
|
||||
case Operation::ViewRight:
|
||||
case Operation::ViewOverlay:
|
||||
updateViewDocument();
|
||||
break;
|
||||
|
||||
case Operation::ShowPageswithDifferences:
|
||||
updateCustomPageLayout();
|
||||
break;
|
||||
|
||||
case Operation::DisplayDifferences:
|
||||
m_settings.displayDifferences = ui->actionDisplay_Differences->isChecked();
|
||||
m_pdfWidget->update();
|
||||
break;
|
||||
|
||||
case Operation::DisplayMarkers:
|
||||
m_settings.displayMarkers = ui->actionDisplay_Markers->isChecked();
|
||||
m_pdfWidget->update();
|
||||
break;
|
||||
|
||||
case Operation::SaveDifferencesToXML:
|
||||
{
|
||||
if (!m_filteredDiffResult.isSame())
|
||||
{
|
||||
QString fileName = QFileDialog::getSaveFileName(this, tr("Select PDF document"), m_settings.directory, tr("XML file (*.xml)"));
|
||||
if (!fileName.isEmpty())
|
||||
{
|
||||
QFile file(fileName);
|
||||
if (file.open(QFile::WriteOnly | QFile::Truncate))
|
||||
{
|
||||
m_filteredDiffResult.saveToXML(&file);
|
||||
file.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("File '%1' cannot be opened. %2").arg(fileName, file.errorString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Save results to XML"), tr("Displayed results are empty. Cannot save empty results."));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case Operation::CreateCompareReport:
|
||||
{
|
||||
if (m_filteredDiffResult.isSame())
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
QString saveFileName = QFileDialog::getSaveFileName(this, tr("Save As"), m_settings.directory, tr("Portable Document (*.pdf);;All files (*.*)"));
|
||||
if (!saveFileName.isEmpty())
|
||||
{
|
||||
pdf::PDFDocumentBuilder builder(m_pdfWidget->getDrawWidgetProxy()->getDocument());
|
||||
m_drawInterface.drawAnnotations(m_pdfWidget->getDrawWidgetProxy()->getDocument(), &builder);
|
||||
|
||||
pdf::PDFDocument document = builder.build();
|
||||
pdf::PDFDocumentWriter writer(m_progress);
|
||||
pdf::PDFOperationResult result = writer.write(saveFileName, &document, QFile::exists(saveFileName));
|
||||
if (!result)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), result.getErrorMessage());
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateActions();
|
||||
}
|
||||
|
||||
void MainWindow::setViewDocument(pdf::PDFDocument* document, bool updateCustomPageLayout)
|
||||
{
|
||||
if (document != m_pdfWidget->getDrawWidgetProxy()->getDocument())
|
||||
{
|
||||
m_optionalContentActivity->deleteLater();
|
||||
m_optionalContentActivity = nullptr;
|
||||
|
||||
if (document)
|
||||
{
|
||||
m_optionalContentActivity = new pdf::PDFOptionalContentActivity(document, pdf::OCUsage::View, this);
|
||||
}
|
||||
|
||||
if (document)
|
||||
{
|
||||
pdf::PDFModifiedDocument modifiedDocument(document, m_optionalContentActivity);
|
||||
m_pdfWidget->setDocument(modifiedDocument);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pdfWidget->setDocument(pdf::PDFModifiedDocument());
|
||||
}
|
||||
}
|
||||
|
||||
if (updateCustomPageLayout)
|
||||
{
|
||||
this->updateCustomPageLayout();
|
||||
}
|
||||
}
|
||||
|
||||
ComparedDocumentMapper::Mode MainWindow::getDocumentViewMode() const
|
||||
{
|
||||
if (ui->actionView_Left->isChecked())
|
||||
{
|
||||
return ComparedDocumentMapper::Mode::Left;
|
||||
}
|
||||
|
||||
if (ui->actionView_Right->isChecked())
|
||||
{
|
||||
return ComparedDocumentMapper::Mode::Right;
|
||||
}
|
||||
|
||||
if (ui->actionView_Overlay->isChecked())
|
||||
{
|
||||
return ComparedDocumentMapper::Mode::Overlay;
|
||||
}
|
||||
|
||||
return ComparedDocumentMapper::Mode::Combined;
|
||||
}
|
||||
|
||||
void MainWindow::clear(bool clearLeftDocument, bool clearRightDocument)
|
||||
{
|
||||
setViewDocument(nullptr, true);
|
||||
|
||||
if (clearLeftDocument)
|
||||
{
|
||||
m_leftDocument = pdf::PDFDocument();
|
||||
m_settingsDockWidget->getLeftPageSelectionEdit()->clear();
|
||||
}
|
||||
|
||||
if (clearRightDocument)
|
||||
{
|
||||
m_rightDocument = pdf::PDFDocument();
|
||||
m_settingsDockWidget->getRightPageSelectionEdit()->clear();
|
||||
}
|
||||
|
||||
m_diffResult = pdf::PDFDiffResult();
|
||||
m_filteredDiffResult = pdf::PDFDiffResult();
|
||||
m_diffNavigator.update();
|
||||
|
||||
updateAll(false);
|
||||
}
|
||||
|
||||
void MainWindow::updateAll(bool resetFilters)
|
||||
{
|
||||
if (resetFilters)
|
||||
{
|
||||
ui->actionFilter_Page_Movement->setChecked(m_diffResult.hasPageMoveDifferences());
|
||||
ui->actionFilter_Text->setChecked(m_diffResult.hasTextDifferences());
|
||||
ui->actionFilter_Vector_Graphics->setChecked(m_diffResult.hasVectorGraphicsDifferences());
|
||||
ui->actionFilter_Images->setChecked(m_diffResult.hasImageDifferences());
|
||||
ui->actionFilter_Shading->setChecked(m_diffResult.hasShadingDifferences());
|
||||
}
|
||||
|
||||
updateFilteredResult();
|
||||
updateViewDocument();
|
||||
}
|
||||
|
||||
void MainWindow::updateFilteredResult()
|
||||
{
|
||||
m_filteredDiffResult = m_diffResult.filter(ui->actionFilter_Page_Movement->isChecked(),
|
||||
ui->actionFilter_Text->isChecked(),
|
||||
ui->actionFilter_Vector_Graphics->isChecked(),
|
||||
ui->actionFilter_Images->isChecked(),
|
||||
ui->actionFilter_Shading->isChecked());
|
||||
m_diffNavigator.update();
|
||||
|
||||
if (m_differencesDockWidget)
|
||||
{
|
||||
m_differencesDockWidget->update();
|
||||
}
|
||||
|
||||
updateActions();
|
||||
}
|
||||
|
||||
void MainWindow::updateViewDocument()
|
||||
{
|
||||
pdf::PDFDocument* document = nullptr;
|
||||
|
||||
switch (getDocumentViewMode())
|
||||
{
|
||||
case ComparedDocumentMapper::Mode::Left:
|
||||
document = &m_leftDocument;
|
||||
break;
|
||||
|
||||
case ComparedDocumentMapper::Mode::Right:
|
||||
document = &m_rightDocument;
|
||||
break;
|
||||
|
||||
case ComparedDocumentMapper::Mode::Combined:
|
||||
case ComparedDocumentMapper::Mode::Overlay:
|
||||
document = &m_combinedDocument;
|
||||
break;
|
||||
}
|
||||
|
||||
setViewDocument(document, true);
|
||||
}
|
||||
|
||||
void MainWindow::updateCustomPageLayout()
|
||||
{
|
||||
m_documentMapper.update(getDocumentViewMode(),
|
||||
ui->actionShow_Pages_with_Differences->isChecked(),
|
||||
m_filteredDiffResult,
|
||||
&m_leftDocument,
|
||||
&m_rightDocument,
|
||||
m_pdfWidget->getDrawWidgetProxy()->getDocument());
|
||||
|
||||
|
||||
m_pdfWidget->getDrawWidgetProxy()->setCustomPageLayout(m_documentMapper.getLayout());
|
||||
m_pdfWidget->getDrawWidgetProxy()->setPageLayout(pdf::PageLayout::Custom);
|
||||
}
|
||||
|
||||
void MainWindow::updateOverlayTransparency()
|
||||
{
|
||||
const pdf::PDFReal value = m_settingsDockWidget->getTransparencySliderValue() * 0.01;
|
||||
m_pdfWidget->getDrawWidgetProxy()->setGroupTransparency(1, true, 1.0 - value);
|
||||
m_pdfWidget->getDrawWidgetProxy()->setGroupTransparency(2, false, value);
|
||||
m_pdfWidget->update();
|
||||
}
|
||||
|
||||
std::optional<pdf::PDFDocument> MainWindow::openDocument()
|
||||
{
|
||||
QString fileName = QFileDialog::getOpenFileName(this, tr("Select PDF document"), m_settings.directory, tr("PDF document (*.pdf)"));
|
||||
if (fileName.isEmpty())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto queryPassword = [this](bool* ok)
|
||||
{
|
||||
*ok = false;
|
||||
return QInputDialog::getText(this, tr("Encrypted document"), tr("Enter password to access document content"), QLineEdit::Password, QString(), ok);
|
||||
};
|
||||
|
||||
// Mark current directory as this
|
||||
QFileInfo fileInfo(fileName);
|
||||
m_settings.directory = fileInfo.dir().absolutePath();
|
||||
|
||||
// Try to open a new document
|
||||
pdf::PDFDocumentReader reader(nullptr, qMove(queryPassword), true, false);
|
||||
pdf::PDFDocument document = reader.readFromFile(fileName);
|
||||
|
||||
QString errorMessage = reader.getErrorMessage();
|
||||
pdf::PDFDocumentReader::Result result = reader.getReadingResult();
|
||||
if (result == pdf::PDFDocumentReader::Result::OK)
|
||||
{
|
||||
return document;
|
||||
}
|
||||
else if (result == pdf::PDFDocumentReader::Result::Failed)
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), errorMessage);
|
||||
}
|
||||
|
||||
return pdf::PDFDocument();
|
||||
}
|
||||
|
||||
void MainWindow::onProgressStarted(pdf::ProgressStartupInfo info)
|
||||
{
|
||||
m_progressTaskbarIndicator->setRange(0, 100);
|
||||
m_progressTaskbarIndicator->reset();
|
||||
m_progressTaskbarIndicator->show();
|
||||
}
|
||||
|
||||
void MainWindow::onProgressStep(int percentage)
|
||||
{
|
||||
if (m_isChangingProgressStep)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFTemporaryValueChange guard(&m_isChangingProgressStep, true);
|
||||
m_progressTaskbarIndicator->setValue(percentage);
|
||||
}
|
||||
|
||||
void MainWindow::onProgressFinished()
|
||||
{
|
||||
m_progressTaskbarIndicator->hide();
|
||||
}
|
||||
|
||||
} // namespace pdfdocdiff
|
151
Pdf4QtDocDiff/mainwindow.h
Normal file
@ -0,0 +1,151 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef PDFDOCDIFF_MAINWINDOW_H
|
||||
#define PDFDOCDIFF_MAINWINDOW_H
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
#include "pdfdocument.h"
|
||||
#include "pdfdrawwidget.h"
|
||||
#include "pdfcms.h"
|
||||
#include "pdfoptionalcontent.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QSignalMapper>
|
||||
#include <QWinTaskbarButton>
|
||||
#include <QWinTaskbarProgress>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
class SettingsDockWidget;
|
||||
class DifferencesDockWidget;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
using BaseClass = QMainWindow;
|
||||
|
||||
public:
|
||||
explicit MainWindow(QWidget* parent);
|
||||
virtual ~MainWindow() override;
|
||||
|
||||
enum class Operation
|
||||
{
|
||||
OpenLeft,
|
||||
OpenRight,
|
||||
Compare,
|
||||
Close,
|
||||
GetSource,
|
||||
About,
|
||||
PreviousDifference,
|
||||
NextDifference,
|
||||
CreateCompareReport,
|
||||
FilterText,
|
||||
FilterVectorGraphics,
|
||||
FilterImages,
|
||||
FilterShading,
|
||||
FilterPageMovement,
|
||||
ViewDifferences,
|
||||
ViewLeft,
|
||||
ViewRight,
|
||||
ViewOverlay,
|
||||
ShowPageswithDifferences,
|
||||
SaveDifferencesToXML,
|
||||
DisplayDifferences,
|
||||
DisplayMarkers
|
||||
};
|
||||
|
||||
virtual void showEvent(QShowEvent* event) override;
|
||||
virtual void closeEvent(QCloseEvent* event) override;
|
||||
|
||||
private slots:
|
||||
void updateActions();
|
||||
void onSelectionChanged(size_t currentIndex);
|
||||
|
||||
private:
|
||||
void onMappedActionTriggered(int actionId);
|
||||
void onComparationFinished();
|
||||
void onColorsChanged();
|
||||
|
||||
void onProgressStarted(pdf::ProgressStartupInfo info);
|
||||
void onProgressStep(int percentage);
|
||||
void onProgressFinished();
|
||||
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
||||
bool canPerformOperation(Operation operation) const;
|
||||
void performOperation(Operation operation);
|
||||
|
||||
void setViewDocument(pdf::PDFDocument* document, bool updateCustomPageLayout);
|
||||
|
||||
ComparedDocumentMapper::Mode getDocumentViewMode() const;
|
||||
|
||||
/// Clears all data, and possibly documents also.
|
||||
/// View document is set to nullptr.
|
||||
/// \param clearLeftDocument Clear left document?
|
||||
/// \param clearRightDocument Clear left document?
|
||||
void clear(bool clearLeftDocument, bool clearRightDocument);
|
||||
|
||||
void updateAll(bool resetFilters);
|
||||
void updateFilteredResult();
|
||||
void updateViewDocument();
|
||||
void updateCustomPageLayout();
|
||||
void updateOverlayTransparency();
|
||||
|
||||
std::optional<pdf::PDFDocument> openDocument();
|
||||
|
||||
Ui::MainWindow* ui;
|
||||
|
||||
pdf::PDFProgress* m_progress;
|
||||
QWinTaskbarButton* m_taskbarButton;
|
||||
QWinTaskbarProgress* m_progressTaskbarIndicator;
|
||||
pdf::PDFCMSManager* m_cmsManager;
|
||||
pdf::PDFWidget* m_pdfWidget;
|
||||
SettingsDockWidget* m_settingsDockWidget;
|
||||
DifferencesDockWidget* m_differencesDockWidget;
|
||||
pdf::PDFOptionalContentActivity* m_optionalContentActivity;
|
||||
|
||||
Settings m_settings;
|
||||
QSignalMapper m_mapper;
|
||||
pdf::PDFDiff m_diff;
|
||||
bool m_isChangingProgressStep;
|
||||
bool m_dontDisplayErrorMessage;
|
||||
|
||||
pdf::PDFDocument m_leftDocument;
|
||||
pdf::PDFDocument m_rightDocument;
|
||||
pdf::PDFDocument m_combinedDocument;
|
||||
|
||||
pdf::PDFDiffResult m_diffResult;
|
||||
pdf::PDFDiffResult m_filteredDiffResult; ///< Difference result with filters applied
|
||||
pdf::PDFDiffResultNavigator m_diffNavigator; ///< Difference navigator
|
||||
ComparedDocumentMapper m_documentMapper;
|
||||
DifferencesDrawInterface m_drawInterface;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
#endif // PDFDOCDIFF_MAINWINDOW_H
|
370
Pdf4QtDocDiff/mainwindow.ui
Normal file
@ -0,0 +1,370 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>864</width>
|
||||
<height>638</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Workspace</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QFrame" name="documentFrame"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>864</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
<property name="title">
|
||||
<string>File</string>
|
||||
</property>
|
||||
<addaction name="actionOpen_Left"/>
|
||||
<addaction name="actionOpen_Right"/>
|
||||
<addaction name="actionClose"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuHelp">
|
||||
<property name="title">
|
||||
<string>Help</string>
|
||||
</property>
|
||||
<addaction name="actionGet_Source"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuToolbars">
|
||||
<property name="title">
|
||||
<string>Toolbars</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuCompare">
|
||||
<property name="title">
|
||||
<string>Compare</string>
|
||||
</property>
|
||||
<addaction name="actionCompare"/>
|
||||
<addaction name="actionCreate_Compare_Report"/>
|
||||
<addaction name="actionSave_Differences_to_XML"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
<property name="title">
|
||||
<string>View</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuView_2">
|
||||
<property name="title">
|
||||
<string>View</string>
|
||||
</property>
|
||||
<addaction name="actionView_Differences"/>
|
||||
<addaction name="actionView_Left"/>
|
||||
<addaction name="actionView_Right"/>
|
||||
<addaction name="actionView_Overlay"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuFilter">
|
||||
<property name="title">
|
||||
<string>Filter</string>
|
||||
</property>
|
||||
<addaction name="actionFilter_Text"/>
|
||||
<addaction name="actionFilter_Vector_Graphics"/>
|
||||
<addaction name="actionFilter_Images"/>
|
||||
<addaction name="actionFilter_Shading"/>
|
||||
<addaction name="actionFilter_Page_Movement"/>
|
||||
</widget>
|
||||
<addaction name="actionPrevious_Difference"/>
|
||||
<addaction name="actionNext_Difference"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="menuView_2"/>
|
||||
<addaction name="menuFilter"/>
|
||||
<addaction name="actionShow_Pages_with_Differences"/>
|
||||
<addaction name="actionSynchronize_View_with_Differences"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDisplay_Differences"/>
|
||||
<addaction name="actionDisplay_Markers"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuView"/>
|
||||
<addaction name="menuCompare"/>
|
||||
<addaction name="menuToolbars"/>
|
||||
<addaction name="menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
<action name="actionGet_Source">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/get-source.svg</normaloff>:/pdfdocdiff/resources/get-source.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Get Source</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/about.svg</normaloff>:/pdfdocdiff/resources/about.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>About</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F1</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_Left">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/open-left.svg</normaloff>:/pdfdocdiff/resources/open-left.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open Left</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_Right">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/open-right.svg</normaloff>:/pdfdocdiff/resources/open-right.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Open Right</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCompare">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/compare.svg</normaloff>:/pdfdocdiff/resources/compare.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Compare</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F5</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClose">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/close.svg</normaloff>:/pdfdocdiff/resources/close.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Close</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+F4</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPrevious_Difference">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/prev-diff.svg</normaloff>:/pdfdocdiff/resources/prev-diff.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Previous Difference</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Shift+F6</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNext_Difference">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/next-diff.svg</normaloff>:/pdfdocdiff/resources/next-diff.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Next Difference</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F6</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCreate_Compare_Report">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/create-compare-report.svg</normaloff>:/pdfdocdiff/resources/create-compare-report.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Create Compare Report</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_Text">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/filter-text.svg</normaloff>:/pdfdocdiff/resources/filter-text.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Filter Text</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_Vector_Graphics">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/filter-vector-graphics.svg</normaloff>:/pdfdocdiff/resources/filter-vector-graphics.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Filter Vector Graphics</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_Images">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/filter-images.svg</normaloff>:/pdfdocdiff/resources/filter-images.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Filter Images</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_Shading">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/filter-shading.svg</normaloff>:/pdfdocdiff/resources/filter-shading.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Filter Shading</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFilter_Page_Movement">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/filter-page-movement.svg</normaloff>:/pdfdocdiff/resources/filter-page-movement.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Filter Page Movement</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionView_Differences">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/view-differences.svg</normaloff>:/pdfdocdiff/resources/view-differences.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Differences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionView_Left">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/view-left.svg</normaloff>:/pdfdocdiff/resources/view-left.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Left</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionView_Right">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/view-right.svg</normaloff>:/pdfdocdiff/resources/view-right.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Right</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionView_Overlay">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/view-overlay.svg</normaloff>:/pdfdocdiff/resources/view-overlay.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>View Overlay</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Pages_with_Differences">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/show-p-with-diff.svg</normaloff>:/pdfdocdiff/resources/show-p-with-diff.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Pages with Differences</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Show Pages with Differences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSave_Differences_to_XML">
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/save-diff-to-xml.svg</normaloff>:/pdfdocdiff/resources/save-diff-to-xml.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Save Differences to XML</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSynchronize_View_with_Differences">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/synchronize-view.svg</normaloff>:/pdfdocdiff/resources/synchronize-view.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Synchronize View with Differences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDisplay_Differences">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/display-differences.svg</normaloff>:/pdfdocdiff/resources/display-differences.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display Differences</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDisplay_Markers">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resources.qrc">
|
||||
<normaloff>:/pdfdocdiff/resources/display-markers.svg</normaloff>:/pdfdocdiff/resources/display-markers.svg</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display Markers</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
27
Pdf4QtDocDiff/resources.qrc
Normal file
@ -0,0 +1,27 @@
|
||||
<RCC>
|
||||
<qresource prefix="/pdfdocdiff">
|
||||
<file>resources/about.svg</file>
|
||||
<file>resources/close.svg</file>
|
||||
<file>resources/compare.svg</file>
|
||||
<file>resources/get-source.svg</file>
|
||||
<file>resources/open-left.svg</file>
|
||||
<file>resources/open-right.svg</file>
|
||||
<file>resources/create-compare-report.svg</file>
|
||||
<file>resources/filter-images.svg</file>
|
||||
<file>resources/filter-page-movement.svg</file>
|
||||
<file>resources/filter-shading.svg</file>
|
||||
<file>resources/filter-text.svg</file>
|
||||
<file>resources/filter-vector-graphics.svg</file>
|
||||
<file>resources/next-diff.svg</file>
|
||||
<file>resources/prev-diff.svg</file>
|
||||
<file>resources/save-diff-to-xml.svg</file>
|
||||
<file>resources/show-p-with-diff.svg</file>
|
||||
<file>resources/synchronize-view.svg</file>
|
||||
<file>resources/view-differences.svg</file>
|
||||
<file>resources/view-left.svg</file>
|
||||
<file>resources/view-overlay.svg</file>
|
||||
<file>resources/view-right.svg</file>
|
||||
<file>resources/display-differences.svg</file>
|
||||
<file>resources/display-markers.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
108
Pdf4QtDocDiff/resources/about.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/close.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/compare.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/create-compare-report.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/display-differences.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/display-markers.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/filter-images.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/filter-page-movement.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/filter-shading.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/filter-text.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/filter-vector-graphics.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/get-source.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/next-diff.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/open-left.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/open-right.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/prev-diff.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/save-diff-to-xml.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/show-p-with-diff.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/synchronize-view.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/view-differences.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/view-left.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/view-overlay.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
108
Pdf4QtDocDiff/resources/view-right.svg
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="30mm"
|
||||
height="30mm"
|
||||
viewBox="0 0 30 30"
|
||||
version="1.1"
|
||||
id="svg5291"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="about.svg">
|
||||
<defs
|
||||
id="defs5285">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 15 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="30 : 15 : 1"
|
||||
inkscape:persp3d-origin="15 : 10 : 1"
|
||||
id="perspective5921" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.656854"
|
||||
inkscape:cx="148.43961"
|
||||
inkscape:cy="135.18316"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="2035"
|
||||
inkscape:window-x="-13"
|
||||
inkscape:window-y="-13"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5288">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:creator>
|
||||
<cc:Agent>
|
||||
<dc:title>Jakub Melka</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:creator>
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Vrstva 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-267)">
|
||||
<flowRoot
|
||||
xml:space="preserve"
|
||||
id="flowRoot5913"
|
||||
style="font-style:normal;font-weight:normal;font-size:40px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"><flowRegion
|
||||
id="flowRegion5915"><rect
|
||||
id="rect5917"
|
||||
width="129.22377"
|
||||
height="91.747108"
|
||||
x="-13.788582"
|
||||
y="-33.515606" /></flowRegion><flowPara
|
||||
id="flowPara5919" /></flowRoot> <g
|
||||
aria-label="?"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:25.39999962px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332"
|
||||
id="text849"
|
||||
transform="translate(-4.7625002,-4.2333335)">
|
||||
<path
|
||||
d="m 25.373474,281.70442 q 0,1.21543 -0.434082,2.17041 -0.434082,0.94258 -1.141016,1.67432 -0.694531,0.70693 -1.599902,1.32705 -0.905371,0.62011 -1.922363,1.20302 v 2.79053 h -2.22002 v -3.78271 q 0.806153,-0.45889 1.736328,-1.00459 0.942578,-0.54571 1.537891,-1.10381 0.719336,-0.64492 1.116211,-1.32705 0.396875,-0.69453 0.396875,-1.76114 0,-1.40146 -0.954981,-2.08359 -0.942578,-0.69453 -2.443261,-0.69453 -1.339453,0 -2.542481,0.42168 -1.190625,0.42168 -1.885156,0.85576 h -0.124023 v -2.53008 q 0.868164,-0.33486 2.195214,-0.59531 1.339454,-0.27285 2.530079,-0.27285 2.666503,0 4.204394,1.30224 1.550293,1.28985 1.550293,3.41065 z m -4.898926,14.12627 H 17.94447 v -2.6169 h 2.530078 z"
|
||||
style="stroke-width:0.26458332"
|
||||
id="path851"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.4 KiB |
40
Pdf4QtDocDiff/settings.h
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
#include <QColor>
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
struct Settings
|
||||
{
|
||||
QString directory;
|
||||
QColor colorPageMove = QColor(35, 145, 255);
|
||||
QColor colorAdded = QColor(125, 250, 0);
|
||||
QColor colorRemoved = QColor(255, 50, 50);
|
||||
QColor colorReplaced = QColor(255, 120, 30);
|
||||
bool displayDifferences = true;
|
||||
bool displayMarkers = true;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
|
||||
#endif // SETTINGS_H
|
150
Pdf4QtDocDiff/settingsdockwidget.cpp
Normal file
@ -0,0 +1,150 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "settingsdockwidget.h"
|
||||
#include "ui_settingsdockwidget.h"
|
||||
|
||||
#include "pdfutils.h"
|
||||
#include "pdfwidgetutils.h"
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
SettingsDockWidget::SettingsDockWidget(Settings* settings, QWidget* parent) :
|
||||
QDockWidget(parent),
|
||||
ui(new Ui::SettingsDockWidget),
|
||||
m_settings(settings),
|
||||
m_loadingColors(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
auto colorNames = QColor::colorNames();
|
||||
for (QComboBox* comboBox : findChildren<QComboBox*>())
|
||||
{
|
||||
for (const QString& colorName : colorNames)
|
||||
{
|
||||
QColor color(colorName);
|
||||
comboBox->addItem(getIconForColor(color), colorName, color);
|
||||
}
|
||||
|
||||
connect(comboBox, &QComboBox::editTextChanged, this, &SettingsDockWidget::onEditColorChanged);
|
||||
}
|
||||
|
||||
connect(ui->transparencySlider, &QSlider::valueChanged, this, &SettingsDockWidget::transparencySliderChanged);
|
||||
}
|
||||
|
||||
SettingsDockWidget::~SettingsDockWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SettingsDockWidget::setCompareTextsAsVectorGraphics(bool enabled)
|
||||
{
|
||||
ui->compareTextsAsVectorGraphicsCheckBox->setChecked(enabled);
|
||||
}
|
||||
|
||||
bool SettingsDockWidget::isCompareTextAsVectorGraphics() const
|
||||
{
|
||||
return ui->compareTextsAsVectorGraphicsCheckBox->isChecked();
|
||||
}
|
||||
|
||||
void SettingsDockWidget::setCompareTextCharactersInsteadOfWords(bool enabled)
|
||||
{
|
||||
ui->compareCharactersInsteadOfWordsCheckBox->setChecked(enabled);
|
||||
}
|
||||
|
||||
bool SettingsDockWidget::isCompareTextCharactersInsteadOfWords() const
|
||||
{
|
||||
return ui->compareCharactersInsteadOfWordsCheckBox->isChecked();
|
||||
}
|
||||
|
||||
QLineEdit* SettingsDockWidget::getLeftPageSelectionEdit() const
|
||||
{
|
||||
return ui->leftPageSelectionEdit;
|
||||
}
|
||||
|
||||
QLineEdit* SettingsDockWidget::getRightPageSelectionEdit() const
|
||||
{
|
||||
return ui->rightPageSelectionEdit;
|
||||
}
|
||||
|
||||
void SettingsDockWidget::loadColors()
|
||||
{
|
||||
pdf::PDFTemporaryValueChange guard(&m_loadingColors, true);
|
||||
|
||||
auto loadColor = [](QComboBox* comboBox, QColor color)
|
||||
{
|
||||
auto index = comboBox->findData(color);
|
||||
comboBox->setCurrentIndex(index);
|
||||
|
||||
if (index == -1)
|
||||
{
|
||||
comboBox->setCurrentText(color.name());
|
||||
}
|
||||
};
|
||||
|
||||
loadColor(ui->removeColorCombo, m_settings->colorRemoved);
|
||||
loadColor(ui->addColorCombo, m_settings->colorAdded);
|
||||
loadColor(ui->replaceColorCombo, m_settings->colorReplaced);
|
||||
loadColor(ui->moveColorCombo, m_settings->colorPageMove);
|
||||
}
|
||||
|
||||
int SettingsDockWidget::getTransparencySliderValue() const
|
||||
{
|
||||
return ui->transparencySlider->value();
|
||||
}
|
||||
|
||||
QIcon SettingsDockWidget::getIconForColor(QColor color) const
|
||||
{
|
||||
QIcon icon;
|
||||
|
||||
QSize iconSize = pdf::PDFWidgetUtils::scaleDPI(this, QSize(16, 16));
|
||||
|
||||
QPixmap pixmap(iconSize.width(), iconSize.height());
|
||||
pixmap.fill(color);
|
||||
icon.addPixmap(pixmap);
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
void SettingsDockWidget::onEditColorChanged()
|
||||
{
|
||||
if (m_loadingColors)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool isChanged = false;
|
||||
auto saveColor = [&isChanged](QComboBox* comboBox, QColor& color)
|
||||
{
|
||||
QColor oldColor = color;
|
||||
color.setNamedColor(comboBox->currentText());
|
||||
isChanged = isChanged || oldColor != color;
|
||||
};
|
||||
|
||||
saveColor(ui->removeColorCombo, m_settings->colorRemoved);
|
||||
saveColor(ui->addColorCombo, m_settings->colorAdded);
|
||||
saveColor(ui->replaceColorCombo, m_settings->colorReplaced);
|
||||
saveColor(ui->moveColorCombo, m_settings->colorPageMove);
|
||||
|
||||
if (isChanged)
|
||||
{
|
||||
emit colorsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace pdfdocdiff
|
73
Pdf4QtDocDiff/settingsdockwidget.h
Normal file
@ -0,0 +1,73 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SETTINGSDOCKWIDGET_H
|
||||
#define SETTINGSDOCKWIDGET_H
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
#include <QDockWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class SettingsDockWidget;
|
||||
}
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
class SettingsDockWidget : public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsDockWidget(Settings* settings, QWidget* parent);
|
||||
virtual ~SettingsDockWidget() override;
|
||||
|
||||
void setCompareTextsAsVectorGraphics(bool enabled);
|
||||
bool isCompareTextAsVectorGraphics() const;
|
||||
|
||||
void setCompareTextCharactersInsteadOfWords(bool enabled);
|
||||
bool isCompareTextCharactersInsteadOfWords() const;
|
||||
|
||||
QLineEdit* getLeftPageSelectionEdit() const;
|
||||
QLineEdit* getRightPageSelectionEdit() const;
|
||||
|
||||
void loadColors();
|
||||
void saveColors();
|
||||
|
||||
int getTransparencySliderValue() const;
|
||||
|
||||
signals:
|
||||
void colorsChanged();
|
||||
void transparencySliderChanged(int value);
|
||||
|
||||
private:
|
||||
QIcon getIconForColor(QColor color) const;
|
||||
|
||||
void onEditColorChanged();
|
||||
|
||||
Ui::SettingsDockWidget* ui;
|
||||
Settings* m_settings;
|
||||
bool m_loadingColors;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
#endif // SETTINGSDOCKWIDGET_H
|
190
Pdf4QtDocDiff/settingsdockwidget.ui
Normal file
@ -0,0 +1,190 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SettingsDockWidget</class>
|
||||
<widget class="QDockWidget" name="SettingsDockWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>548</width>
|
||||
<height>511</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="allowedAreas">
|
||||
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="dockWidgetContents">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="leftDocumentSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Left Document</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="leftPageSelectionLabel">
|
||||
<property name="text">
|
||||
<string>Page Selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="leftPageSelectionEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="rightDocumentSettingsGroupBox">
|
||||
<property name="title">
|
||||
<string>Right Document</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="rightPageSelectionLabel">
|
||||
<property name="text">
|
||||
<string>Page Selection:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="rightPageSelectionEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="optionsGroupBox">
|
||||
<property name="title">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="compareTextsAsVectorGraphicsCheckBox">
|
||||
<property name="text">
|
||||
<string>Compare texts as vector graphics</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="compareCharactersInsteadOfWordsCheckBox">
|
||||
<property name="text">
|
||||
<string>Compare text characters instead of words</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="overlayGroupBox">
|
||||
<property name="title">
|
||||
<string>Transparency | Overlay View</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QSlider" name="transparencySlider">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>50</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::TicksAbove</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="colorsGroupBox">
|
||||
<property name="title">
|
||||
<string>Colors</string>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="removeColorLabel">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="removeColorCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="addColorLabel">
|
||||
<property name="text">
|
||||
<string>Add</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="replaceColorLabel">
|
||||
<property name="text">
|
||||
<string>Replace</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="moveColorLabel">
|
||||
<property name="text">
|
||||
<string>Move</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="replaceColorCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="addColorCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="moveColorCombo">
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
563
Pdf4QtDocDiff/utils.cpp
Normal file
@ -0,0 +1,563 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "utils.h"
|
||||
#include "pdfutils.h"
|
||||
#include "pdfwidgetutils.h"
|
||||
#include "pdfpainterutils.h"
|
||||
#include "pdfdocumentbuilder.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
void ComparedDocumentMapper::update(ComparedDocumentMapper::Mode mode,
|
||||
bool filterDifferences,
|
||||
const pdf::PDFDiffResult& diff,
|
||||
const pdf::PDFDocument* leftDocument,
|
||||
const pdf::PDFDocument* rightDocument,
|
||||
const pdf::PDFDocument* currentDocument)
|
||||
{
|
||||
m_layout.clear();
|
||||
|
||||
m_leftPageIndices.clear();
|
||||
m_rightPageIndices.clear();
|
||||
|
||||
m_allLeft = false;
|
||||
m_allRight = false;
|
||||
|
||||
if (!leftDocument || !rightDocument || !currentDocument)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Jakub Melka
|
||||
pdf::PDFDiffResult::PageSequence pageSequence = diff.getPageSequence();
|
||||
const bool isEmpty = pageSequence.empty();
|
||||
|
||||
if (filterDifferences)
|
||||
{
|
||||
pdf::PDFDiffResult::PageSequence filteredPageSequence;
|
||||
|
||||
std::vector<pdf::PDFInteger> leftPageIndices = diff.getChangedLeftPageIndices();
|
||||
std::vector<pdf::PDFInteger> rightPageIndices = diff.getChangedRightPageIndices();
|
||||
|
||||
for (const pdf::PDFDiffResult::PageSequenceItem& item : pageSequence)
|
||||
{
|
||||
const bool isLeftModified = std::binary_search(leftPageIndices.cbegin(), leftPageIndices.cend(), item.leftPage);
|
||||
const bool isRightModified = std::binary_search(rightPageIndices.cbegin(), rightPageIndices.cend(), item.rightPage);
|
||||
|
||||
if (isLeftModified || isRightModified)
|
||||
{
|
||||
filteredPageSequence.push_back(item);
|
||||
}
|
||||
}
|
||||
|
||||
pageSequence = std::move(filteredPageSequence);
|
||||
}
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case ComparedDocumentMapper::Mode::Left:
|
||||
{
|
||||
Q_ASSERT(leftDocument == currentDocument);
|
||||
|
||||
m_allLeft = true;
|
||||
double yPos = 0.0;
|
||||
const pdf::PDFCatalog* catalog = leftDocument->getCatalog();
|
||||
|
||||
if (isEmpty)
|
||||
{
|
||||
// Just copy all pages
|
||||
const size_t pageCount = catalog->getPageCount();
|
||||
for (size_t i = 0; i < pageCount; ++i)
|
||||
{
|
||||
QSizeF pageSize = catalog->getPage(i)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
m_layout.emplace_back(0, i, -1, rect);
|
||||
yPos += pageSize.height() + 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const pdf::PDFDiffResult::PageSequenceItem& item : pageSequence)
|
||||
{
|
||||
if (item.leftPage == -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QSizeF pageSize = catalog->getPage(item.leftPage)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
m_layout.emplace_back(0, item.leftPage, -1, rect);
|
||||
yPos += pageSize.height() + 5;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ComparedDocumentMapper::Mode::Right:
|
||||
{
|
||||
Q_ASSERT(rightDocument == currentDocument);
|
||||
|
||||
m_allRight = true;
|
||||
double yPos = 0.0;
|
||||
const pdf::PDFCatalog* catalog = rightDocument->getCatalog();
|
||||
|
||||
if (isEmpty)
|
||||
{
|
||||
// Just copy all pages
|
||||
const size_t pageCount = catalog->getPageCount();
|
||||
for (size_t i = 0; i < pageCount; ++i)
|
||||
{
|
||||
QSizeF pageSize = catalog->getPage(i)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
m_layout.emplace_back(0, i, -1, rect);
|
||||
yPos += pageSize.height() + 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const pdf::PDFDiffResult::PageSequenceItem& item : pageSequence)
|
||||
{
|
||||
if (item.rightPage == -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QSizeF pageSize = catalog->getPage(item.rightPage)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
m_layout.emplace_back(0, item.rightPage, -1, rect);
|
||||
yPos += pageSize.height() + 5;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case ComparedDocumentMapper::Mode::Combined:
|
||||
case ComparedDocumentMapper::Mode::Overlay:
|
||||
{
|
||||
double yPos = 0.0;
|
||||
const pdf::PDFCatalog* catalog = currentDocument->getCatalog();
|
||||
pdf::PDFInteger offset = leftDocument->getCatalog()->getPageCount();
|
||||
|
||||
for (const pdf::PDFDiffResult::PageSequenceItem& item : pageSequence)
|
||||
{
|
||||
double yAdvance = 0.0;
|
||||
|
||||
if (item.leftPage != -1)
|
||||
{
|
||||
QSizeF pageSize = catalog->getPage(item.leftPage)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect;
|
||||
pdf::PDFInteger groupIndex = -1;
|
||||
if (mode == ComparedDocumentMapper::Mode::Combined)
|
||||
{
|
||||
rect = QRectF(-pageSize.width() - 5, yPos, pageSize.width(), pageSize.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.rightPage != -1)
|
||||
{
|
||||
groupIndex = 1;
|
||||
}
|
||||
rect = QRectF(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
}
|
||||
m_layout.emplace_back(0, item.leftPage, groupIndex, rect);
|
||||
yAdvance = pageSize.height() + 5;
|
||||
m_leftPageIndices[item.leftPage] = item.leftPage;
|
||||
}
|
||||
|
||||
if (item.rightPage != -1)
|
||||
{
|
||||
pdf::PDFInteger rightPageIndex = item.rightPage + offset;
|
||||
QSizeF pageSize = catalog->getPage(rightPageIndex)->getRotatedMediaBoxMM().size();
|
||||
QRectF rect;
|
||||
pdf::PDFInteger groupIndex = -1;
|
||||
if (mode == ComparedDocumentMapper::Mode::Combined)
|
||||
{
|
||||
rect = QRectF(5, yPos, pageSize.width(), pageSize.height());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.leftPage != -1)
|
||||
{
|
||||
groupIndex = 2;
|
||||
}
|
||||
rect = QRectF(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
}
|
||||
m_layout.emplace_back(0, rightPageIndex, groupIndex, rect);
|
||||
yAdvance = qMax(yAdvance, pageSize.height() + 5);
|
||||
m_rightPageIndices[rightPageIndex] = item.rightPage;
|
||||
}
|
||||
|
||||
yPos += yAdvance;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pdf::PDFInteger ComparedDocumentMapper::getLeftPageIndex(pdf::PDFInteger pageIndex) const
|
||||
{
|
||||
if (m_allLeft)
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
auto it = m_leftPageIndices.find(pageIndex);
|
||||
if (it != m_leftPageIndices.cend())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
pdf::PDFInteger ComparedDocumentMapper::getRightPageIndex(pdf::PDFInteger pageIndex) const
|
||||
{
|
||||
if (m_allRight)
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
auto it = m_rightPageIndices.find(pageIndex);
|
||||
if (it != m_rightPageIndices.cend())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
pdf::PDFInteger ComparedDocumentMapper::getPageIndexFromLeftPageIndex(pdf::PDFInteger leftPageIndex) const
|
||||
{
|
||||
if (m_allLeft)
|
||||
{
|
||||
return leftPageIndex;
|
||||
}
|
||||
|
||||
for (const auto& indexItem : m_leftPageIndices)
|
||||
{
|
||||
if (indexItem.second == leftPageIndex)
|
||||
{
|
||||
return indexItem.first;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
pdf::PDFInteger ComparedDocumentMapper::getPageIndexFromRightPageIndex(pdf::PDFInteger rightPageIndex) const
|
||||
{
|
||||
if (m_allRight)
|
||||
{
|
||||
return rightPageIndex;
|
||||
}
|
||||
|
||||
for (const auto& indexItem : m_rightPageIndices)
|
||||
{
|
||||
if (indexItem.second == rightPageIndex)
|
||||
{
|
||||
return indexItem.first;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
DifferencesDrawInterface::DifferencesDrawInterface(const Settings* settings,
|
||||
const ComparedDocumentMapper* mapper,
|
||||
const pdf::PDFDiffResult* diffResult) :
|
||||
m_settings(settings),
|
||||
m_mapper(mapper),
|
||||
m_diffResult(diffResult)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void DifferencesDrawInterface::drawPage(QPainter* painter,
|
||||
pdf::PDFInteger pageIndex,
|
||||
const pdf::PDFPrecompiledPage* compiledPage,
|
||||
pdf::PDFTextLayoutGetter& layoutGetter,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
QList<pdf::PDFRenderError>& errors) const
|
||||
{
|
||||
Q_UNUSED(compiledPage);
|
||||
Q_UNUSED(layoutGetter);
|
||||
Q_UNUSED(errors);
|
||||
|
||||
if (!m_settings->displayDifferences)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const size_t differencesCount = m_diffResult->getDifferencesCount();
|
||||
const pdf::PDFInteger leftPageIndex = m_mapper->getLeftPageIndex(pageIndex);
|
||||
const pdf::PDFInteger rightPageIndex = m_mapper->getRightPageIndex(pageIndex);
|
||||
|
||||
std::optional<size_t> pageMoveIndex;
|
||||
|
||||
if (leftPageIndex != -1)
|
||||
{
|
||||
for (size_t i = 0; i < differencesCount; ++i)
|
||||
{
|
||||
auto leftRectangles = m_diffResult->getLeftRectangles(i);
|
||||
for (auto it = leftRectangles.first; it != leftRectangles.second; ++it)
|
||||
{
|
||||
const auto& item = *it;
|
||||
if (item.first == leftPageIndex)
|
||||
{
|
||||
QColor color = getColorForIndex(i);
|
||||
drawRectangle(painter, pagePointToDevicePointMatrix, item.second, color);
|
||||
drawMarker(painter, pagePointToDevicePointMatrix, item.second, color, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_diffResult->isPageMoveAddRemoveDifference(i) && m_diffResult->getLeftPage(i) == leftPageIndex)
|
||||
{
|
||||
pageMoveIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rightPageIndex != -1)
|
||||
{
|
||||
for (size_t i = 0; i < differencesCount; ++i)
|
||||
{
|
||||
auto rightRectangles = m_diffResult->getRightRectangles(i);
|
||||
for (auto it = rightRectangles.first; it != rightRectangles.second; ++it)
|
||||
{
|
||||
const auto& item = *it;
|
||||
if (item.first == rightPageIndex)
|
||||
{
|
||||
QColor color = getColorForIndex(i);
|
||||
drawRectangle(painter, pagePointToDevicePointMatrix, item.second, color);
|
||||
drawMarker(painter, pagePointToDevicePointMatrix, item.second, color, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_diffResult->isPageMoveAddRemoveDifference(i) && m_diffResult->getRightPage(i) == rightPageIndex)
|
||||
{
|
||||
pageMoveIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pageMoveIndex)
|
||||
{
|
||||
QString text;
|
||||
|
||||
switch (m_diffResult->getType(*pageMoveIndex))
|
||||
{
|
||||
case pdf::PDFDiffResult::Type::PageAdded:
|
||||
text = " + ";
|
||||
break;
|
||||
|
||||
case pdf::PDFDiffResult::Type::PageRemoved:
|
||||
text = " - ";
|
||||
break;
|
||||
|
||||
case pdf::PDFDiffResult::Type::PageMoved:
|
||||
text = QString("%1🠖%2").arg(m_diffResult->getLeftPage(*pageMoveIndex) + 1).arg(m_diffResult->getRightPage(*pageMoveIndex) + 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
QColor color = getColorForIndex(*pageMoveIndex);
|
||||
QPointF targetPoint = pagePointToDevicePointMatrix.map(QPointF(5, 5));
|
||||
pdf::PDFPainterHelper::drawBubble(painter, targetPoint.toPoint(), color, text, Qt::AlignRight | Qt::AlignTop);
|
||||
}
|
||||
}
|
||||
|
||||
QColor DifferencesDrawInterface::getColorForIndex(size_t index) const
|
||||
{
|
||||
QColor color;
|
||||
|
||||
const size_t resultIndex = index;
|
||||
|
||||
if (m_diffResult->isReplaceDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorReplaced;
|
||||
}
|
||||
else if (m_diffResult->isRemoveDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorRemoved;
|
||||
}
|
||||
else if (m_diffResult->isAddDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorAdded;
|
||||
}
|
||||
else if (m_diffResult->isPageMoveDifference(resultIndex))
|
||||
{
|
||||
color = m_settings->colorPageMove;
|
||||
}
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
void DifferencesDrawInterface::drawPostRendering(QPainter* painter, QRect rect) const
|
||||
{
|
||||
Q_UNUSED(painter);
|
||||
Q_UNUSED(rect);
|
||||
}
|
||||
|
||||
void DifferencesDrawInterface::drawAnnotations(const pdf::PDFDocument* document,
|
||||
pdf::PDFDocumentBuilder* builder)
|
||||
{
|
||||
pdf::PDFInteger pageCount = document->getCatalog()->getPageCount();
|
||||
|
||||
QString title = pdf::PDFSysUtils::getUserName();
|
||||
QString subject = tr("Difference");
|
||||
|
||||
for (pdf::PDFInteger pageIndex = 0; pageIndex < pageCount; ++pageIndex)
|
||||
{
|
||||
const size_t differencesCount = m_diffResult->getDifferencesCount();
|
||||
const pdf::PDFInteger leftPageIndex = m_mapper->getLeftPageIndex(pageIndex);
|
||||
const pdf::PDFInteger rightPageIndex = m_mapper->getRightPageIndex(pageIndex);
|
||||
|
||||
const pdf::PDFPage* page = document->getCatalog()->getPage(pageIndex);
|
||||
pdf::PDFObjectReference reference = page->getPageReference();
|
||||
|
||||
if (leftPageIndex != -1)
|
||||
{
|
||||
for (size_t i = 0; i < differencesCount; ++i)
|
||||
{
|
||||
auto leftRectangles = m_diffResult->getLeftRectangles(i);
|
||||
for (auto it = leftRectangles.first; it != leftRectangles.second; ++it)
|
||||
{
|
||||
const auto& item = *it;
|
||||
if (item.first == leftPageIndex)
|
||||
{
|
||||
QColor color = getColorForIndex(i);
|
||||
const QRectF& rect = item.second;
|
||||
QPolygonF polygon;
|
||||
polygon << rect.topLeft() << rect.topRight() << rect.bottomRight() << rect.bottomLeft();
|
||||
pdf::PDFObjectReference annotation = builder->createAnnotationPolygon(reference, polygon, 1.0, color, color, title, subject, m_diffResult->getMessage(i));
|
||||
builder->setAnnotationOpacity(annotation, 0.3);
|
||||
builder->updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rightPageIndex != -1)
|
||||
{
|
||||
for (size_t i = 0; i < differencesCount; ++i)
|
||||
{
|
||||
auto rightRectangles = m_diffResult->getRightRectangles(i);
|
||||
for (auto it = rightRectangles.first; it != rightRectangles.second; ++it)
|
||||
{
|
||||
const auto& item = *it;
|
||||
if (item.first == rightPageIndex)
|
||||
{
|
||||
QColor color = getColorForIndex(i);
|
||||
const QRectF& rect = item.second;
|
||||
QPolygonF polygon;
|
||||
polygon << rect.topLeft() << rect.topRight() << rect.bottomRight() << rect.bottomLeft();
|
||||
pdf::PDFObjectReference annotation = builder->createAnnotationPolygon(reference, polygon, 1.0, color, color, title, subject, m_diffResult->getMessage(i));
|
||||
builder->setAnnotationOpacity(annotation, 0.3);
|
||||
builder->updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DifferencesDrawInterface::drawRectangle(QPainter* painter,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
const QRectF& rect,
|
||||
QColor color) const
|
||||
{
|
||||
color.setAlphaF(0.5);
|
||||
|
||||
QRectF resultRect = pagePointToDevicePointMatrix.mapRect(rect);
|
||||
painter->fillRect(resultRect, color);
|
||||
}
|
||||
|
||||
void DifferencesDrawInterface::drawMarker(QPainter* painter,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
const QRectF& rect,
|
||||
QColor color,
|
||||
bool isLeft) const
|
||||
{
|
||||
if (!m_settings->displayMarkers)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
pdf::PDFPainterStateGuard guard(painter);
|
||||
QRectF deviceRect = pagePointToDevicePointMatrix.mapRect(rect);
|
||||
|
||||
QPointF snapPoint;
|
||||
QPointF markPoint;
|
||||
|
||||
if (isLeft)
|
||||
{
|
||||
snapPoint.ry() = deviceRect.center().y();
|
||||
snapPoint.rx() = deviceRect.left();
|
||||
markPoint = snapPoint;
|
||||
markPoint.rx() = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
snapPoint.ry() = deviceRect.center().y();
|
||||
snapPoint.rx() = deviceRect.right();
|
||||
markPoint = snapPoint;
|
||||
markPoint.rx() = painter->device()->width();
|
||||
}
|
||||
|
||||
const qreal lineWidthF = pdf::PDFWidgetUtils::scaleDPI_y(painter->device(), 2);
|
||||
|
||||
QPen pen(Qt::DotLine);
|
||||
pen.setColor(color);
|
||||
pen.setWidthF(lineWidthF);
|
||||
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
painter->setPen(pen);
|
||||
painter->drawLine(snapPoint, markPoint);
|
||||
|
||||
const qreal markSizeX = pdf::PDFWidgetUtils::scaleDPI_x(painter->device(), 10);
|
||||
const qreal markSizeY = pdf::PDFWidgetUtils::scaleDPI_y(painter->device(), 10);
|
||||
|
||||
QPointF ptc = markPoint;
|
||||
QPointF ptTop = ptc;
|
||||
QPointF ptBottom = ptc;
|
||||
|
||||
ptTop.ry() -= markSizeY;
|
||||
ptBottom.ry() += markSizeY;
|
||||
ptc.rx() += isLeft ? markSizeX : -markSizeX;
|
||||
|
||||
std::array points = { ptTop, ptc, ptBottom };
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
painter->setBrush(QBrush(color));
|
||||
painter->drawConvexPolygon(points.data(), int(points.size()));
|
||||
}
|
||||
|
||||
} // namespace pdfdocdiff
|
128
Pdf4QtDocDiff/utils.h
Normal file
@ -0,0 +1,128 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef UTILS_H
|
||||
#define UTILS_H
|
||||
|
||||
#include "settings.h"
|
||||
#include "pdfdiff.h"
|
||||
#include "pdfdrawspacecontroller.h"
|
||||
#include "pdfdocumentdrawinterface.h"
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
class PDFDocumentBuilder;
|
||||
} // namespace pdf
|
||||
|
||||
namespace pdfdocdiff
|
||||
{
|
||||
|
||||
class ComparedDocumentMapper
|
||||
{
|
||||
public:
|
||||
|
||||
enum class Mode
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Combined,
|
||||
Overlay
|
||||
};
|
||||
|
||||
void update(Mode mode,
|
||||
bool filterDifferences,
|
||||
const pdf::PDFDiffResult& diff,
|
||||
const pdf::PDFDocument* leftDocument,
|
||||
const pdf::PDFDocument* rightDocument,
|
||||
const pdf::PDFDocument* currentDocument);
|
||||
|
||||
const pdf::PDFDrawSpaceController::LayoutItems& getLayout() const { return m_layout; }
|
||||
void setPageSequence(const pdf::PDFDiffResult::PageSequence& sequence) { m_pageSequence = sequence; }
|
||||
|
||||
/// Returns left page index (that means page index in left document),
|
||||
/// if it doesn't exist, -1 is returned.
|
||||
/// \param pageIndex Actual page index
|
||||
pdf::PDFInteger getLeftPageIndex(pdf::PDFInteger pageIndex) const;
|
||||
|
||||
/// Returns right page index (that means page index in right document),
|
||||
/// if it doesn't exist, -1 is returned.
|
||||
/// \param pageIndex Actual page index
|
||||
pdf::PDFInteger getRightPageIndex(pdf::PDFInteger pageIndex) const;
|
||||
|
||||
/// Returns actual page index from left page index, or -1.
|
||||
/// \param leftPageIndex Left page index
|
||||
pdf::PDFInteger getPageIndexFromLeftPageIndex(pdf::PDFInteger leftPageIndex) const;
|
||||
|
||||
/// Returns actual page index from right page index, or -1.
|
||||
/// \param rightPageIndex Right page index
|
||||
pdf::PDFInteger getPageIndexFromRightPageIndex(pdf::PDFInteger rightPageIndex) const;
|
||||
|
||||
private:
|
||||
pdf::PDFDrawSpaceController::LayoutItems m_layout;
|
||||
bool m_allLeft = false;
|
||||
bool m_allRight = false;
|
||||
std::map<pdf::PDFInteger, pdf::PDFInteger> m_leftPageIndices;
|
||||
std::map<pdf::PDFInteger, pdf::PDFInteger> m_rightPageIndices;
|
||||
pdf::PDFDiffResult::PageSequence m_pageSequence;
|
||||
};
|
||||
|
||||
class DifferencesDrawInterface : public pdf::IDocumentDrawInterface
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(pdfdocdiff::DifferencesDrawInterface)
|
||||
|
||||
public:
|
||||
explicit DifferencesDrawInterface(const Settings* settings,
|
||||
const ComparedDocumentMapper* mapper,
|
||||
const pdf::PDFDiffResult* diffResult);
|
||||
|
||||
virtual void drawPage(QPainter* painter, pdf::PDFInteger pageIndex,
|
||||
const pdf::PDFPrecompiledPage* compiledPage,
|
||||
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,
|
||||
const QRectF& rect,
|
||||
QColor color) const;
|
||||
|
||||
void drawMarker(QPainter* painter,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
const QRectF& rect,
|
||||
QColor color,
|
||||
bool isLeft) const;
|
||||
|
||||
QColor getColorForIndex(size_t index) const;
|
||||
|
||||
const Settings* m_settings;
|
||||
const ComparedDocumentMapper* m_mapper;
|
||||
const pdf::PDFDiffResult* m_diffResult;
|
||||
};
|
||||
|
||||
} // namespace pdfdocdiff
|
||||
|
||||
#endif // UTILS_H
|
@ -44,11 +44,13 @@ DESTDIR = $$OUT_PWD/..
|
||||
SOURCES += \
|
||||
sources/pdfaction.cpp \
|
||||
sources/pdfadvancedtools.cpp \
|
||||
sources/pdfalgorithmlcs.cpp \
|
||||
sources/pdfannotation.cpp \
|
||||
sources/pdfblendfunction.cpp \
|
||||
sources/pdfccittfaxdecoder.cpp \
|
||||
sources/pdfcms.cpp \
|
||||
sources/pdfcompiler.cpp \
|
||||
sources/pdfdiff.cpp \
|
||||
sources/pdfdocumentbuilder.cpp \
|
||||
sources/pdfdocumentmanipulator.cpp \
|
||||
sources/pdfdocumenttextflow.cpp \
|
||||
@ -110,11 +112,13 @@ SOURCES += \
|
||||
HEADERS += \
|
||||
sources/pdfaction.h \
|
||||
sources/pdfadvancedtools.h \
|
||||
sources/pdfalgorithmlcs.h \
|
||||
sources/pdfannotation.h \
|
||||
sources/pdfblendfunction.h \
|
||||
sources/pdfccittfaxdecoder.h \
|
||||
sources/pdfcms.h \
|
||||
sources/pdfcompiler.h \
|
||||
sources/pdfdiff.h \
|
||||
sources/pdfdocumentbuilder.h \
|
||||
sources/pdfdocumentdrawinterface.h \
|
||||
sources/pdfdocumentmanipulator.h \
|
||||
|
177
Pdf4QtLib/sources/pdfalgorithmlcs.cpp
Normal file
@ -0,0 +1,177 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "pdfalgorithmlcs.h"
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
|
||||
void PDFAlgorithmLongestCommonSubsequenceBase::markSequence(Sequence& sequence,
|
||||
const std::vector<size_t>& movedItemsLeft,
|
||||
const std::vector<size_t>& movedItemsRight)
|
||||
{
|
||||
Sequence updatedSequence;
|
||||
|
||||
Q_ASSERT(std::is_sorted(movedItemsLeft.cbegin(), movedItemsLeft.cend()));
|
||||
Q_ASSERT(std::is_sorted(movedItemsRight.cbegin(), movedItemsRight.cend()));
|
||||
|
||||
for (auto it = sequence.cbegin(); it != sequence.cend();)
|
||||
{
|
||||
if (it->isMatch())
|
||||
{
|
||||
updatedSequence.push_back(*it);
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
Sequence leftItems;
|
||||
Sequence rightItems;
|
||||
|
||||
for (; it != sequence.cend() && !it->isMatch(); ++it)
|
||||
{
|
||||
const SequenceItem& currentItem = *it;
|
||||
Q_ASSERT(currentItem.isLeft() || currentItem.isRight());
|
||||
|
||||
if (currentItem.isLeft())
|
||||
{
|
||||
if (std::binary_search(movedItemsLeft.cbegin(), movedItemsLeft.cend(), currentItem.index1))
|
||||
{
|
||||
SequenceItem item = *it;
|
||||
item.markMovedLeft();
|
||||
updatedSequence.push_back(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
leftItems.push_back(currentItem);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentItem.isRight())
|
||||
{
|
||||
if (std::binary_search(movedItemsRight.cbegin(), movedItemsRight.cend(), currentItem.index2))
|
||||
{
|
||||
SequenceItem item = *it;
|
||||
item.markMovedRight();
|
||||
updatedSequence.push_back(item);
|
||||
}
|
||||
else
|
||||
{
|
||||
rightItems.push_back(currentItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::reverse(leftItems.begin(), leftItems.end());
|
||||
std::reverse(rightItems.begin(), rightItems.end());
|
||||
|
||||
bool isReplaced = !leftItems.empty() && !rightItems.empty();
|
||||
|
||||
while (!leftItems.empty() && !rightItems.empty())
|
||||
{
|
||||
SequenceItem item;
|
||||
item.index1 = leftItems.back().index1;
|
||||
item.index2 = rightItems.back().index2;
|
||||
item.markReplaced();
|
||||
updatedSequence.push_back(item);
|
||||
|
||||
leftItems.pop_back();
|
||||
rightItems.pop_back();
|
||||
}
|
||||
|
||||
while (!leftItems.empty())
|
||||
{
|
||||
SequenceItem item = leftItems.back();
|
||||
item.markRemoved();
|
||||
|
||||
if (isReplaced)
|
||||
{
|
||||
item.markReplaced();
|
||||
}
|
||||
|
||||
updatedSequence.push_back(item);
|
||||
leftItems.pop_back();
|
||||
}
|
||||
|
||||
while (!rightItems.empty())
|
||||
{
|
||||
SequenceItem item = rightItems.back();
|
||||
item.markAdded();
|
||||
|
||||
if (isReplaced)
|
||||
{
|
||||
item.markReplaced();
|
||||
}
|
||||
|
||||
updatedSequence.push_back(item);
|
||||
rightItems.pop_back();
|
||||
}
|
||||
}
|
||||
|
||||
for (SequenceItem& item : updatedSequence)
|
||||
{
|
||||
if (item.isMatch() && !item.isRemoved() && !item.isReplaced() && !item.isAdded() && item.index1 != item.index2)
|
||||
{
|
||||
item.markMoved();
|
||||
}
|
||||
}
|
||||
|
||||
sequence = qMove(updatedSequence);
|
||||
}
|
||||
|
||||
PDFAlgorithmLongestCommonSubsequenceBase::SequenceItemRanges PDFAlgorithmLongestCommonSubsequenceBase::getModifiedRanges(Sequence& sequence)
|
||||
{
|
||||
SequenceItemRanges result;
|
||||
|
||||
for (auto it = sequence.begin(); it != sequence.end();)
|
||||
{
|
||||
const SequenceItem& item = *it;
|
||||
if (!item.isModified())
|
||||
{
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Jakub Melka: now, we have iterator pointing on item,
|
||||
// which has been modified. We will search for modification
|
||||
// range.
|
||||
|
||||
auto itEnd = it;
|
||||
while (itEnd != sequence.end() && itEnd->isModified())
|
||||
{
|
||||
++itEnd;
|
||||
}
|
||||
|
||||
result.emplace_back(it, itEnd);
|
||||
it = itEnd;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
PDFAlgorithmLongestCommonSubsequenceBase::SequenceItemFlags PDFAlgorithmLongestCommonSubsequenceBase::collectFlags(const SequenceItemRange& range)
|
||||
{
|
||||
SequenceItemFlags flags = 0;
|
||||
|
||||
for (auto it = range.first; it != range.second; ++it)
|
||||
{
|
||||
flags |= it->flags;
|
||||
}
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
} // namespace pdf
|
260
Pdf4QtLib/sources/pdfalgorithmlcs.h
Normal file
@ -0,0 +1,260 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef PDFALGORITHMLCS_H
|
||||
#define PDFALGORITHMLCS_H
|
||||
|
||||
#include "pdfglobal.h"
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
|
||||
class PDFAlgorithmLongestCommonSubsequenceBase
|
||||
{
|
||||
public:
|
||||
|
||||
enum SequenceItemFlag
|
||||
{
|
||||
None = 0x0000,
|
||||
MovedLeft = 0x0001, ///< Item has been moved from this position (is present in a sequence no. 1)
|
||||
MovedRight = 0x0002, ///< Item has been moved to this position (is present in a sequence no. 2)
|
||||
Moved = 0x0004, ///< Index of item has been changed
|
||||
Added = 0x0008, ///< Item has been added to a sequence no. 2
|
||||
Removed = 0x0010, ///< Item has been removed from a sequence no. 1
|
||||
Replaced = 0x0020, ///< Item has been replaced (or sequence of items has been replaced)
|
||||
};
|
||||
Q_DECLARE_FLAGS(SequenceItemFlags, SequenceItemFlag)
|
||||
|
||||
struct SequenceItem
|
||||
{
|
||||
size_t index1 = std::numeric_limits<size_t>::max();
|
||||
size_t index2 = std::numeric_limits<size_t>::max();
|
||||
SequenceItemFlags flags = None;
|
||||
|
||||
bool isLeftValid() const { return index1 != std::numeric_limits<size_t>::max(); }
|
||||
bool isRightValid() const { return index2 != std::numeric_limits<size_t>::max(); }
|
||||
bool isLeft() const { return isLeftValid() && !isRightValid(); }
|
||||
bool isRight() const { return isRightValid() && !isLeftValid(); }
|
||||
bool isMatch() const { return isLeftValid() && isRightValid(); }
|
||||
bool isMovedLeft() const { return flags.testFlag(MovedLeft); }
|
||||
bool isMovedRight() const { return flags.testFlag(MovedRight); }
|
||||
bool isMoved() const { return flags.testFlag(Moved); }
|
||||
bool isAdded() const { return flags.testFlag(Added); }
|
||||
bool isRemoved() const { return flags.testFlag(Removed); }
|
||||
bool isReplaced() const { return flags.testFlag(Replaced); }
|
||||
bool isModified() const { return isAdded() || isRemoved() || isReplaced(); }
|
||||
|
||||
void markMovedLeft() { flags.setFlag(MovedLeft); }
|
||||
void markMovedRight() { flags.setFlag(MovedRight); }
|
||||
void markMoved() { flags.setFlag(Moved); }
|
||||
void markAdded() { flags.setFlag(Added); }
|
||||
void markRemoved() { flags.setFlag(Removed); }
|
||||
void markReplaced() { flags.setFlag(Replaced); }
|
||||
};
|
||||
|
||||
using Sequence = typename std::vector<SequenceItem>;
|
||||
using SequenceIterator = typename Sequence::iterator;
|
||||
using SequenceItemRange = typename std::pair<SequenceIterator, SequenceIterator>;
|
||||
using SequenceItemRanges = typename std::vector<SequenceItemRange>;
|
||||
|
||||
/// Marks a sequence with set of flags representing added/removed/replaced/moved
|
||||
/// items. Moved items sequences must be sorted.
|
||||
/// \param sequence Sequence to be marked
|
||||
/// \param movedItemsLeft Sorted sequence of left indices, which have been moved
|
||||
/// \param movedItemsRight sorted sequence of right indices, which have been moved
|
||||
static void markSequence(Sequence& sequence,
|
||||
const std::vector<size_t>& movedItemsLeft,
|
||||
const std::vector<size_t>& movedItemsRight);
|
||||
|
||||
/// Returns item ranges, which should be checked - for example,
|
||||
/// for text modification.
|
||||
/// \param sequence Sequence
|
||||
static SequenceItemRanges getModifiedRanges(Sequence& sequence);
|
||||
|
||||
/// Collect flags from given item range
|
||||
/// \param range Range
|
||||
static SequenceItemFlags collectFlags(const SequenceItemRange& range);
|
||||
};
|
||||
|
||||
/// Algorithm for computing longest common subsequence, on two sequences
|
||||
/// of objects, which are implementing operator "==" (equal operator).
|
||||
/// Constructor takes bidirectional iterators to the sequence. So, iterators
|
||||
/// are requred to be bidirectional.
|
||||
template<typename Iterator, typename Comparator>
|
||||
class PDFAlgorithmLongestCommonSubsequence : public PDFAlgorithmLongestCommonSubsequenceBase
|
||||
{
|
||||
public:
|
||||
PDFAlgorithmLongestCommonSubsequence(Iterator it1,
|
||||
Iterator it1End,
|
||||
Iterator it2,
|
||||
Iterator it2End,
|
||||
Comparator comparator);
|
||||
|
||||
|
||||
void perform();
|
||||
|
||||
const Sequence& getSequence() const { return m_sequence; }
|
||||
|
||||
private:
|
||||
Iterator m_it1;
|
||||
Iterator m_it1End;
|
||||
Iterator m_it2;
|
||||
Iterator m_it2End;
|
||||
|
||||
size_t m_size1;
|
||||
size_t m_size2;
|
||||
size_t m_matrixSize;
|
||||
|
||||
Comparator m_comparator;
|
||||
|
||||
std::vector<bool> m_backtrackData;
|
||||
Sequence m_sequence;
|
||||
};
|
||||
|
||||
template<typename Iterator, typename Comparator>
|
||||
PDFAlgorithmLongestCommonSubsequence<Iterator, Comparator>::PDFAlgorithmLongestCommonSubsequence(Iterator it1,
|
||||
Iterator it1End,
|
||||
Iterator it2,
|
||||
Iterator it2End,
|
||||
Comparator comparator) :
|
||||
m_it1(std::move(it1)),
|
||||
m_it1End(std::move(it1End)),
|
||||
m_it2(std::move(it2)),
|
||||
m_it2End(std::move(it2End)),
|
||||
m_size1(0),
|
||||
m_size2(0),
|
||||
m_matrixSize(0),
|
||||
m_comparator(std::move(comparator))
|
||||
{
|
||||
m_size1 = std::distance(m_it1, m_it1End) + 1;
|
||||
m_size2 = std::distance(m_it2, m_it2End) + 1;
|
||||
m_matrixSize = m_size1 * m_size2;
|
||||
}
|
||||
|
||||
template<typename Iterator, typename Comparator>
|
||||
void PDFAlgorithmLongestCommonSubsequence<Iterator, Comparator>::perform()
|
||||
{
|
||||
m_backtrackData.resize(m_matrixSize);
|
||||
m_sequence.clear();
|
||||
|
||||
std::vector<size_t> rowTop(m_size1, size_t());
|
||||
std::vector<size_t> rowBottom(m_size1, size_t());
|
||||
|
||||
// Jakub Melka: we will have columns consisting of it1...it1End
|
||||
// and rows consisting of it2...it2End. We iterate trough rows,
|
||||
// and for each row, we update longest common subsequence data.
|
||||
|
||||
auto it2 = m_it2;
|
||||
for (size_t i2 = 1; i2 < m_size2; ++i2, ++it2)
|
||||
{
|
||||
auto it1 = m_it1;
|
||||
for (size_t i1 = 1; i1 < m_size1; ++i1, ++it1)
|
||||
{
|
||||
if (m_comparator(*it1, *it2))
|
||||
{
|
||||
// We have match
|
||||
rowBottom[i1] = rowTop[i1 - 1] + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
const size_t leftCellValue = rowBottom[i1 - 1];
|
||||
const size_t upperCellValue = rowTop[i1];
|
||||
bool isLeftBigger = leftCellValue > upperCellValue;
|
||||
|
||||
if (isLeftBigger)
|
||||
{
|
||||
rowBottom[i1] = leftCellValue;
|
||||
m_backtrackData[i2 * m_size1 + i1] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
rowBottom[i1] = upperCellValue;
|
||||
m_backtrackData[i2 * m_size1 + i1] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Bottom row will become top row
|
||||
std::swap(rowTop, rowBottom);
|
||||
}
|
||||
|
||||
size_t i1 = m_size1 - 1;
|
||||
size_t i2 = m_size2 - 1;
|
||||
|
||||
while (i1 > 0 && i2 > 0)
|
||||
{
|
||||
SequenceItem item;
|
||||
|
||||
const size_t index1 = i1 - 1;
|
||||
const size_t index2 = i2 - 1;
|
||||
|
||||
auto it1 = std::next(m_it1, index1);
|
||||
auto it2 = std::next(m_it2, index2);
|
||||
|
||||
if (m_comparator(*it1, *it2))
|
||||
{
|
||||
item.index1 = index1;
|
||||
item.index2 = index2;
|
||||
|
||||
--i1;
|
||||
--i2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_backtrackData[i2 * m_size1 + i1])
|
||||
{
|
||||
item.index1 = index1;
|
||||
--i1;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.index2 = index2;
|
||||
--i2;
|
||||
}
|
||||
}
|
||||
|
||||
m_sequence.push_back(item);
|
||||
}
|
||||
|
||||
while (i1 > 0)
|
||||
{
|
||||
SequenceItem item;
|
||||
|
||||
const size_t index1 = i1 - 1;
|
||||
item.index1 = index1;
|
||||
--i1;
|
||||
|
||||
m_sequence.push_back(item);
|
||||
}
|
||||
|
||||
while (i2 > 0)
|
||||
{
|
||||
SequenceItem item;
|
||||
|
||||
const size_t index2 = i2 - 1;
|
||||
item.index2 = index2;
|
||||
--i2;
|
||||
|
||||
m_sequence.push_back(item);
|
||||
}
|
||||
|
||||
std::reverse(m_sequence.begin(), m_sequence.end());
|
||||
}
|
||||
|
||||
} // namespace pdf
|
||||
|
||||
#endif // PDFALGORITHMLCS_H
|
@ -39,12 +39,13 @@ class PDFDocument;
|
||||
/// to be used in viewer application.
|
||||
enum class PageLayout
|
||||
{
|
||||
SinglePage, ///< Display one page at time (single page on screen)
|
||||
OneColumn, ///< Displays pages in one column (continuous mode)
|
||||
TwoColumnLeft, ///< Display pages in two continuous columns, odd numbered pages are on the left
|
||||
TwoColumnRight, ///< Display pages in two continuous columns, even numbered pages are on the left
|
||||
TwoPagesLeft, ///< Display two pages on the screen, odd numbered pages are on the left
|
||||
TwoPagesRight ///< Display two pages on the screen, even numbered pages are on the left
|
||||
SinglePage, ///< Display one page at time (single page on screen)
|
||||
OneColumn, ///< Displays pages in one column (continuous mode)
|
||||
TwoColumnLeft, ///< Display pages in two continuous columns, odd numbered pages are on the left
|
||||
TwoColumnRight, ///< Display pages in two continuous columns, even numbered pages are on the left
|
||||
TwoPagesLeft, ///< Display two pages on the screen, odd numbered pages are on the left
|
||||
TwoPagesRight, ///< Display two pages on the screen, even numbered pages are on the left
|
||||
Custom ///< Custom layout, multiple columns can be used, -1 as page index means page is omitted
|
||||
};
|
||||
|
||||
/// Specifies, how the document should be displayed in the viewer application.
|
||||
|
1869
Pdf4QtLib/sources/pdfdiff.cpp
Normal file
408
Pdf4QtLib/sources/pdfdiff.h
Normal file
@ -0,0 +1,408 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef PDFDIFF_H
|
||||
#define PDFDIFF_H
|
||||
|
||||
#include "pdfdocument.h"
|
||||
#include "pdfprogress.h"
|
||||
#include "pdfutils.h"
|
||||
#include "pdfalgorithmlcs.h"
|
||||
#include "pdfdocumenttextflow.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
class QIODevice;
|
||||
class QXmlStreamWriter;
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
|
||||
struct PDFDiffPageContext;
|
||||
|
||||
class PDF4QTLIBSHARED_EXPORT PDFDiffResult
|
||||
{
|
||||
public:
|
||||
explicit PDFDiffResult();
|
||||
|
||||
enum class Type : uint32_t
|
||||
{
|
||||
Invalid = 0x0000,
|
||||
PageMoved = 0x0001,
|
||||
PageAdded = 0x0002,
|
||||
PageRemoved = 0x0004,
|
||||
RemovedTextCharContent = 0x0008,
|
||||
RemovedVectorGraphicContent = 0x0010,
|
||||
RemovedImageContent = 0x0020,
|
||||
RemovedShadingContent = 0x0040,
|
||||
AddedTextCharContent = 0x0080,
|
||||
AddedVectorGraphicContent = 0x0100,
|
||||
AddedImageContent = 0x0200,
|
||||
AddedShadingContent = 0x0400,
|
||||
TextReplaced = 0x0800,
|
||||
TextAdded = 0x1000,
|
||||
TextRemoved = 0x2000,
|
||||
};
|
||||
|
||||
struct PageSequenceItem
|
||||
{
|
||||
PDFInteger leftPage = -1;
|
||||
PDFInteger rightPage = -1;
|
||||
};
|
||||
|
||||
using PageSequence = std::vector<PageSequenceItem>;
|
||||
|
||||
using RectInfos = std::vector<std::pair<PDFInteger, QRectF>>;
|
||||
using RectInfosIt = typename RectInfos::const_iterator;
|
||||
|
||||
void setResult(PDFOperationResult result) { m_result = std::move(result); }
|
||||
const PDFOperationResult& getResult() const { return m_result; }
|
||||
|
||||
/// Returns true, if some difference was found
|
||||
bool isChanged() const { return getDifferencesCount() > 0; }
|
||||
|
||||
/// Returns true, if no difference was found
|
||||
bool isSame() const { return !isChanged(); }
|
||||
|
||||
/// Returns number of detected changes
|
||||
size_t getDifferencesCount() const { return m_differences.size(); }
|
||||
|
||||
/// Returns message describing difference in a page content
|
||||
/// \param index Index
|
||||
QString getMessage(size_t index) const;
|
||||
|
||||
/// Returns index of left page (or -1, if difference occured
|
||||
/// only on a right page)
|
||||
/// \param index Index
|
||||
PDFInteger getLeftPage(size_t index) const;
|
||||
|
||||
/// Returns index of right page (or -1, if difference occured
|
||||
/// only on a left page)
|
||||
/// \param index Index
|
||||
PDFInteger getRightPage(size_t index) const;
|
||||
|
||||
/// Return type of difference
|
||||
/// \param index Index
|
||||
Type getType(size_t index) const;
|
||||
|
||||
/// Returns text description of type
|
||||
/// \param index Index
|
||||
QString getTypeDescription(size_t index) const;
|
||||
|
||||
/// Returns iterator range for rectangles of "left" pages of an item
|
||||
std::pair<RectInfosIt, RectInfosIt> getLeftRectangles(size_t index) const;
|
||||
|
||||
/// Returns iterator range for rectangles of "right" pages of an item
|
||||
std::pair<RectInfosIt, RectInfosIt> getRightRectangles(size_t index) const;
|
||||
|
||||
bool isPageMoveAddRemoveDifference(size_t index) const;
|
||||
bool isPageMoveDifference(size_t index) const;
|
||||
bool isAddDifference(size_t index) const;
|
||||
bool isRemoveDifference(size_t index) const;
|
||||
bool isReplaceDifference(size_t index) const;
|
||||
|
||||
bool hasPageMoveDifferences() const { return m_typeFlags & FLAGS_PAGE_MOVE; }
|
||||
bool hasTextDifferences() const { return m_typeFlags & FLAGS_TEXT; }
|
||||
bool hasVectorGraphicsDifferences() const { return m_typeFlags & FLAGS_VECTOR_GRAPHICS; }
|
||||
bool hasImageDifferences() const { return m_typeFlags & FLAGS_IMAGE; }
|
||||
bool hasShadingDifferences() const { return m_typeFlags & FLAGS_SHADING; }
|
||||
|
||||
/// Returns sorted changed page indices from left document
|
||||
std::vector<PDFInteger> getChangedLeftPageIndices() const;
|
||||
|
||||
/// Returns sorted changed page indices from right document
|
||||
std::vector<PDFInteger> getChangedRightPageIndices() const;
|
||||
|
||||
/// Filters results using given critera
|
||||
/// \param filterPageMoveDifferences Filter page move differences?
|
||||
/// \param filterTextDifferences Filter text diffferences?
|
||||
/// \param filterVectorGraphicsDifferences Filter vector graphics differences?
|
||||
/// \param filterImageDifferences Filter image differences?
|
||||
/// \param filterShadingDifferences Filter shading differences?
|
||||
PDFDiffResult filter(bool filterPageMoveDifferences,
|
||||
bool filterTextDifferences,
|
||||
bool filterVectorGraphicsDifferences,
|
||||
bool filterImageDifferences,
|
||||
bool filterShadingDifferences);
|
||||
|
||||
const PageSequence& getPageSequence() const;
|
||||
void setPageSequence(PageSequence pageSequence);
|
||||
|
||||
/// Saves all differences to a XML stream
|
||||
/// represented by device
|
||||
/// \param device Output device
|
||||
void saveToXML(QIODevice* device) const;
|
||||
|
||||
/// Saves all differences to a byte array
|
||||
/// \param byteArray Output byte array
|
||||
void saveToXML(QByteArray* byteArray) const;
|
||||
|
||||
/// Saves all differences to a string
|
||||
/// \param string Output string
|
||||
void saveToXML(QString* string) const;
|
||||
|
||||
private:
|
||||
friend class PDFDiff;
|
||||
|
||||
static constexpr uint32_t FLAGS_PAGE_MOVE = uint32_t(Type::PageMoved) | uint32_t(Type::PageAdded) | uint32_t(Type::PageRemoved);
|
||||
static constexpr uint32_t FLAGS_TEXT = uint32_t(Type::RemovedTextCharContent) | uint32_t(Type::AddedTextCharContent) | uint32_t(Type::TextReplaced) | uint32_t(Type::TextAdded) | uint32_t(Type::TextRemoved);
|
||||
static constexpr uint32_t FLAGS_VECTOR_GRAPHICS = uint32_t(Type::RemovedVectorGraphicContent) | uint32_t(Type::AddedVectorGraphicContent);
|
||||
static constexpr uint32_t FLAGS_IMAGE = uint32_t(Type::RemovedImageContent) | uint32_t(Type::AddedImageContent);
|
||||
static constexpr uint32_t FLAGS_SHADING = uint32_t(Type::RemovedShadingContent) | uint32_t(Type::AddedShadingContent);
|
||||
|
||||
static constexpr uint32_t FLAGS_TYPE_PAGE_MOVE = uint32_t(Type::PageMoved);
|
||||
static constexpr uint32_t FLAGS_TYPE_PAGE_MOVE_ADD_REMOVE = uint32_t(Type::PageMoved) | uint32_t(Type::PageAdded) | uint32_t(Type::PageRemoved);
|
||||
static constexpr uint32_t FLAGS_TYPE_ADD = uint32_t(Type::PageAdded) | uint32_t(Type::AddedTextCharContent) | uint32_t(Type::AddedVectorGraphicContent) | uint32_t(Type::AddedImageContent) | uint32_t(Type::AddedShadingContent) | uint32_t(Type::TextAdded);
|
||||
static constexpr uint32_t FLAGS_TYPE_REMOVE = uint32_t(Type::PageRemoved) | uint32_t(Type::RemovedTextCharContent) | uint32_t(Type::RemovedVectorGraphicContent) | uint32_t(Type::RemovedImageContent) | uint32_t(Type::RemovedShadingContent) | uint32_t(Type::TextRemoved);
|
||||
static constexpr uint32_t FLAGS_TYPE_REPLACE = uint32_t(Type::TextReplaced);
|
||||
|
||||
void addPageMoved(PDFInteger pageIndex1, PDFInteger pageIndex2);
|
||||
void addPageAdded(PDFInteger pageIndex);
|
||||
void addPageRemoved(PDFInteger pageIndex);
|
||||
|
||||
void addRemovedTextCharContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addRemovedVectorGraphicContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addRemovedImageContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addRemovedShadingContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addAddedTextCharContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addAddedVectorGraphicContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addAddedImageContent(PDFInteger pageIndex, QRectF rect);
|
||||
void addAddedShadingContent(PDFInteger pageIndex, QRectF rect);
|
||||
|
||||
void addTextAdded(PDFInteger pageIndex, QString text, const RectInfos& rectInfos);
|
||||
void addTextRemoved(PDFInteger pageIndex, QString text, const RectInfos& rectInfos);
|
||||
|
||||
void addTextReplaced(PDFInteger pageIndex1,
|
||||
PDFInteger pageIndex2,
|
||||
QString textRemoved,
|
||||
QString textAdded,
|
||||
const RectInfos& rectInfos1,
|
||||
const RectInfos& rectInfos2);
|
||||
|
||||
void saveToStream(QXmlStreamWriter* stream) const;
|
||||
|
||||
void finalize();
|
||||
|
||||
uint32_t getTypeFlags(size_t index) const;
|
||||
|
||||
/// Single content difference descriptor. It describes type
|
||||
/// of difference (such as graphics, image, text change) on a page
|
||||
/// or on a list of multiple pages.
|
||||
struct Difference
|
||||
{
|
||||
Type type = Type::Invalid;
|
||||
PDFInteger pageIndex1 = -1;
|
||||
PDFInteger pageIndex2 = -1;
|
||||
size_t leftRectIndex = 0;
|
||||
size_t leftRectCount = 0;
|
||||
size_t rightRectIndex = 0;
|
||||
size_t rightRectCount = 0;
|
||||
int textAddedIndex = -1;
|
||||
int textRemovedIndex = -1;
|
||||
};
|
||||
|
||||
using Differences = std::vector<Difference>;
|
||||
|
||||
void addLeftItem(Type type, PDFInteger pageIndex, QRectF rect);
|
||||
void addRightItem(Type type, PDFInteger pageIndex, QRectF rect);
|
||||
|
||||
void addRectLeft(Difference& difference, QRectF rect);
|
||||
void addRectRight(Difference& difference, QRectF rect);
|
||||
|
||||
Differences m_differences;
|
||||
RectInfos m_rects; ///< Rectangles with page indices
|
||||
PDFOperationResult m_result;
|
||||
QStringList m_strings;
|
||||
uint32_t m_typeFlags = 0;
|
||||
PageSequence m_pageSequence;
|
||||
};
|
||||
|
||||
/// Class for result navigation, can go to next, or previous result.
|
||||
class PDF4QTLIBSHARED_EXPORT PDFDiffResultNavigator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PDFDiffResultNavigator(QObject* parent);
|
||||
virtual ~PDFDiffResultNavigator() override;
|
||||
|
||||
void setResult(const PDFDiffResult* diffResult);
|
||||
|
||||
/// Returns true, if valid result is selected
|
||||
bool isSelected() const;
|
||||
|
||||
/// Returns true if action go to next result can be performed,
|
||||
/// otherwise false is returned.
|
||||
bool canGoNext() const;
|
||||
|
||||
/// Returns true if action go to previous result can be performed,
|
||||
/// otherwise false is returned.
|
||||
bool canGoPrevious() const;
|
||||
|
||||
/// Goes to next result. If action cannot be performed,
|
||||
/// nothing happens and signal is not emitted.
|
||||
void goNext();
|
||||
|
||||
/// Goes to previous result. If action cannot be performed,
|
||||
/// nothing happens and signal is not emitted.
|
||||
void goPrevious();
|
||||
|
||||
/// Updates selection, if difference result was changed
|
||||
void update();
|
||||
|
||||
/// Selects current index
|
||||
/// \param currentIndex
|
||||
void select(size_t currentIndex);
|
||||
|
||||
signals:
|
||||
void selectionChanged(size_t currentIndex);
|
||||
|
||||
private:
|
||||
size_t getLimit() const { return m_diffResult ? m_diffResult->getDifferencesCount() : 0; }
|
||||
|
||||
const PDFDiffResult* m_diffResult;
|
||||
size_t m_currentIndex;
|
||||
};
|
||||
|
||||
/// Diff engine for comparing two pdf documents.
|
||||
class PDF4QTLIBSHARED_EXPORT PDFDiff : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
using BaseClass = QObject;
|
||||
|
||||
public:
|
||||
explicit PDFDiff(QObject* parent);
|
||||
virtual ~PDFDiff() override;
|
||||
|
||||
enum Option
|
||||
{
|
||||
None = 0x0000,
|
||||
Asynchronous = 0x0001, ///< Compare document asynchronously
|
||||
PC_Text = 0x0002, ///< Use text to compare pages (determine, which pages correspond to each other)
|
||||
PC_VectorGraphics = 0x0004, ///< Use vector graphics to compare pages (determine, which pages correspond to each other)
|
||||
PC_Images = 0x0008, ///< Use images to compare pages (determine, which pages correspond to each other)
|
||||
PC_Mesh = 0x0010, ///< Use mesh to compare pages (determine, which pages correspond to each other)
|
||||
CompareTextsAsVector = 0x0020, ///< Compare texts as vector graphics
|
||||
CompareWords = 0x0040, ///< Compare words, not just characters
|
||||
};
|
||||
Q_DECLARE_FLAGS(Options, Option)
|
||||
|
||||
/// Source document (left)
|
||||
/// \param leftDocument Document
|
||||
void setLeftDocument(const PDFDocument* leftDocument);
|
||||
|
||||
/// Source document (right)(
|
||||
/// \param rightDocument Document
|
||||
void setRightDocument(const PDFDocument* rightDocument);
|
||||
|
||||
/// Source pages to be compared (left document)
|
||||
/// \param pagesForLeftDocument Page indices
|
||||
void setPagesForLeftDocument(PDFClosedIntervalSet pagesForLeftDocument);
|
||||
|
||||
/// Source pages to be compared (right document)
|
||||
/// \param pagesForRightDocument Page indices
|
||||
void setPagesForRightDocument(PDFClosedIntervalSet pagesForRightDocument);
|
||||
|
||||
/// Sets progress object
|
||||
/// \param progress Progress object
|
||||
void setProgress(PDFProgress* progress) { m_progress = progress; }
|
||||
|
||||
/// Enables or disables comparator engine option
|
||||
/// \param option Option
|
||||
/// \param enable Enable or disable option?
|
||||
void setOption(Option option, bool enable) { m_options.setFlag(option, enable); }
|
||||
|
||||
/// Starts comparator engine. If asynchronous engine option
|
||||
/// is enabled, then separate thread is started, in which two
|
||||
/// document is compared, and then signal \p comparationFinished,
|
||||
/// otherwise this function is blocking until comparation process
|
||||
/// is finished.
|
||||
void start();
|
||||
|
||||
/// Stops comparator engine. Result data are cleared.
|
||||
void stop();
|
||||
|
||||
/// Returns result of a comparation process
|
||||
const PDFDiffResult& getResult() const { return m_result; }
|
||||
|
||||
PDFDocumentTextFlowFactory::Algorithm getTextAnalysisAlgorithm() const;
|
||||
void setTextAnalysisAlgorithm(PDFDocumentTextFlowFactory::Algorithm textAnalysisAlgorithm);
|
||||
|
||||
signals:
|
||||
void comparationFinished();
|
||||
|
||||
private:
|
||||
|
||||
enum Steps
|
||||
{
|
||||
StepExtractContentLeftDocument,
|
||||
StepExtractContentRightDocument,
|
||||
StepMatchPages,
|
||||
StepExtractTextLeftDocument,
|
||||
StepExtractTextRightDocument,
|
||||
StepCompare,
|
||||
StepLast
|
||||
};
|
||||
|
||||
PDFDiffResult perform();
|
||||
void stepProgress();
|
||||
void performSteps(const std::vector<PDFInteger>& leftPages,
|
||||
const std::vector<PDFInteger>& rightPages,
|
||||
PDFDiffResult& result);
|
||||
void performPageMatching(const std::vector<PDFDiffPageContext>& leftPreparedPages,
|
||||
const std::vector<PDFDiffPageContext>& rightPreparedPages,
|
||||
PDFAlgorithmLongestCommonSubsequenceBase::Sequence& pageSequence,
|
||||
std::map<size_t, size_t>& pageMatches);
|
||||
void performCompare(const std::vector<PDFDiffPageContext>& leftPreparedPages,
|
||||
const std::vector<PDFDiffPageContext>& rightPreparedPages,
|
||||
PDFAlgorithmLongestCommonSubsequenceBase::Sequence& pageSequence,
|
||||
const std::map<size_t, size_t>& pageMatches,
|
||||
PDFDiffResult& result);
|
||||
void finalizeGraphicsPieces(PDFDiffPageContext& context);
|
||||
|
||||
void onComparationPerformed();
|
||||
|
||||
/// Calculates real epsilon for a page. Epsilon is used in page
|
||||
/// comparation process, where points closer that epsilon
|
||||
/// are recognized as equal.
|
||||
/// \param page Page
|
||||
PDFReal calculateEpsilonForPage(const PDFPage* page) const;
|
||||
|
||||
PDFProgress* m_progress;
|
||||
const PDFDocument* m_leftDocument;
|
||||
const PDFDocument* m_rightDocument;
|
||||
PDFClosedIntervalSet m_pagesForLeftDocument;
|
||||
PDFClosedIntervalSet m_pagesForRightDocument;
|
||||
Options m_options;
|
||||
PDFReal m_epsilon;
|
||||
std::atomic_bool m_cancelled;
|
||||
PDFDiffResult m_result;
|
||||
PDFDocumentTextFlowFactory::Algorithm m_textAnalysisAlgorithm;
|
||||
|
||||
QFuture<PDFDiffResult> m_future;
|
||||
std::optional<QFutureWatcher<PDFDiffResult>> m_futureWatcher;
|
||||
};
|
||||
|
||||
} // namespace pdf
|
||||
|
||||
#endif // PDFDIFF_H
|
@ -99,6 +99,31 @@ PDFOperationResult PDFDocumentManipulator::assemble(const AssembledPages& pages)
|
||||
return true;
|
||||
}
|
||||
|
||||
PDFDocumentManipulator::AssembledPages PDFDocumentManipulator::createAllDocumentPages(int documentIndex, const PDFDocument* document)
|
||||
{
|
||||
AssembledPages assembledPages;
|
||||
size_t pageCount = document->getCatalog()->getPageCount();
|
||||
|
||||
for (size_t i = 0; i < pageCount; ++i)
|
||||
{
|
||||
pdf::PDFDocumentManipulator::AssembledPage assembledPage;
|
||||
|
||||
assembledPage.documentIndex = documentIndex;
|
||||
assembledPage.imageIndex = -1;
|
||||
assembledPage.pageIndex = i;
|
||||
|
||||
const pdf::PDFPage* page = document->getCatalog()->getPage(i);
|
||||
const pdf::PageRotation originalPageRotation = page->getPageRotation();
|
||||
|
||||
assembledPage.pageRotation = originalPageRotation;
|
||||
assembledPage.pageSize = page->getMediaBox().size();
|
||||
|
||||
assembledPages.emplace_back(assembledPage);
|
||||
}
|
||||
|
||||
return assembledPages;
|
||||
}
|
||||
|
||||
PDFDocumentManipulator::ProcessedPages PDFDocumentManipulator::processPages(PDFDocumentBuilder& documentBuilder, const AssembledPages& pages)
|
||||
{
|
||||
ProcessedPages processedPages;
|
||||
|
@ -91,6 +91,8 @@ public:
|
||||
/// \returns Assembled document
|
||||
PDFDocument&& takeAssembledDocument() { return std::move(m_assembledDocument); }
|
||||
|
||||
static AssembledPages createAllDocumentPages(int documentIndex, const PDFDocument* document);
|
||||
|
||||
static constexpr AssembledPage createDocumentPage(int documentIndex, int pageIndex, QSizeF pageSize, PageRotation pageRotation) { return AssembledPage{ documentIndex, -1, pageIndex, pageSize, pageRotation}; }
|
||||
static constexpr AssembledPage createImagePage(int imageIndex, QSizeF pageSize, PageRotation pageRotation) { return AssembledPage{ -1, imageIndex, -1, pageSize, pageRotation}; }
|
||||
static constexpr AssembledPage createBlankPage(QSizeF pageSize, PageRotation pageRotation) { return AssembledPage{ -1, -1, -1, pageSize, pageRotation}; }
|
||||
|
@ -89,21 +89,22 @@ struct PDFStructureTreeTextItem
|
||||
};
|
||||
|
||||
PDFStructureTreeTextItem() = default;
|
||||
PDFStructureTreeTextItem(Type type, const PDFStructureItem* item, QString text, PDFInteger pageIndex, QRectF boundingRect) :
|
||||
type(type), item(item), text(qMove(text)), pageIndex(pageIndex), boundingRect(boundingRect)
|
||||
PDFStructureTreeTextItem(Type type, const PDFStructureItem* item, QString text, PDFInteger pageIndex, QRectF boundingRect, std::vector<QRectF> characterBoundingRects) :
|
||||
type(type), item(item), text(qMove(text)), pageIndex(pageIndex), boundingRect(boundingRect), characterBoundingRects(std::move(characterBoundingRects))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static PDFStructureTreeTextItem createText(QString text, PDFInteger pageIndex, QRectF boundingRect) { return PDFStructureTreeTextItem(Type::Text, nullptr, qMove(text), pageIndex, boundingRect); }
|
||||
static PDFStructureTreeTextItem createStartTag(const PDFStructureItem* item) { return PDFStructureTreeTextItem(Type::StartTag, item, QString(), -1, QRectF()); }
|
||||
static PDFStructureTreeTextItem createEndTag(const PDFStructureItem* item) { return PDFStructureTreeTextItem(Type::EndTag, item, QString(), -1, QRectF()); }
|
||||
static PDFStructureTreeTextItem createText(QString text, PDFInteger pageIndex, QRectF boundingRect, std::vector<QRectF> characterBoundingRects) { return PDFStructureTreeTextItem(Type::Text, nullptr, qMove(text), pageIndex, boundingRect, std::move(characterBoundingRects)); }
|
||||
static PDFStructureTreeTextItem createStartTag(const PDFStructureItem* item) { return PDFStructureTreeTextItem(Type::StartTag, item, QString(), -1, QRectF(), { }); }
|
||||
static PDFStructureTreeTextItem createEndTag(const PDFStructureItem* item) { return PDFStructureTreeTextItem(Type::EndTag, item, QString(), -1, QRectF(), { }); }
|
||||
|
||||
Type type = Type::Text;
|
||||
const PDFStructureItem* item = nullptr;
|
||||
QString text;
|
||||
PDFInteger pageIndex = -1;
|
||||
QRectF boundingRect;
|
||||
std::vector<QRectF> characterBoundingRects;
|
||||
};
|
||||
|
||||
using PDFStructureTreeTextSequence = std::vector<PDFStructureTreeTextItem>;
|
||||
@ -147,6 +148,7 @@ public:
|
||||
QRectF boundingRect;
|
||||
PDFInteger pageIndex = -1;
|
||||
QString text;
|
||||
std::vector<QRectF> characterBoundingRects;
|
||||
};
|
||||
|
||||
using TextItems = std::vector<TextItem>;
|
||||
@ -204,7 +206,6 @@ protected:
|
||||
virtual void performOutputCharacter(const PDFTextCharacterInfo& info) override;
|
||||
virtual void performMarkedContentBegin(const QByteArray& tag, const PDFObject& properties) override;
|
||||
virtual void performMarkedContentEnd() override;
|
||||
virtual void performPathPainting(const QPainterPath& path, bool stroke, bool fill, bool text, Qt::FillRule fillRule) override;
|
||||
|
||||
private:
|
||||
const PDFStructureItem* getStructureTreeItemFromMCID(PDFInteger mcid) const;
|
||||
@ -232,33 +233,25 @@ private:
|
||||
QStringList m_unmatchedText;
|
||||
PDFStructureTreeTextExtractor::Options m_extractorOptions;
|
||||
PDFInteger m_pageIndex;
|
||||
std::vector<QRectF> m_characterBoundingRects;
|
||||
};
|
||||
|
||||
void PDFStructureTreeTextContentProcessor::performPathPainting(const QPainterPath& path, bool stroke, bool fill, bool text, Qt::FillRule fillRule)
|
||||
{
|
||||
if (!text)
|
||||
{
|
||||
// Jakub Melka: This should not occur
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_extractorOptions.testFlag(PDFStructureTreeTextExtractor::BoundingBoxes))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Q_UNUSED(stroke);
|
||||
Q_UNUSED(fill);
|
||||
Q_UNUSED(fillRule);
|
||||
|
||||
QMatrix matrix = getCurrentWorldMatrix();
|
||||
QPainterPath worldPath = matrix.map(path);
|
||||
m_currentBoundingBox = m_currentBoundingBox.united(worldPath.controlPointRect());
|
||||
}
|
||||
|
||||
void PDFStructureTreeTextContentProcessor::finishText()
|
||||
{
|
||||
m_currentText = m_currentText.trimmed();
|
||||
QString trimmedText = m_currentText.trimmed();
|
||||
const int index = m_currentText.indexOf(trimmedText);
|
||||
Q_ASSERT(index != -1);
|
||||
if (trimmedText.size() < m_currentText.size())
|
||||
{
|
||||
// Fix character bounding boxes...
|
||||
if (m_characterBoundingRects.size() == m_currentText.size())
|
||||
{
|
||||
std::vector<QRectF> boundingRects(std::next(m_characterBoundingRects.cbegin(), index), std::next(m_characterBoundingRects.cbegin(), index + trimmedText.length()));
|
||||
m_characterBoundingRects = std::move(boundingRects);
|
||||
}
|
||||
m_currentText = std::move(trimmedText);
|
||||
}
|
||||
|
||||
if (!m_currentText.isEmpty() && (!m_extractorOptions.testFlag(PDFStructureTreeTextExtractor::SkipArtifact) || !isArtifact()))
|
||||
{
|
||||
if (m_extractorOptions.testFlag(PDFStructureTreeTextExtractor::AdjustReversedText) && isReversedText())
|
||||
@ -270,11 +263,14 @@ void PDFStructureTreeTextContentProcessor::finishText()
|
||||
reversed.push_back(*it);
|
||||
}
|
||||
m_currentText = qMove(reversed);
|
||||
std::reverse(m_characterBoundingRects.begin(), m_characterBoundingRects.end());
|
||||
}
|
||||
m_textSequence.emplace_back(PDFStructureTreeTextItem::createText(qMove(m_currentText), m_pageIndex, m_currentBoundingBox));
|
||||
Q_ASSERT(m_currentText.size() == m_characterBoundingRects.size() || m_characterBoundingRects.empty());
|
||||
m_textSequence.emplace_back(PDFStructureTreeTextItem::createText(std::move(m_currentText), m_pageIndex, m_currentBoundingBox, std::move(m_characterBoundingRects)));
|
||||
}
|
||||
m_currentText = QString();
|
||||
m_currentBoundingBox = QRectF();
|
||||
m_characterBoundingRects.clear();
|
||||
}
|
||||
|
||||
bool PDFStructureTreeTextContentProcessor::isArtifact() const
|
||||
@ -346,6 +342,7 @@ void PDFStructureTreeTextContentProcessor::performMarkedContentEnd()
|
||||
m_unmatchedText << qMove(m_currentText);
|
||||
}
|
||||
m_currentBoundingBox = QRectF();
|
||||
m_characterBoundingRects.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -374,8 +371,6 @@ bool PDFStructureTreeTextContentProcessor::isContentKindSuppressed(ContentKind k
|
||||
switch (kind)
|
||||
{
|
||||
case ContentKind::Text:
|
||||
return !m_extractorOptions.testFlag(PDFStructureTreeTextExtractor::BoundingBoxes);
|
||||
|
||||
case ContentKind::Shapes:
|
||||
case ContentKind::Images:
|
||||
case ContentKind::Shading:
|
||||
@ -401,6 +396,18 @@ void PDFStructureTreeTextContentProcessor::performOutputCharacter(const PDFTextC
|
||||
if (!info.character.isNull() && info.character != QChar(QChar::SoftHyphen))
|
||||
{
|
||||
m_currentText.push_back(info.character);
|
||||
|
||||
QPainterPath worldPath = info.matrix.map(info.outline);
|
||||
if (!worldPath.isEmpty())
|
||||
{
|
||||
QRectF boundingRect = worldPath.controlPointRect();
|
||||
m_currentBoundingBox = m_currentBoundingBox.united(boundingRect);
|
||||
m_characterBoundingRects.push_back(boundingRect);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_characterBoundingRects.push_back(QRectF());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -464,17 +471,26 @@ void PDFStructureTreeTextExtractor::perform(const std::vector<PDFInteger>& pageI
|
||||
switch (sequenceItem.type)
|
||||
{
|
||||
case PDFStructureTreeTextItem::Type::StartTag:
|
||||
{
|
||||
stack.push(sequenceItem.item);
|
||||
break;
|
||||
}
|
||||
case PDFStructureTreeTextItem::Type::EndTag:
|
||||
{
|
||||
stack.pop();
|
||||
break;
|
||||
}
|
||||
case PDFStructureTreeTextItem::Type::Text:
|
||||
{
|
||||
if (!stack.empty())
|
||||
{
|
||||
m_textForItems[stack.top()].emplace_back(TextItem{ sequenceItem.boundingRect, sequenceItem.pageIndex, sequenceItem.text });
|
||||
m_textForItems[stack.top()].emplace_back(TextItem{ sequenceItem.boundingRect, sequenceItem.pageIndex, sequenceItem.text, sequenceItem.characterBoundingRects });
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -598,7 +614,7 @@ void PDFStructureTreeTextFlowCollector::visitStructureElement(const PDFStructure
|
||||
for (const auto& textItem : m_extractor->getText(structureElement))
|
||||
{
|
||||
markHasContent();
|
||||
m_items->push_back(PDFDocumentTextFlow::Item{ textItem.boundingRect, textItem.pageIndex, textItem.text, PDFDocumentTextFlow::Text });
|
||||
m_items->push_back(PDFDocumentTextFlow::Item{ textItem.boundingRect, textItem.pageIndex, textItem.text, PDFDocumentTextFlow::Text, textItem.characterBoundingRects });
|
||||
}
|
||||
|
||||
acceptChildren(structureElement);
|
||||
@ -688,7 +704,7 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, PDFTranslationContext::tr("Page %1").arg(pageIndex + 1), PDFDocumentTextFlow::PageStart });
|
||||
for (const PDFTextFlow& textFlow : textFlows)
|
||||
{
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ textFlow.getBoundingBox(), pageIndex, textFlow.getText(), PDFDocumentTextFlow::Text });
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ textFlow.getBoundingBox(), pageIndex, textFlow.getText(), PDFDocumentTextFlow::Text, textFlow.getBoundingBoxes() });
|
||||
}
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd });
|
||||
|
||||
@ -748,7 +764,7 @@ PDFDocumentTextFlow PDFDocumentTextFlowFactory::create(const PDFDocument* docume
|
||||
{
|
||||
if (sequenceItem.type == PDFStructureTreeTextItem::Type::Text)
|
||||
{
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ sequenceItem.boundingRect, pageIndex, sequenceItem.text, PDFDocumentTextFlow::Text });
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ sequenceItem.boundingRect, pageIndex, sequenceItem.text, PDFDocumentTextFlow::Text, sequenceItem.characterBoundingRects });
|
||||
}
|
||||
}
|
||||
flowItems.emplace_back(PDFDocumentTextFlow::Item{ QRectF(), pageIndex, QString(), PDFDocumentTextFlow::PageEnd });
|
||||
@ -1040,4 +1056,36 @@ void PDFDocumentTextFlowEditor::updateModifiedFlag(size_t index)
|
||||
item->editedItemFlags.setFlag(Modified, isModified);
|
||||
}
|
||||
|
||||
std::map<PDFInteger, PDFDocumentTextFlow> PDFDocumentTextFlow::split(Flags mask) const
|
||||
{
|
||||
std::map<PDFInteger, PDFDocumentTextFlow> result;
|
||||
|
||||
for (const Item& item : m_items)
|
||||
{
|
||||
if (item.flags & mask)
|
||||
{
|
||||
result[item.pageIndex].addItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void PDFDocumentTextFlow::append(const PDFDocumentTextFlow& textFlow)
|
||||
{
|
||||
m_items.insert(m_items.end(), textFlow.m_items.cbegin(), textFlow.m_items.cend());
|
||||
}
|
||||
|
||||
QString PDFDocumentTextFlow::getText() const
|
||||
{
|
||||
QStringList texts;
|
||||
|
||||
for (const auto& item : m_items)
|
||||
{
|
||||
texts << item.text.trimmed();
|
||||
}
|
||||
|
||||
return texts.join(" ");
|
||||
}
|
||||
|
||||
} // namespace pdf
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
PDFInteger pageIndex = 0;
|
||||
QString text;
|
||||
Flags flags = None;
|
||||
std::vector<QRectF> characterBoundingRects;
|
||||
|
||||
bool isText() const { return flags.testFlag(Text); }
|
||||
bool isSpecial() const { return !isText(); }
|
||||
@ -71,6 +72,9 @@ public:
|
||||
|
||||
}
|
||||
|
||||
/// Add text item
|
||||
void addItem(Item item) { m_items.emplace_back(std::move(item)); }
|
||||
|
||||
const Items& getItems() const { return m_items; }
|
||||
|
||||
/// Returns item at a given index
|
||||
@ -83,6 +87,18 @@ public:
|
||||
/// Returns true, if text flow is empty
|
||||
bool isEmpty() const { return m_items.empty(); }
|
||||
|
||||
/// Split text flow to pages using given mask. Items, which
|
||||
/// are masked out, are not added.
|
||||
/// \param mask Mask
|
||||
std::map<PDFInteger, PDFDocumentTextFlow> split(Flags mask) const;
|
||||
|
||||
/// Appends document text flow to this one
|
||||
/// \param textFlow Text flow
|
||||
void append(const PDFDocumentTextFlow& textFlow);
|
||||
|
||||
/// Returns text concantecated from all items
|
||||
QString getText() const;
|
||||
|
||||
private:
|
||||
Items m_items;
|
||||
};
|
||||
|
@ -154,6 +154,20 @@ void PDFDrawSpaceController::setPageRotation(PageRotation pageRotation)
|
||||
}
|
||||
}
|
||||
|
||||
void PDFDrawSpaceController::setCustomLayout(LayoutItems customLayoutItems)
|
||||
{
|
||||
if (m_customLayoutItems != customLayoutItems)
|
||||
{
|
||||
m_customLayoutItems = std::move(customLayoutItems);
|
||||
|
||||
if (m_pageLayoutMode == PageLayout::Custom)
|
||||
{
|
||||
// Recalculate only, if custom layout is active
|
||||
recalculate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PDFDrawSpaceController::recalculate()
|
||||
{
|
||||
if (!m_document)
|
||||
@ -181,7 +195,7 @@ void PDFDrawSpaceController::recalculate()
|
||||
QSizeF pageSize = PDFPage::getRotatedBox(catalog->getPage(leftIndex)->getRotatedMediaBoxMM(), m_pageRotation).size();
|
||||
PDFReal xPos = -pageSize.width() - m_horizontalSpacingMM * 0.5;
|
||||
QRectF rect(xPos, yPos, pageSize.width(), pageSize.height());
|
||||
m_layoutItems.emplace_back(blockIndex, leftIndex, rect);
|
||||
m_layoutItems.emplace_back(blockIndex, leftIndex, -1, rect);
|
||||
yPosAdvance = qMax(yPosAdvance, pageSize.height());
|
||||
boundingRect = boundingRect.united(rect);
|
||||
}
|
||||
@ -191,7 +205,7 @@ void PDFDrawSpaceController::recalculate()
|
||||
QSizeF pageSize = PDFPage::getRotatedBox(catalog->getPage(rightIndex)->getRotatedMediaBoxMM(), m_pageRotation).size();
|
||||
PDFReal xPos = m_horizontalSpacingMM * 0.5;
|
||||
QRectF rect(xPos, yPos, pageSize.width(), pageSize.height());
|
||||
m_layoutItems.emplace_back(blockIndex, rightIndex, rect);
|
||||
m_layoutItems.emplace_back(blockIndex, rightIndex, -1, rect);
|
||||
yPosAdvance = qMax(yPosAdvance, pageSize.height());
|
||||
boundingRect = boundingRect.united(rect);
|
||||
}
|
||||
@ -253,7 +267,7 @@ void PDFDrawSpaceController::recalculate()
|
||||
{
|
||||
QSizeF pageSize = PDFPage::getRotatedBox(catalog->getPage(i)->getRotatedMediaBoxMM(), m_pageRotation).size();
|
||||
QRectF rect(-pageSize.width() * 0.5, -pageSize.height() * 0.5, pageSize.width(), pageSize.height());
|
||||
m_layoutItems.emplace_back(i, i, rect);
|
||||
m_layoutItems.emplace_back(i, i, -1, rect);
|
||||
m_blockItems.emplace_back(rect);
|
||||
}
|
||||
|
||||
@ -274,7 +288,7 @@ void PDFDrawSpaceController::recalculate()
|
||||
// Top of current page is at yPos.
|
||||
QSizeF pageSize = PDFPage::getRotatedBox(catalog->getPage(i)->getRotatedMediaBoxMM(), m_pageRotation).size();
|
||||
QRectF rect(-pageSize.width() * 0.5, yPos, pageSize.width(), pageSize.height());
|
||||
m_layoutItems.emplace_back(0, i, rect);
|
||||
m_layoutItems.emplace_back(0, i, -1, rect);
|
||||
yPos += pageSize.height() + m_verticalSpacingMM;
|
||||
boundingRectangle = boundingRectangle.united(rect);
|
||||
}
|
||||
@ -361,6 +375,54 @@ void PDFDrawSpaceController::recalculate()
|
||||
break;
|
||||
}
|
||||
|
||||
case PageLayout::Custom:
|
||||
{
|
||||
m_layoutItems = m_customLayoutItems;
|
||||
|
||||
// We do not support page rotation for custom layout
|
||||
Q_ASSERT(m_pageRotation == PageRotation::None);
|
||||
|
||||
// Assure, that layout items are sorted by block and page group
|
||||
auto comparator = [](const LayoutItem& l, const LayoutItem& r)
|
||||
{
|
||||
return std::tie(l.blockIndex, l.groupIndex) < std::tie(r.blockIndex, r.groupIndex);
|
||||
};
|
||||
std::stable_sort(m_layoutItems.begin(), m_layoutItems.end(), comparator);
|
||||
|
||||
// Now, compute blocks
|
||||
if (!m_layoutItems.empty())
|
||||
{
|
||||
m_blockItems.reserve(m_layoutItems.back().blockIndex + 1);
|
||||
|
||||
QRectF currentBoundingRect;
|
||||
PDFInteger blockIndex = -1;
|
||||
|
||||
for (const LayoutItem& layoutItem : m_layoutItems)
|
||||
{
|
||||
if (blockIndex != layoutItem.blockIndex)
|
||||
{
|
||||
blockIndex = layoutItem.blockIndex;
|
||||
|
||||
if (currentBoundingRect.isValid())
|
||||
{
|
||||
m_blockItems.push_back(LayoutBlock(currentBoundingRect));
|
||||
currentBoundingRect = QRectF();
|
||||
}
|
||||
}
|
||||
|
||||
currentBoundingRect = currentBoundingRect.united(layoutItem.pageRectMM);
|
||||
}
|
||||
|
||||
if (currentBoundingRect.isValid())
|
||||
{
|
||||
m_blockItems.push_back(LayoutBlock(currentBoundingRect));
|
||||
currentBoundingRect = QRectF();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
@ -504,7 +566,7 @@ void PDFDrawWidgetProxy::update()
|
||||
m_layout.items.reserve(items.size());
|
||||
for (const PDFDrawSpaceController::LayoutItem& item : items)
|
||||
{
|
||||
m_layout.items.emplace_back(item.pageIndex, fromDeviceSpace(item.pageRectMM).toRect());
|
||||
m_layout.items.emplace_back(item.pageIndex, item.groupIndex, fromDeviceSpace(item.pageRectMM).toRect());
|
||||
}
|
||||
|
||||
m_layout.blockRect = fromDeviceSpace(rectangle).toRect();
|
||||
@ -700,8 +762,13 @@ void PDFDrawWidgetProxy::drawPages(QPainter* painter, QRect rect, PDFRenderer::F
|
||||
QRect placedRect = item.pageRect.translated(m_horizontalOffset - m_layout.blockRect.left(), m_verticalOffset - m_layout.blockRect.top());
|
||||
if (placedRect.intersects(rect))
|
||||
{
|
||||
GroupInfo groupInfo = getGroupInfo(item.groupIndex);
|
||||
|
||||
// Clear the page space by paper color
|
||||
painter->fillRect(placedRect, paperColor);
|
||||
if (groupInfo.drawPaper)
|
||||
{
|
||||
painter->fillRect(placedRect, paperColor);
|
||||
}
|
||||
|
||||
const PDFPrecompiledPage* compiledPage = m_compiler->getCompiledPage(item.pageIndex, true);
|
||||
if (compiledPage && compiledPage->isValid())
|
||||
@ -711,7 +778,7 @@ void PDFDrawWidgetProxy::drawPages(QPainter* painter, QRect rect, PDFRenderer::F
|
||||
|
||||
const PDFPage* page = m_controller->getDocument()->getCatalog()->getPage(item.pageIndex);
|
||||
QMatrix matrix = createPagePointToDevicePointMatrix(page, placedRect) * baseMatrix;
|
||||
compiledPage->draw(painter, page->getCropBox(), matrix, features);
|
||||
compiledPage->draw(painter, page->getCropBox(), matrix, features, groupInfo.transparency);
|
||||
PDFTextLayoutGetter layoutGetter = m_textLayoutCompiler->getTextLayoutLazy(item.pageIndex);
|
||||
|
||||
// Draw text blocks/text lines, if it is enabled
|
||||
@ -939,6 +1006,22 @@ PDFWidgetSnapshot PDFDrawWidgetProxy::getSnapshot() const
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
void PDFDrawWidgetProxy::setGroupTransparency(PDFInteger groupIndex, bool drawPaper, PDFReal transparency)
|
||||
{
|
||||
GroupInfo groupInfo;
|
||||
groupInfo.drawPaper = drawPaper;
|
||||
groupInfo.transparency = transparency;
|
||||
|
||||
if (groupInfo == GroupInfo())
|
||||
{
|
||||
m_groupInfos.erase(groupIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_groupInfos[groupIndex] = std::move(groupInfo);
|
||||
}
|
||||
}
|
||||
|
||||
QRect PDFDrawWidgetProxy::getPagesIntersectingRectBoundingBox(QRect rect) const
|
||||
{
|
||||
QRect resultRect;
|
||||
@ -1156,6 +1239,15 @@ void PDFDrawWidgetProxy::setPageLayout(PageLayout pageLayout)
|
||||
}
|
||||
}
|
||||
|
||||
void PDFDrawWidgetProxy::setCustomPageLayout(PDFDrawSpaceController::LayoutItems layoutItems)
|
||||
{
|
||||
if (m_controller->getCustomLayout() != layoutItems)
|
||||
{
|
||||
m_controller->setCustomLayout(std::move(layoutItems));
|
||||
emit pageLayoutChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QRectF PDFDrawWidgetProxy::fromDeviceSpace(const QRectF& rect) const
|
||||
{
|
||||
Q_ASSERT(rect.isValid());
|
||||
@ -1185,6 +1277,9 @@ bool PDFDrawWidgetProxy::isBlockMode() const
|
||||
case PageLayout::TwoPagesLeft:
|
||||
case PageLayout::TwoPagesRight:
|
||||
return true;
|
||||
|
||||
case PageLayout::Custom:
|
||||
return m_controller->getBlockCount() > 1;
|
||||
}
|
||||
|
||||
Q_ASSERT(false);
|
||||
@ -1217,6 +1312,10 @@ void PDFDrawWidgetProxy::prefetchPages(PDFInteger pageIndex)
|
||||
prefetchCount = 2;
|
||||
break;
|
||||
|
||||
case PageLayout::Custom:
|
||||
prefetchCount = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
@ -1307,6 +1406,17 @@ void PDFDrawWidgetProxy::updateVerticalScrollbarFromOffset()
|
||||
}
|
||||
}
|
||||
|
||||
PDFDrawWidgetProxy::GroupInfo PDFDrawWidgetProxy::getGroupInfo(int groupIndex) const
|
||||
{
|
||||
auto it = m_groupInfos.find(groupIndex);
|
||||
if (it != m_groupInfos.cend())
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return GroupInfo();
|
||||
}
|
||||
|
||||
PDFWidgetAnnotationManager* PDFDrawWidgetProxy::getAnnotationManager() const
|
||||
{
|
||||
return m_widget->getAnnotationManager();
|
||||
|
@ -77,14 +77,17 @@ public:
|
||||
/// page and page rectangle, in which the page is contained.
|
||||
struct LayoutItem
|
||||
{
|
||||
constexpr inline explicit LayoutItem() : blockIndex(-1), pageIndex(-1) { }
|
||||
constexpr inline explicit LayoutItem(PDFInteger blockIndex, PDFInteger pageIndex, const QRectF& pageRectMM) :
|
||||
blockIndex(blockIndex), pageIndex(pageIndex), pageRectMM(pageRectMM) { }
|
||||
constexpr inline explicit LayoutItem() : blockIndex(-1), pageIndex(-1), groupIndex(-1) { }
|
||||
constexpr inline explicit LayoutItem(PDFInteger blockIndex, PDFInteger pageIndex, PDFInteger groupIndex, const QRectF& pageRectMM) :
|
||||
blockIndex(blockIndex), pageIndex(pageIndex), groupIndex(groupIndex), pageRectMM(pageRectMM) { }
|
||||
|
||||
bool operator ==(const LayoutItem&) const = default;
|
||||
|
||||
bool isValid() const { return pageIndex != -1; }
|
||||
|
||||
PDFInteger blockIndex;
|
||||
PDFInteger pageIndex;
|
||||
PDFInteger groupIndex; ///< Page group index
|
||||
QRectF pageRectMM;
|
||||
};
|
||||
|
||||
@ -123,6 +126,15 @@ public:
|
||||
/// Sets page rotation
|
||||
void setPageRotation(PageRotation pageRotation);
|
||||
|
||||
/// Set custom layout. Custom layout provides a way how to define
|
||||
/// custom page layout, including blocks. Block indices must be properly defined,
|
||||
/// that means block index must start by zero and must be continuous. If this
|
||||
/// criteria are not fulfilled, behaviour is undefined.
|
||||
void setCustomLayout(LayoutItems customLayoutItems);
|
||||
|
||||
/// Returns custom layout
|
||||
const LayoutItems& getCustomLayout() const { return m_customLayoutItems; }
|
||||
|
||||
signals:
|
||||
void drawSpaceChanged();
|
||||
void repaintNeeded();
|
||||
@ -155,6 +167,7 @@ private:
|
||||
PDFReal m_verticalSpacingMM;
|
||||
PDFReal m_horizontalSpacingMM;
|
||||
PageRotation m_pageRotation;
|
||||
LayoutItems m_customLayoutItems;
|
||||
|
||||
/// Font cache
|
||||
PDFFontCache m_fontCache;
|
||||
@ -282,6 +295,11 @@ public:
|
||||
/// \param pageLayout Page layout
|
||||
void setPageLayout(PageLayout pageLayout);
|
||||
|
||||
/// Sets custom page layout. If this function is used, page layout mode
|
||||
/// must be set to 'Custom'.
|
||||
/// \param layoutItems Layout items
|
||||
void setCustomPageLayout(PDFDrawSpaceController::LayoutItems layoutItems);
|
||||
|
||||
/// Returns the page layout
|
||||
PageLayout getPageLayout() const { return m_controller->getPageLayout(); }
|
||||
|
||||
@ -354,13 +372,20 @@ public:
|
||||
|
||||
/// Returns snapshot of current view area
|
||||
PDFWidgetSnapshot getSnapshot() const;
|
||||
|
||||
/// Sets page group transparency settings. All pages with a given group index
|
||||
/// will be displayed with this transparency settings.
|
||||
/// \param groupIndex Group index
|
||||
/// \param drawPaper Draw background paper
|
||||
/// \param transparency Page graphics transparency
|
||||
void setGroupTransparency(PDFInteger groupIndex, bool drawPaper = true, PDFReal transparency = 1.0);
|
||||
|
||||
PDFWidgetAnnotationManager* getAnnotationManager() const;
|
||||
|
||||
signals:
|
||||
void drawSpaceChanged();
|
||||
void pageLayoutChanged();
|
||||
void renderingError(PDFInteger pageIndex, const QList<PDFRenderError>& errors);
|
||||
void renderingError(pdf::PDFInteger pageIndex, const QList<pdf::PDFRenderError>& errors);
|
||||
void repaintNeeded();
|
||||
void pageImageChanged(bool all, const std::vector<PDFInteger>& pages);
|
||||
void textLayoutChanged();
|
||||
@ -368,12 +393,13 @@ signals:
|
||||
private:
|
||||
struct LayoutItem
|
||||
{
|
||||
constexpr inline explicit LayoutItem() : pageIndex(-1) { }
|
||||
constexpr inline explicit LayoutItem(PDFInteger pageIndex, const QRect& pageRect) :
|
||||
pageIndex(pageIndex), pageRect(pageRect) { }
|
||||
constexpr inline explicit LayoutItem() : pageIndex(-1), groupIndex(-1) { }
|
||||
constexpr inline explicit LayoutItem(PDFInteger pageIndex, PDFInteger groupIndex, const QRect& pageRect) :
|
||||
pageIndex(pageIndex), groupIndex(groupIndex), pageRect(pageRect) { }
|
||||
|
||||
|
||||
PDFInteger pageIndex;
|
||||
PDFInteger groupIndex; ///< Used to create group of pages (for transparency and overlay)
|
||||
QRect pageRect;
|
||||
};
|
||||
|
||||
@ -389,6 +415,14 @@ private:
|
||||
QRect blockRect;
|
||||
};
|
||||
|
||||
struct GroupInfo
|
||||
{
|
||||
bool operator==(const GroupInfo&) const = default;
|
||||
|
||||
bool drawPaper = true;
|
||||
PDFReal transparency = 1.0;
|
||||
};
|
||||
|
||||
static constexpr size_t INVALID_BLOCK_INDEX = std::numeric_limits<size_t>::max();
|
||||
|
||||
// Minimal/maximal zoom is from 8% to 6400 %, according to the PDF 1.7 Reference,
|
||||
@ -413,6 +447,8 @@ private:
|
||||
void updateHorizontalScrollbarFromOffset();
|
||||
void updateVerticalScrollbarFromOffset();
|
||||
|
||||
GroupInfo getGroupInfo(int groupIndex) const;
|
||||
|
||||
template<typename T>
|
||||
struct Range
|
||||
{
|
||||
@ -501,6 +537,11 @@ private:
|
||||
|
||||
/// Surface format for OpenGL
|
||||
QSurfaceFormat m_surfaceFormat;
|
||||
|
||||
/// Page group info for rendering. Group of pages
|
||||
/// can be rendered with transparency or without paper
|
||||
/// as overlay.
|
||||
std::map<PDFInteger, GroupInfo> m_groupInfos;
|
||||
};
|
||||
|
||||
} // namespace pdf
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
void addInputInterface(IDrawWidgetInputInterface* inputInterface);
|
||||
|
||||
signals:
|
||||
void pageRenderingErrorsChanged(PDFInteger pageIndex, int errorsCount);
|
||||
void pageRenderingErrorsChanged(pdf::PDFInteger pageIndex, int errorsCount);
|
||||
|
||||
private:
|
||||
void updateRendererImpl();
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
// into buckets of appropriate size.
|
||||
if (scope != Scope::Page)
|
||||
{
|
||||
const int buckets = 32 * QThread::idealThreadCount();
|
||||
const int buckets = 8 * QThread::idealThreadCount();
|
||||
bucketSize = qMax(1, count / buckets);
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "pdfcms.h"
|
||||
|
||||
#include <QPainter>
|
||||
#include <QCryptographicHash>
|
||||
|
||||
namespace pdf
|
||||
{
|
||||
@ -500,13 +501,18 @@ void PDFPrecompiledPageGenerator::setCompositionMode(QPainter::CompositionMode m
|
||||
m_precompiledPage->addSetCompositionMode(mode);
|
||||
}
|
||||
|
||||
void PDFPrecompiledPage::draw(QPainter* painter, const QRectF& cropBox, const QMatrix& pagePointToDevicePointMatrix, PDFRenderer::Features features) const
|
||||
void PDFPrecompiledPage::draw(QPainter* painter,
|
||||
const QRectF& cropBox,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
PDFRenderer::Features features,
|
||||
PDFReal opacity) const
|
||||
{
|
||||
Q_ASSERT(painter);
|
||||
Q_ASSERT(pagePointToDevicePointMatrix.isInvertible());
|
||||
|
||||
painter->save();
|
||||
painter->setWorldMatrix(QMatrix());
|
||||
painter->setOpacity(opacity);
|
||||
|
||||
if (features.testFlag(PDFRenderer::ClipToCropBox))
|
||||
{
|
||||
@ -831,4 +837,224 @@ void PDFPrecompiledPage::finalize(qint64 compilingTimeNS, QList<PDFRenderError>
|
||||
}
|
||||
}
|
||||
|
||||
PDFPrecompiledPage::GraphicPieceInfos PDFPrecompiledPage::calculateGraphicPieceInfos(QRectF mediaBox,
|
||||
PDFReal epsilon) const
|
||||
{
|
||||
GraphicPieceInfos infos;
|
||||
|
||||
struct State
|
||||
{
|
||||
QMatrix matrix;
|
||||
};
|
||||
std::stack<State> stateStack;
|
||||
stateStack.emplace();
|
||||
|
||||
// Check, if epsilon is not too small
|
||||
if (qFuzzyIsNull(epsilon))
|
||||
{
|
||||
epsilon = 0.000001;
|
||||
}
|
||||
PDFReal factor = 1.0 / epsilon;
|
||||
|
||||
QImage shadingTestImage;
|
||||
|
||||
// Process all instructions
|
||||
for (const Instruction& instruction : m_instructions)
|
||||
{
|
||||
switch (instruction.type)
|
||||
{
|
||||
case InstructionType::DrawPath:
|
||||
{
|
||||
const PathPaintData& data = m_paths[instruction.dataIndex];
|
||||
|
||||
GraphicPieceInfo info;
|
||||
QByteArray serializedPath;
|
||||
|
||||
// Serialize data
|
||||
if (true)
|
||||
{
|
||||
QDataStream stream(&serializedPath, QIODevice::WriteOnly);
|
||||
|
||||
stream << data.isText;
|
||||
stream << data.pen;
|
||||
stream << data.brush;
|
||||
|
||||
// Translate map to page coordinates
|
||||
QPainterPath pagePath = stateStack.top().matrix.map(data.path);
|
||||
|
||||
info.type = data.isText ? GraphicPieceInfo::Type::Text : GraphicPieceInfo::Type::VectorGraphics;
|
||||
info.boundingRect = pagePath.controlPointRect();
|
||||
info.pagePath = pagePath;
|
||||
|
||||
const int elementCount = pagePath.elementCount();
|
||||
for (int i = 0; i < elementCount; ++i)
|
||||
{
|
||||
QPainterPath::Element element = pagePath.elementAt(i);
|
||||
|
||||
PDFReal roundedX = qFloor(element.x * factor);
|
||||
PDFReal roundedY = qFloor(element.y * factor);
|
||||
|
||||
stream << roundedX;
|
||||
stream << roundedY;
|
||||
stream << element.type;
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray hash = QCryptographicHash::hash(serializedPath, QCryptographicHash::Sha512);
|
||||
Q_ASSERT(QCryptographicHash::hashLength(QCryptographicHash::Sha512) == 64);
|
||||
|
||||
size_t size = qMin<size_t>(hash.length(), info.hash.size());
|
||||
std::copy(hash.data(), hash.data() + size, info.hash.data());
|
||||
|
||||
infos.emplace_back(std::move(info));
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::DrawImage:
|
||||
{
|
||||
const ImageData& data = m_images[instruction.dataIndex];
|
||||
const QImage& image = data.image;
|
||||
|
||||
GraphicPieceInfo info;
|
||||
QByteArray serializedPath;
|
||||
QByteArray serializedImage;
|
||||
|
||||
// Serialize data
|
||||
if (true)
|
||||
{
|
||||
QDataStream stream(&serializedPath, QIODevice::WriteOnly);
|
||||
QDataStream streamImage(&serializedImage, QIODevice::WriteOnly);
|
||||
|
||||
// Jakub Melka: serialize image position
|
||||
QMatrix worldMatrix = stateStack.top().matrix;
|
||||
|
||||
QPainterPath pagePath;
|
||||
pagePath.addRect(0, 0, 1, 1);
|
||||
pagePath = worldMatrix.map(pagePath);
|
||||
|
||||
info.type = GraphicPieceInfo::Type::Image;
|
||||
info.boundingRect = pagePath.controlPointRect();
|
||||
info.pagePath = pagePath;
|
||||
|
||||
const int elementCount = pagePath.elementCount();
|
||||
for (int i = 0; i < elementCount; ++i)
|
||||
{
|
||||
QPainterPath::Element element = pagePath.elementAt(i);
|
||||
|
||||
PDFReal roundedX = qRound(element.x * factor);
|
||||
PDFReal roundedY = qRound(element.y * factor);
|
||||
|
||||
stream << roundedX;
|
||||
stream << roundedY;
|
||||
stream << element.type;
|
||||
}
|
||||
|
||||
// serialize image data
|
||||
stream.writeBytes(reinterpret_cast<const char*>(image.bits()), image.sizeInBytes());
|
||||
streamImage.writeBytes(reinterpret_cast<const char*>(image.bits()), image.sizeInBytes());
|
||||
}
|
||||
|
||||
QByteArray hash = QCryptographicHash::hash(serializedPath, QCryptographicHash::Sha512);
|
||||
Q_ASSERT(QCryptographicHash::hashLength(QCryptographicHash::Sha512) == 64);
|
||||
|
||||
QByteArray imageHash = QCryptographicHash::hash(serializedImage, QCryptographicHash::Sha512);
|
||||
|
||||
size_t size = qMin<size_t>(hash.length(), info.hash.size());
|
||||
std::copy(hash.data(), hash.data() + size, info.hash.data());
|
||||
|
||||
size_t sizeImage = qMin<size_t>(imageHash.length(), info.imageHash.size());
|
||||
std::copy(imageHash.data(), imageHash.data() + sizeImage, info.imageHash.data());
|
||||
|
||||
infos.emplace_back(std::move(info));
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::DrawMesh:
|
||||
{
|
||||
const MeshPaintData& data = m_meshes[instruction.dataIndex];
|
||||
|
||||
if (shadingTestImage.isNull())
|
||||
{
|
||||
QSizeF mediaBoxSize = mediaBox.size();
|
||||
mediaBoxSize = mediaBoxSize.scaled(256, 256, Qt::KeepAspectRatio);
|
||||
QSize imageSize = mediaBoxSize.toSize();
|
||||
shadingTestImage = QImage(imageSize, QImage::Format_ARGB32);
|
||||
}
|
||||
|
||||
shadingTestImage.fill(Qt::transparent);
|
||||
|
||||
QMatrix pagePointToDevicePointMatrix;
|
||||
pagePointToDevicePointMatrix.scale(shadingTestImage.width() / mediaBox.width(), -shadingTestImage.height() / mediaBox.height());
|
||||
|
||||
{
|
||||
QPainter painter(&shadingTestImage);
|
||||
painter.setWorldMatrix(pagePointToDevicePointMatrix);
|
||||
data.mesh.paint(&painter, data.alpha);
|
||||
}
|
||||
|
||||
GraphicPieceInfo info;
|
||||
QByteArray serializedMesh;
|
||||
|
||||
// Serialize data
|
||||
if (true)
|
||||
{
|
||||
QDataStream stream(&serializedMesh, QIODevice::WriteOnly);
|
||||
|
||||
// serialize image data
|
||||
stream.writeBytes(reinterpret_cast<const char*>(shadingTestImage.bits()), shadingTestImage.sizeInBytes());
|
||||
}
|
||||
|
||||
QByteArray hash = QCryptographicHash::hash(serializedMesh, QCryptographicHash::Sha512);
|
||||
Q_ASSERT(QCryptographicHash::hashLength(QCryptographicHash::Sha512) == 64);
|
||||
|
||||
size_t size = qMin<size_t>(hash.length(), info.hash.size());
|
||||
std::copy(hash.data(), hash.data() + size, info.hash.data());
|
||||
|
||||
info.boundingRect = QRectF();
|
||||
info.type = GraphicPieceInfo::Type::Shading;
|
||||
infos.emplace_back(std::move(info));
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::Clip:
|
||||
{
|
||||
// Do nothing, we are just collecting information
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::SaveGraphicState:
|
||||
{
|
||||
stateStack.push(stateStack.top());
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::RestoreGraphicState:
|
||||
{
|
||||
stateStack.pop();
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::SetWorldMatrix:
|
||||
{
|
||||
stateStack.top().matrix = m_matrices[instruction.dataIndex];
|
||||
break;
|
||||
}
|
||||
|
||||
case InstructionType::SetCompositionMode:
|
||||
{
|
||||
// Do nothing, we are just collecting information
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return infos;
|
||||
}
|
||||
|
||||
} // namespace pdf
|
||||
|
@ -187,7 +187,12 @@ public:
|
||||
/// \param cropBox Page's crop box
|
||||
/// \param pagePointToDevicePointMatrix Page point to device point transformation matrix
|
||||
/// \param features Renderer features
|
||||
void draw(QPainter* painter, const QRectF& cropBox, const QMatrix& pagePointToDevicePointMatrix, PDFRenderer::Features features) const;
|
||||
/// \param opacity Opacity of page graphics
|
||||
void draw(QPainter* painter,
|
||||
const QRectF& cropBox,
|
||||
const QMatrix& pagePointToDevicePointMatrix,
|
||||
PDFRenderer::Features features,
|
||||
PDFReal opacity) const;
|
||||
|
||||
/// Redact path - remove all content intersecting given path,
|
||||
/// and fill redact path with given color.
|
||||
@ -234,6 +239,45 @@ public:
|
||||
PDFSnapInfo* getSnapInfo() { return &m_snapInfo; }
|
||||
const PDFSnapInfo* getSnapInfo() const { return &m_snapInfo; }
|
||||
|
||||
struct GraphicPieceInfo
|
||||
{
|
||||
enum class Type
|
||||
{
|
||||
Unknown,
|
||||
Text,
|
||||
VectorGraphics,
|
||||
Image,
|
||||
Shading
|
||||
};
|
||||
|
||||
bool operator<(const GraphicPieceInfo& other) const
|
||||
{
|
||||
return std::tie(type, hash) < std::tie(other.type, other.hash);
|
||||
}
|
||||
|
||||
bool isText() const { return type == Type::Text; }
|
||||
bool isVectorGraphics() const { return type == Type::VectorGraphics; }
|
||||
bool isImage() const { return type == Type::Image; }
|
||||
bool isShading() const { return type == Type::Shading; }
|
||||
|
||||
Type type = Type::Unknown;
|
||||
QRectF boundingRect;
|
||||
std::array<uint8_t, 64> hash = { }; ///< Hash of all data
|
||||
std::array<uint8_t, 64> imageHash = { }; ///< Hash of the image only
|
||||
QPainterPath pagePath;
|
||||
};
|
||||
|
||||
using GraphicPieceInfos = std::vector<GraphicPieceInfo>;
|
||||
|
||||
/// Creates information about piece of graphic in this page,
|
||||
/// for example, for comparation reasons. Parameter \p epsilon
|
||||
/// is for numerical precision - values under epsilon are considered
|
||||
/// as equal.
|
||||
/// \param mediaBox Page's media box
|
||||
/// \param epsilon Epsilon
|
||||
GraphicPieceInfos calculateGraphicPieceInfos(QRectF mediaBox,
|
||||
PDFReal epsilon) const;
|
||||
|
||||
private:
|
||||
struct PathPaintData
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ PDFDocument PDFRedact::perform(Options options)
|
||||
|
||||
QPainter* painter = contentStreamBuilder.begin(newPageReference);
|
||||
compiledPage.redact(redactPath, matrix, m_redactFillColor);
|
||||
compiledPage.draw(painter, QRectF(), matrix, PDFRenderer::None);
|
||||
compiledPage.draw(painter, QRectF(), matrix, PDFRenderer::None, 1.0);
|
||||
contentStreamBuilder.end(painter);
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ QImage PDFRasterizer::render(PDFInteger pageIndex,
|
||||
QOpenGLPaintDevice device(size);
|
||||
QPainter painter(&device);
|
||||
painter.fillRect(QRect(QPoint(0, 0), size), compiledPage->getPaperColor());
|
||||
compiledPage->draw(&painter, page->getCropBox(), matrix, features);
|
||||
compiledPage->draw(&painter, page->getCropBox(), matrix, features, 1.0);
|
||||
|
||||
if (annotationManager)
|
||||
{
|
||||
@ -276,7 +276,7 @@ QImage PDFRasterizer::render(PDFInteger pageIndex,
|
||||
image.fill(Qt::white);
|
||||
|
||||
QPainter painter(&image);
|
||||
compiledPage->draw(&painter, page->getCropBox(), matrix, features);
|
||||
compiledPage->draw(&painter, page->getCropBox(), matrix, features, 1.0);
|
||||
|
||||
if (annotationManager)
|
||||
{
|
||||
|
@ -1176,6 +1176,7 @@ void PDFTextFlow::merge(const PDFTextFlow& next)
|
||||
m_text += next.m_text;
|
||||
m_boundingBox = m_boundingBox.united(next.m_boundingBox);
|
||||
m_characterPointers.insert(m_characterPointers.end(), next.m_characterPointers.cbegin(), next.m_characterPointers.cend());
|
||||
m_characterBoundingBoxes.insert(m_characterBoundingBoxes.end(), next.m_characterBoundingBoxes.cbegin(), next.m_characterBoundingBoxes.cend());
|
||||
}
|
||||
|
||||
PDFTextFlows PDFTextFlow::createTextFlows(const PDFTextLayout& layout, FlowFlags flags, PDFInteger pageIndex)
|
||||
@ -1222,6 +1223,7 @@ PDFTextFlows PDFTextFlow::createTextFlows(const PDFTextLayout& layout, FlowFlags
|
||||
{
|
||||
currentFlow.m_text += QChar(' ');
|
||||
currentFlow.m_characterPointers.emplace_back();
|
||||
currentFlow.m_characterBoundingBoxes.emplace_back();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1233,6 +1235,7 @@ PDFTextFlows PDFTextFlow::createTextFlows(const PDFTextLayout& layout, FlowFlags
|
||||
pointer.lineIndex = textLineIndex;
|
||||
pointer.characterIndex = i;
|
||||
currentFlow.m_characterPointers.emplace_back(qMove(pointer));
|
||||
currentFlow.m_characterBoundingBoxes.emplace_back(currentCharacter.boundingBox.controlPointRect());
|
||||
}
|
||||
|
||||
// Remove soft hyphen, if it is enabled
|
||||
@ -1240,6 +1243,7 @@ PDFTextFlows PDFTextFlow::createTextFlows(const PDFTextLayout& layout, FlowFlags
|
||||
{
|
||||
currentFlow.m_text.chop(1);
|
||||
currentFlow.m_characterPointers.pop_back();
|
||||
currentFlow.m_characterBoundingBoxes.pop_back();
|
||||
|
||||
if (!flags.testFlag(AddLineBreaks))
|
||||
{
|
||||
@ -1252,6 +1256,7 @@ PDFTextFlows PDFTextFlow::createTextFlows(const PDFTextLayout& layout, FlowFlags
|
||||
// Add line break
|
||||
currentFlow.m_text += lineBreak;
|
||||
currentFlow.m_characterPointers.insert(currentFlow.m_characterPointers.end(), lineBreak.length(), PDFCharacterPointer());
|
||||
currentFlow.m_characterBoundingBoxes.insert(currentFlow.m_characterBoundingBoxes.end(), lineBreak.length(), QRectF());
|
||||
|
||||
++textLineIndex;
|
||||
}
|
||||
|
@ -297,6 +297,9 @@ public:
|
||||
/// Returns whole text for this text flow
|
||||
QString getText() const { return m_text; }
|
||||
|
||||
/// Returns character bounding boxes
|
||||
std::vector<QRectF> getBoundingBoxes() const { return m_characterBoundingBoxes; }
|
||||
|
||||
/// Returns text form character pointers
|
||||
/// \param begin Begin character
|
||||
/// \param end End character
|
||||
@ -330,6 +333,7 @@ private:
|
||||
QString m_text;
|
||||
QRectF m_boundingBox;
|
||||
std::vector<PDFCharacterPointer> m_characterPointers;
|
||||
std::vector<QRectF> m_characterBoundingBoxes;
|
||||
};
|
||||
|
||||
/// Text layout of single page. Can handle various fonts, various angles of lines
|
||||
|
@ -367,6 +367,15 @@ std::vector<PDFInteger> PDFClosedIntervalSet::unfold() const
|
||||
return result;
|
||||
}
|
||||
|
||||
void PDFClosedIntervalSet::translate(PDFInteger offset)
|
||||
{
|
||||
for (auto& interval : m_intervals)
|
||||
{
|
||||
interval.first += offset;
|
||||
interval.second += offset;
|
||||
}
|
||||
}
|
||||
|
||||
PDFClosedIntervalSet PDFClosedIntervalSet::parse(PDFInteger first, PDFInteger last, const QString& text, QString* errorMessage)
|
||||
{
|
||||
PDFClosedIntervalSet result;
|
||||
|
@ -694,6 +694,10 @@ public:
|
||||
/// Returns true, if interval set is empty
|
||||
bool isEmpty() const { return m_intervals.empty(); }
|
||||
|
||||
/// Translates interval set by a given offset
|
||||
/// \param offset Offset
|
||||
void translate(PDFInteger offset);
|
||||
|
||||
/// Parses text into closed interval set, text should be in form "1,3,4,7,-11,12-,52-53,-",
|
||||
/// where 1,3,4,7 means single pages, -11 means range from \p first to 11, 12- means range
|
||||
/// from 12 to \p last, and 52-53 means closed interval [52, 53]. If text is not in this form,
|
||||
|
@ -2151,6 +2151,10 @@ void PDFProgramController::onActionDeveloperCreateInstaller()
|
||||
addComponentMeta("pdf4qt_dpo", tr("DocPage Organizer"), tr("Document page organizer (split/merge documents, insert/remove/move/clone pages, insert blank pages and images to create a new document)."), pdf::PDF_LIBRARY_VERSION, "pdf4qt_dpo", false, true, false);
|
||||
addFileContent("pdf4qt_dpo", "Pdf4QtDocPageOrganizer.exe");
|
||||
|
||||
addStartMenuShortcut("pdf4qt_diff", "Pdf4QtDocDiff", tr("PDF4QT DocDiff"));
|
||||
addComponentMeta("pdf4qt_diff", tr("DocDiff"), tr("Compare content of two documents."), pdf::PDF_LIBRARY_VERSION, "pdf4qt_diff", false, true, false);
|
||||
addFileContent("pdf4qt_diff", "Pdf4QtDocDiff.exe");
|
||||
|
||||
addStartMenuShortcut("pdf4qt_tool", "PdfTool", tr("PDF4QT Command Line Tool"));
|
||||
addComponentMeta("pdf4qt_tool", tr("PdfTool"), tr("Command line tool for manipulation of PDF files with many functions."), pdf::PDF_LIBRARY_VERSION, "pdf4qt_tool", false, false, false);
|
||||
addFileContent("pdf4qt_tool", "PdfTool.exe");
|
||||
|
@ -47,6 +47,7 @@ SOURCES += \
|
||||
pdftoolcertstore.cpp \
|
||||
pdftoolcolorprofiles.cpp \
|
||||
pdftooldecrypt.cpp \
|
||||
pdftooldiff.cpp \
|
||||
pdftoolencrypt.cpp \
|
||||
pdftoolfetchimages.cpp \
|
||||
pdftoolfetchtext.cpp \
|
||||
@ -80,6 +81,7 @@ HEADERS += \
|
||||
pdftoolcertstore.h \
|
||||
pdftoolcolorprofiles.h \
|
||||
pdftooldecrypt.h \
|
||||
pdftooldiff.h \
|
||||
pdftoolencrypt.h \
|
||||
pdftoolfetchimages.h \
|
||||
pdftoolfetchtext.h \
|
||||
|
@ -175,6 +175,12 @@ void PDFToolAbstractApplication::initializeCommandLineParser(QCommandLineParser*
|
||||
parser->addPositionalArgument("target", "Merged document filename.");
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(Diff))
|
||||
{
|
||||
parser->addPositionalArgument("left", "Left (old) document to be compared.");
|
||||
parser->addPositionalArgument("right", "Right (new) document to be compared.");
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(SignatureVerification))
|
||||
{
|
||||
parser->addOption(QCommandLineOption("ver-no-user-cert", "Disable user certificate store."));
|
||||
@ -882,6 +888,11 @@ PDFToolOptions PDFToolAbstractApplication::getOptions(QCommandLineParser* parser
|
||||
options.uniteFiles = positionalArguments;
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(Diff))
|
||||
{
|
||||
options.diffFiles = positionalArguments;
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(Optimize))
|
||||
{
|
||||
options.optimizeFlags = pdf::PDFOptimizer::None;
|
||||
|
@ -136,6 +136,9 @@ struct PDFToolOptions
|
||||
// For option 'Unite'
|
||||
QStringList uniteFiles;
|
||||
|
||||
// For option 'Diff'
|
||||
QStringList diffFiles;
|
||||
|
||||
// For option 'Optimize'
|
||||
pdf::PDFOptimizer::OptimizationFlags optimizeFlags = pdf::PDFOptimizer::None;
|
||||
|
||||
@ -238,6 +241,7 @@ public:
|
||||
CertStore = 0x00200000, ///< Settings for certificate store tool
|
||||
CertStoreInstall = 0x00400000, ///< Settings for certificate store install certificate tool
|
||||
Encrypt = 0x00800000, ///< Encryption settings
|
||||
Diff = 0x01000000, ///< Diff settings (compare documents)
|
||||
};
|
||||
Q_DECLARE_FLAGS(Options, Option)
|
||||
|
||||
|
152
PdfTool/pdftooldiff.cpp
Normal file
@ -0,0 +1,152 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include "pdftooldiff.h"
|
||||
|
||||
#include "pdfdiff.h"
|
||||
#include "pdfdocumentreader.h"
|
||||
|
||||
namespace pdftool
|
||||
{
|
||||
|
||||
static PDFToolDiff s_toolDiffApplication;
|
||||
|
||||
QString PDFToolDiff::getStandardString(PDFToolAbstractApplication::StandardString standardString) const
|
||||
{
|
||||
switch (standardString)
|
||||
{
|
||||
case Command:
|
||||
return "diff";
|
||||
|
||||
case Name:
|
||||
return PDFToolTranslationContext::tr("Compare documents");
|
||||
|
||||
case Description:
|
||||
return PDFToolTranslationContext::tr("Compare contents of two documents.");
|
||||
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
int PDFToolDiff::execute(const PDFToolOptions& options)
|
||||
{
|
||||
if (options.diffFiles.size() != 2)
|
||||
{
|
||||
PDFConsole::writeError(PDFToolTranslationContext::tr("Exactly two documents must be specified."), options.outputCodec);
|
||||
return ErrorInvalidArguments;
|
||||
}
|
||||
|
||||
pdf::PDFDocumentReader reader(nullptr, [](bool* ok) { *ok = false; return QString(); }, options.permissiveReading, false);
|
||||
|
||||
pdf::PDFDocument leftDocument = reader.readFromFile(options.diffFiles.front());
|
||||
if (reader.getReadingResult() != pdf::PDFDocumentReader::Result::OK)
|
||||
{
|
||||
PDFConsole::writeError(PDFToolTranslationContext::tr("Cannot open document '%1'.").arg(options.diffFiles.front()), options.outputCodec);
|
||||
return ErrorDocumentReading;
|
||||
}
|
||||
|
||||
pdf::PDFDocument rightDocument = reader.readFromFile(options.diffFiles.back());
|
||||
if (reader.getReadingResult() != pdf::PDFDocumentReader::Result::OK)
|
||||
{
|
||||
PDFConsole::writeError(PDFToolTranslationContext::tr("Cannot open document '%1'.").arg(options.diffFiles.back()), options.outputCodec);
|
||||
return ErrorDocumentReading;
|
||||
}
|
||||
|
||||
pdf::PDFClosedIntervalSet leftPages;
|
||||
leftPages.addInterval(0, leftDocument.getCatalog()->getPageCount() - 1);
|
||||
|
||||
pdf::PDFClosedIntervalSet rightPages;
|
||||
rightPages.addInterval(0, rightDocument.getCatalog()->getPageCount() - 1);
|
||||
|
||||
pdf::PDFDiff diff(nullptr);
|
||||
diff.setOption(pdf::PDFDiff::Asynchronous, false);
|
||||
diff.setLeftDocument(&leftDocument);
|
||||
diff.setRightDocument(&rightDocument);
|
||||
diff.setPagesForLeftDocument(std::move(leftPages));
|
||||
diff.setPagesForRightDocument(std::move(rightPages));
|
||||
diff.start();
|
||||
|
||||
QLocale locale;
|
||||
|
||||
const pdf::PDFDiffResult& result = diff.getResult();
|
||||
if (result.getResult())
|
||||
{
|
||||
PDFOutputFormatter formatter(options.outputStyle, options.outputCodec);
|
||||
formatter.beginDocument("diff", PDFToolTranslationContext::tr("Difference Report").arg(options.document));
|
||||
formatter.endl();
|
||||
|
||||
formatter.beginTable("differences", PDFToolTranslationContext::tr("Differences"));
|
||||
|
||||
formatter.beginTableHeaderRow("header");
|
||||
formatter.writeTableHeaderColumn("no", PDFToolTranslationContext::tr("No."), Qt::AlignLeft);
|
||||
formatter.writeTableHeaderColumn("type", PDFToolTranslationContext::tr("Type"), Qt::AlignLeft);
|
||||
formatter.writeTableHeaderColumn("left-page-number", PDFToolTranslationContext::tr("Left Page"), Qt::AlignLeft);
|
||||
formatter.writeTableHeaderColumn("right-page-number", PDFToolTranslationContext::tr("Right Page"), Qt::AlignLeft);
|
||||
formatter.writeTableHeaderColumn("description", PDFToolTranslationContext::tr("Description"), Qt::AlignLeft);
|
||||
formatter.endTableHeaderRow();
|
||||
|
||||
const size_t size = result.getDifferencesCount();
|
||||
for (size_t i = 0; i < size; ++i)
|
||||
{
|
||||
pdf::PDFInteger leftPageIndex = result.getLeftPage(i);
|
||||
pdf::PDFInteger rightPageIndex = result.getRightPage(i);
|
||||
|
||||
QString leftPageDescription = leftPageIndex != -1 ? locale.toString(leftPageIndex + 1) : QString();
|
||||
QString rightPageDescription = rightPageIndex != -1 ? locale.toString(rightPageIndex + 1) : QString();
|
||||
|
||||
formatter.beginTableRow("difference", int(i));
|
||||
formatter.writeTableColumn("no", locale.toString(i + 1), Qt::AlignRight);
|
||||
formatter.writeTableColumn("type", result.getTypeDescription(i), Qt::AlignLeft);
|
||||
formatter.writeTableColumn("left-page-number", leftPageDescription, Qt::AlignRight);
|
||||
formatter.writeTableColumn("right-page-number", rightPageDescription, Qt::AlignRight);
|
||||
formatter.writeTableColumn("description", result.getMessage(i), Qt::AlignLeft);
|
||||
formatter.endTableRow();
|
||||
}
|
||||
|
||||
formatter.endTable();
|
||||
formatter.endDocument();
|
||||
|
||||
if (options.outputStyle == PDFOutputFormatter::Style::Xml)
|
||||
{
|
||||
QString xml;
|
||||
result.saveToXML(&xml);
|
||||
PDFConsole::writeText(xml, options.outputCodec);
|
||||
}
|
||||
else
|
||||
{
|
||||
PDFConsole::writeText(formatter.getString(), options.outputCodec);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PDFConsole::writeError(result.getResult().getErrorMessage(), options.outputCodec);
|
||||
return ErrorUnknown;
|
||||
}
|
||||
|
||||
return ExitSuccess;
|
||||
}
|
||||
|
||||
PDFToolAbstractApplication::Options PDFToolDiff::getOptionsFlags() const
|
||||
{
|
||||
return ConsoleFormat | Diff;
|
||||
}
|
||||
|
||||
} // namespace pdftool
|
36
PdfTool/pdftooldiff.h
Normal file
@ -0,0 +1,36 @@
|
||||
// Copyright (C) 2021 Jakub Melka
|
||||
//
|
||||
// This file is part of PDF4QT.
|
||||
//
|
||||
// PDF4QT is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// with the written consent of the copyright owner, any later version.
|
||||
//
|
||||
// PDF4QT 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 Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef PDFTOOLDIFF_H
|
||||
#define PDFTOOLDIFF_H
|
||||
|
||||
#include "pdftoolabstractapplication.h"
|
||||
|
||||
namespace pdftool
|
||||
{
|
||||
|
||||
class PDFToolDiff : public PDFToolAbstractApplication
|
||||
{
|
||||
public:
|
||||
virtual QString getStandardString(StandardString standardString) const override;
|
||||
virtual int execute(const PDFToolOptions& options) override;
|
||||
virtual Options getOptionsFlags() const override;
|
||||
};
|
||||
|
||||
} // namespace pdftool
|
||||
|
||||
#endif // PDFTOOLDIFF_H
|