mirror of https://github.com/JakubMelka/PDF4QT.git
Issue #25: Remove pro/qbs, fix MSVC build
This commit is contained in:
parent
8ffc4f9189
commit
3b57f85d4d
|
@ -59,7 +59,7 @@ set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_AUTORCC_OPTIONS "--threshold;0;--compress;9")
|
set(CMAKE_AUTORCC_OPTIONS "--threshold;0;--compress;9")
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
add_compile_options(/bigobj)
|
add_compile_options(/bigobj /W4 /wd5054 /wd4127 /wd4702)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (MINGW)
|
if (MINGW)
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
# Copyright (C) 2018-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 xml widgets
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Please consult the documentation of the
|
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
codegenerator.cpp \
|
|
||||||
main.cpp \
|
|
||||||
generatormainwindow.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
codegenerator.h \
|
|
||||||
generatormainwindow.h
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
generatormainwindow.ui
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "CodeGenerator"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"*.h",
|
|
||||||
"*.ui",
|
|
||||||
]
|
|
||||||
Depends { name: "Qt"; submodules: ["xml"] }
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
QT += core gui
|
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Please consult the documentation of the
|
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -lPDF4QtLib
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
main.cpp \
|
|
||||||
mainwindow.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
mainwindow.h
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
mainwindow.ui
|
|
|
@ -1,9 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "JBIG2_Viewer"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"*.h",
|
|
||||||
"*.ui",
|
|
||||||
]
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
}
|
|
39
Pdf4Qt.pri
39
Pdf4Qt.pri
|
@ -1,39 +0,0 @@
|
||||||
# Copyright (C) 2018-2022 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/>.
|
|
||||||
|
|
||||||
win32-msvc*: {
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8 /bigobj
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON -= -W3
|
|
||||||
QMAKE_CXXFLAGS_WARN_ON += -W4 -wd5054 -wd4127 -wd4702
|
|
||||||
}
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
CONFIG += link_pkgconfig
|
|
||||||
QMAKE_CXXFLAGS += -std=c++20
|
|
||||||
win32: {
|
|
||||||
QMAKE_CXXFLAGS += -Wa,-mbig-obj
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
win32 {
|
|
||||||
CONFIG += skip_target_version_ext
|
|
||||||
} else {
|
|
||||||
CONFIG += unversioned_libname
|
|
||||||
}
|
|
||||||
|
|
||||||
VERSION = 1.2.1
|
|
||||||
DEFINES += PDF4QT_PROJECT_VERSION=$$VERSION
|
|
44
Pdf4Qt.pro
44
Pdf4Qt.pro
|
@ -1,44 +0,0 @@
|
||||||
# Copyright (C) 2018-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/>.
|
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
|
||||||
|
|
||||||
SUBDIRS += \
|
|
||||||
Pdf4QtLib \
|
|
||||||
CodeGenerator \
|
|
||||||
JBIG2_Viewer \
|
|
||||||
PdfExampleGenerator \
|
|
||||||
PdfTool \
|
|
||||||
UnitTests \
|
|
||||||
Pdf4QtViewer \
|
|
||||||
Pdf4QtViewerPlugins \
|
|
||||||
Pdf4QtViewerProfi \
|
|
||||||
Pdf4QtViewerLite \
|
|
||||||
Pdf4QtDocPageOrganizer \
|
|
||||||
Pdf4QtDocDiff
|
|
||||||
|
|
||||||
CodeGenerator.depends = Pdf4QtLib
|
|
||||||
JBIG2_Viewer.depends = Pdf4QtLib
|
|
||||||
PdfExampleGenerator.depends = Pdf4QtLib
|
|
||||||
PdfTool.depends = Pdf4QtLib
|
|
||||||
UnitTests.depends = Pdf4QtLib
|
|
||||||
Pdf4QtViewer.depends = Pdf4QtLib
|
|
||||||
Pdf4QtViewerPlugins.depends = Pdf4QtLib
|
|
||||||
Pdf4QtViewerProfi.depends = Pdf4QtViewer
|
|
||||||
Pdf4QtViewerLite.depends = Pdf4QtViewer
|
|
||||||
Pdf4QtDocPageOrganizer.depends = Pdf4QtLib
|
|
||||||
Pdf4QtDocDiff.depends = Pdf4QtLib
|
|
56
Pdf4Qt.qbs
56
Pdf4Qt.qbs
|
@ -1,56 +0,0 @@
|
||||||
import qbs
|
|
||||||
import qbs.FileInfo
|
|
||||||
import qbs.Probes
|
|
||||||
|
|
||||||
Project {
|
|
||||||
name: "Pdf4Qt"
|
|
||||||
qbsSearchPaths: ["qbs"]
|
|
||||||
property string conanLibDirectory: FileInfo.joinPaths(conan.generatedFilesPath, "lib")
|
|
||||||
|
|
||||||
Probes.ConanfileProbe {
|
|
||||||
id: conan
|
|
||||||
conanfilePath: project.sourceDirectory + "/conanfile.txt"
|
|
||||||
generators: "qbs"
|
|
||||||
}
|
|
||||||
|
|
||||||
references: {
|
|
||||||
var ref = ["Pdf4QtLib/Pdf4QtLib.qbs",
|
|
||||||
"Pdf4QtViewer/Pdf4QtViewer.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/AudioBookPlugin/AudioBookPlugin.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/DimensionsPlugin/DimensionsPlugin.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/OutputPreviewPlugin/OutputPreviewPlugin.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/RedactPlugin/RedactPlugin.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/SoftProofingPlugin/SoftProofingPlugin.qbs",
|
|
||||||
"Pdf4QtViewerPlugins/SignaturePlugin/SignaturePlugin.qbs",
|
|
||||||
];
|
|
||||||
ref.push(conan.generatedFilesPath + "/conanbuildinfo.qbs");
|
|
||||||
return ref;
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "Pdf4QtViewerProfi/Pdf4QtViewerProfi.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "CodeGenerator/CodeGenerator.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "JBIG2_Viewer/JBIG2_Viewer.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "Pdf4QtDocPageOrganizer/Pdf4QtDocPageOrganizer.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "Pdf4QtViewerLite/Pdf4QtViewerLite.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "Pdf4QtDocDiff/Pdf4QtDocDiff.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "PdfExampleGenerator/PdfExampleGenerator.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "PdfTool/PdfTool.qbs"
|
|
||||||
}
|
|
||||||
SubProject {
|
|
||||||
filePath: "UnitTests/UnitTests.qbs"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,66 +0,0 @@
|
||||||
# Copyright (C) 2021-2022 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
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF Document Diff"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
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
|
|
|
@ -1,12 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "Pdf4QtDocDiff"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"*.h",
|
|
||||||
"*.ui",
|
|
||||||
"resources.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
# Copyright (C) 2022 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 = Pdf4QtDocPageOrganizer
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF Document Page Organizer"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
LIBS += -lPDF4QtLib
|
|
||||||
CONFIG += force_debug_info no_check_exist
|
|
||||||
|
|
||||||
application.files = $$DESTDIR/Pdf4QtDocPageOrganizer.exe
|
|
||||||
application.path = $$DESTDIR/install
|
|
||||||
application.CONFIG += no_check_exist
|
|
||||||
INSTALLS += application
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
aboutdialog.cpp \
|
|
||||||
assembleoutputsettingsdialog.cpp \
|
|
||||||
main.cpp \
|
|
||||||
mainwindow.cpp \
|
|
||||||
pageitemdelegate.cpp \
|
|
||||||
pageitemmodel.cpp \
|
|
||||||
selectbookmarkstoregroupdialog.cpp
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
aboutdialog.ui \
|
|
||||||
assembleoutputsettingsdialog.ui \
|
|
||||||
mainwindow.ui \
|
|
||||||
selectbookmarkstoregroupdialog.ui
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
aboutdialog.h \
|
|
||||||
assembleoutputsettingsdialog.h \
|
|
||||||
mainwindow.h \
|
|
||||||
pageitemdelegate.h \
|
|
||||||
pageitemmodel.h \
|
|
||||||
selectbookmarkstoregroupdialog.h
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
resources.qrc
|
|
|
@ -1,11 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "Pdf4QtDocPageOrganizer"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"*.h",
|
|
||||||
"*.ui",
|
|
||||||
"resources.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Depends { name: "Qt"; submodules: ["widgets"] }
|
|
||||||
}
|
|
|
@ -95,7 +95,7 @@ void PageItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
|
||||||
if (option.state.testFlag(QStyle::State_Selected))
|
if (option.state.testFlag(QStyle::State_Selected))
|
||||||
{
|
{
|
||||||
QColor selectedColor = option.palette.color(QPalette::Active, QPalette::Highlight);
|
QColor selectedColor = option.palette.color(QPalette::Active, QPalette::Highlight);
|
||||||
selectedColor.setAlphaF(0.3);
|
selectedColor.setAlphaF(0.3f);
|
||||||
painter->fillRect(rect, selectedColor);
|
painter->fillRect(rect, selectedColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,338 +0,0 @@
|
||||||
# Copyright (C) 2018-2022 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 += gui widgets xml svg
|
|
||||||
|
|
||||||
TARGET = Pdf4QtLib
|
|
||||||
TEMPLATE = lib
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF rendering / editing library for Qt"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += PDF4QTLIB_LIBRARY
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
|
||||||
# any feature of Qt which has been marked as deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Please consult the documentation of the
|
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if you use deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
sources/pdfaction.cpp \
|
|
||||||
sources/pdfadvancedtools.cpp \
|
|
||||||
sources/pdfalgorithmlcs.cpp \
|
|
||||||
sources/pdfannotation.cpp \
|
|
||||||
sources/pdfblendfunction.cpp \
|
|
||||||
sources/pdfccittfaxdecoder.cpp \
|
|
||||||
sources/pdfcertificatemanager.cpp \
|
|
||||||
sources/pdfcertificatemanagerdialog.cpp \
|
|
||||||
sources/pdfcms.cpp \
|
|
||||||
sources/pdfcompiler.cpp \
|
|
||||||
sources/pdfcreatecertificatedialog.cpp \
|
|
||||||
sources/pdfdiff.cpp \
|
|
||||||
sources/pdfdocumentbuilder.cpp \
|
|
||||||
sources/pdfdocumentmanipulator.cpp \
|
|
||||||
sources/pdfdocumenttextflow.cpp \
|
|
||||||
sources/pdfdocumenttextfloweditormodel.cpp \
|
|
||||||
sources/pdfdocumentwriter.cpp \
|
|
||||||
sources/pdfexecutionpolicy.cpp \
|
|
||||||
sources/pdffile.cpp \
|
|
||||||
sources/pdfform.cpp \
|
|
||||||
sources/pdficontheme.cpp \
|
|
||||||
sources/pdfitemmodels.cpp \
|
|
||||||
sources/pdfjavascriptscanner.cpp \
|
|
||||||
sources/pdfjbig2decoder.cpp \
|
|
||||||
sources/pdfmultimedia.cpp \
|
|
||||||
sources/pdfobject.cpp \
|
|
||||||
sources/pdfobjecteditormodel.cpp \
|
|
||||||
sources/pdfobjecteditorwidget.cpp \
|
|
||||||
sources/pdfobjectutils.cpp \
|
|
||||||
sources/pdfoptimizer.cpp \
|
|
||||||
sources/pdfoptionalcontent.cpp \
|
|
||||||
sources/pdfoutline.cpp \
|
|
||||||
sources/pdfpagecontenteditorstylesettings.cpp \
|
|
||||||
sources/pdfpagecontenteditortools.cpp \
|
|
||||||
sources/pdfpagecontenteditorwidget.cpp \
|
|
||||||
sources/pdfpagecontentelements.cpp \
|
|
||||||
sources/pdfpagenavigation.cpp \
|
|
||||||
sources/pdfpagetransition.cpp \
|
|
||||||
sources/pdfpainterutils.cpp \
|
|
||||||
sources/pdfparser.cpp \
|
|
||||||
sources/pdfdocument.cpp \
|
|
||||||
sources/pdfdocumentreader.cpp \
|
|
||||||
sources/pdfpattern.cpp \
|
|
||||||
sources/pdfplugin.cpp \
|
|
||||||
sources/pdfprogress.cpp \
|
|
||||||
sources/pdfredact.cpp \
|
|
||||||
sources/pdfsecurityhandler.cpp \
|
|
||||||
sources/pdfselectpagesdialog.cpp \
|
|
||||||
sources/pdfsignaturehandler.cpp \
|
|
||||||
sources/pdfsnapper.cpp \
|
|
||||||
sources/pdfstructuretree.cpp \
|
|
||||||
sources/pdftexteditpseudowidget.cpp \
|
|
||||||
sources/pdftextlayout.cpp \
|
|
||||||
sources/pdftransparencyrenderer.cpp \
|
|
||||||
sources/pdfutils.cpp \
|
|
||||||
sources/pdfwidgettool.cpp \
|
|
||||||
sources/pdfwidgetutils.cpp \
|
|
||||||
sources/pdfxfaengine.cpp \
|
|
||||||
sources/pdfxreftable.cpp \
|
|
||||||
sources/pdfvisitor.cpp \
|
|
||||||
sources/pdfencoding.cpp \
|
|
||||||
sources/pdfcatalog.cpp \
|
|
||||||
sources/pdfpage.cpp \
|
|
||||||
sources/pdfstreamfilters.cpp \
|
|
||||||
sources/pdfdrawspacecontroller.cpp \
|
|
||||||
sources/pdfdrawwidget.cpp \
|
|
||||||
sources/pdfcolorspaces.cpp \
|
|
||||||
sources/pdfrenderer.cpp \
|
|
||||||
sources/pdfpagecontentprocessor.cpp \
|
|
||||||
sources/pdfpainter.cpp \
|
|
||||||
sources/pdfrenderingerrorswidget.cpp \
|
|
||||||
sources/pdffunction.cpp \
|
|
||||||
sources/pdfnametounicode.cpp \
|
|
||||||
sources/pdffont.cpp \
|
|
||||||
sources/pdfimage.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
sources/pdfaction.h \
|
|
||||||
sources/pdfadvancedtools.h \
|
|
||||||
sources/pdfalgorithmlcs.h \
|
|
||||||
sources/pdfannotation.h \
|
|
||||||
sources/pdfblendfunction.h \
|
|
||||||
sources/pdfccittfaxdecoder.h \
|
|
||||||
sources/pdfcertificatemanager.h \
|
|
||||||
sources/pdfcertificatemanagerdialog.h \
|
|
||||||
sources/pdfcms.h \
|
|
||||||
sources/pdfcompiler.h \
|
|
||||||
sources/pdfcreatecertificatedialog.h \
|
|
||||||
sources/pdfdbgheap.h \
|
|
||||||
sources/pdfdiff.h \
|
|
||||||
sources/pdfdocumentbuilder.h \
|
|
||||||
sources/pdfdocumentdrawinterface.h \
|
|
||||||
sources/pdfdocumentmanipulator.h \
|
|
||||||
sources/pdfdocumenttextflow.h \
|
|
||||||
sources/pdfdocumenttextfloweditormodel.h \
|
|
||||||
sources/pdfdocumentwriter.h \
|
|
||||||
sources/pdfexecutionpolicy.h \
|
|
||||||
sources/pdffile.h \
|
|
||||||
sources/pdfform.h \
|
|
||||||
sources/pdficontheme.h \
|
|
||||||
sources/pdfitemmodels.h \
|
|
||||||
sources/pdfjavascriptscanner.h \
|
|
||||||
sources/pdfjbig2decoder.h \
|
|
||||||
sources/pdfmeshqualitysettings.h \
|
|
||||||
sources/pdfmultimedia.h \
|
|
||||||
sources/pdfnametreeloader.h \
|
|
||||||
sources/pdfobject.h \
|
|
||||||
sources/pdfobjecteditormodel.h \
|
|
||||||
sources/pdfobjecteditorwidget.h \
|
|
||||||
sources/pdfobjecteditorwidget_impl.h \
|
|
||||||
sources/pdfobjectutils.h \
|
|
||||||
sources/pdfoperationcontrol.h \
|
|
||||||
sources/pdfoptimizer.h \
|
|
||||||
sources/pdfoptionalcontent.h \
|
|
||||||
sources/pdfoutline.h \
|
|
||||||
sources/pdfpagecontenteditorstylesettings.h \
|
|
||||||
sources/pdfpagecontenteditortools.h \
|
|
||||||
sources/pdfpagecontenteditorwidget.h \
|
|
||||||
sources/pdfpagecontentelements.h \
|
|
||||||
sources/pdfpagenavigation.h \
|
|
||||||
sources/pdfpagetransition.h \
|
|
||||||
sources/pdfpainterutils.h \
|
|
||||||
sources/pdfparser.h \
|
|
||||||
sources/pdfglobal.h \
|
|
||||||
sources/pdfconstants.h \
|
|
||||||
sources/pdfdocument.h \
|
|
||||||
sources/pdfdocumentreader.h \
|
|
||||||
sources/pdfpattern.h \
|
|
||||||
sources/pdfplugin.h \
|
|
||||||
sources/pdfprogress.h \
|
|
||||||
sources/pdfredact.h \
|
|
||||||
sources/pdfsecurityhandler.h \
|
|
||||||
sources/pdfselectpagesdialog.h \
|
|
||||||
sources/pdfsignaturehandler.h \
|
|
||||||
sources/pdfsignaturehandler_impl.h \
|
|
||||||
sources/pdfsnapper.h \
|
|
||||||
sources/pdfstructuretree.h \
|
|
||||||
sources/pdftexteditpseudowidget.h \
|
|
||||||
sources/pdftextlayout.h \
|
|
||||||
sources/pdftransparencyrenderer.h \
|
|
||||||
sources/pdfwidgettool.h \
|
|
||||||
sources/pdfwidgetutils.h \
|
|
||||||
sources/pdfxfaengine.h \
|
|
||||||
sources/pdfxreftable.h \
|
|
||||||
sources/pdfflatmap.h \
|
|
||||||
sources/pdfvisitor.h \
|
|
||||||
sources/pdfencoding.h \
|
|
||||||
sources/pdfcatalog.h \
|
|
||||||
sources/pdfnumbertreeloader.h \
|
|
||||||
sources/pdfpage.h \
|
|
||||||
sources/pdfstreamfilters.h \
|
|
||||||
sources/pdfdrawspacecontroller.h \
|
|
||||||
sources/pdfdrawwidget.h \
|
|
||||||
sources/pdfflatarray.h \
|
|
||||||
sources/pdfcolorspaces.h \
|
|
||||||
sources/pdfrenderer.h \
|
|
||||||
sources/pdfpagecontentprocessor.h \
|
|
||||||
sources/pdfpainter.h \
|
|
||||||
sources/pdfutils.h \
|
|
||||||
sources/pdfrenderingerrorswidget.h \
|
|
||||||
sources/pdffunction.h \
|
|
||||||
sources/pdfnametounicode.h \
|
|
||||||
sources/pdffont.h \
|
|
||||||
sources/pdfexception.h \
|
|
||||||
sources/pdfimage.h
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
sources/pdfcertificatemanagerdialog.ui \
|
|
||||||
sources/pdfcreatecertificatedialog.ui \
|
|
||||||
sources/pdfpagecontenteditorstylesettings.ui \
|
|
||||||
sources/pdfpagecontenteditorwidget.ui \
|
|
||||||
sources/pdfrenderingerrorswidget.ui \
|
|
||||||
sources/pdfselectpagesdialog.ui
|
|
||||||
|
|
||||||
RESOURCES += cmaps.qrc
|
|
||||||
|
|
||||||
Pdf4Qt_DEPENDENCIES_PATH = $$absolute_path(../../PdfforQt-Dependencies, $$PWD)
|
|
||||||
Pdf4Qt_OPENSSL_PATH = $$absolute_path(../../Tools, $$[QT_INSTALL_PREFIX])
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release) {
|
|
||||||
SUFFIX = d
|
|
||||||
}
|
|
||||||
|
|
||||||
win32-msvc*: {
|
|
||||||
# Link to freetype library
|
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/FreeType/ -lfreetype$${SUFFIX}
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/FreeType/include
|
|
||||||
|
|
||||||
# Link to OpenJPEG library
|
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/lib/ -lopenjp2$${SUFFIX}
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
|
|
||||||
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/OpenJPEG/include/openjpeg-2.3
|
|
||||||
DEFINES += OPJ_STATIC
|
|
||||||
|
|
||||||
# Link to Independent JPEG Groups libjpeg
|
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/bin/ -ljpeg$${SUFFIX}
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/libjpeg/include
|
|
||||||
|
|
||||||
# Link OpenSSL
|
|
||||||
LIBS += -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/lib -llibcrypto -llibssl
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
|
|
||||||
|
|
||||||
# Add OpenSSL to installations
|
|
||||||
openssl_lib.files = $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libcrypto-1_1-x64.dll $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin/libssl-1_1-x64.dll
|
|
||||||
openssl_lib.path = $$DESTDIR/install
|
|
||||||
INSTALLS += openssl_lib
|
|
||||||
|
|
||||||
# Link zlib
|
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/zlib/bin/ -lzlibstatic$${SUFFIX}
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/zlib/include
|
|
||||||
|
|
||||||
# Link lcms2
|
|
||||||
LIBS += -L$$Pdf4Qt_DEPENDENCIES_PATH/lcms2/bin$${SUFFIX}/ -llcms2_static
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_DEPENDENCIES_PATH/lcms2/include
|
|
||||||
}
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
PKGCONFIG += freetype2 libopenjp2 libjpeg lcms2 libssl libcrypto zlib
|
|
||||||
LIBS += -ltbb
|
|
||||||
win32: {
|
|
||||||
LIBS += -lmscms -lcrypt32 -lsecur32
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# ensure debug info even for RELEASE build
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
|
|
||||||
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
|
|
||||||
|
|
||||||
PdfforQt_library.files = $$DESTDIR/Pdf4QtLib.dll
|
|
||||||
PdfforQt_library.path = $$DESTDIR/install
|
|
||||||
PdfforQt_library.CONFIG += no_check_exist
|
|
||||||
|
|
||||||
INSTALLS += PdfforQt_library
|
|
||||||
|
|
||||||
qt_libraries.files = $$[QT_INSTALL_BINS]/Qt?Widgets$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?Gui$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?Core$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?WinExtras$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?Svg$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?PrintSupport$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?TextToSpeech$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?Network$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_BINS]/Qt?Xml$${SUFFIX}.dll
|
|
||||||
qt_libraries.path = $$DESTDIR/install
|
|
||||||
INSTALLS += qt_libraries
|
|
||||||
|
|
||||||
qt_plugin_platform.files = $$[QT_INSTALL_PLUGINS]/platforms/qwindows$${SUFFIX}.dll
|
|
||||||
qt_plugin_platform.path = $$DESTDIR/install/platforms
|
|
||||||
INSTALLS += qt_plugin_platform
|
|
||||||
|
|
||||||
qt_plugin_style.files = $$[QT_INSTALL_PLUGINS]/styles/qwindowsvistastyle$${SUFFIX}.dll
|
|
||||||
qt_plugin_style.path = $$DESTDIR/install/styles
|
|
||||||
INSTALLS += qt_plugin_style
|
|
||||||
|
|
||||||
qt_plugin_imageformat.files = $$[QT_INSTALL_PLUGINS]/imageformats/qgif$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qicns$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qico$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qjpeg$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qsvg$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qtga$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qtiff$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qwbpm$${SUFFIX}.dll \
|
|
||||||
$$[QT_INSTALL_PLUGINS]/imageformats/qwebp$${SUFFIX}.dll
|
|
||||||
qt_plugin_imageformat.path = $$DESTDIR/install/imageformats
|
|
||||||
INSTALLS += qt_plugin_imageformat
|
|
||||||
|
|
||||||
qt_plugin_iconengine.files = $$[QT_INSTALL_PLUGINS]/iconengines/qsvgicon$${SUFFIX}.dll
|
|
||||||
qt_plugin_iconengine.path = $$DESTDIR/install/iconengines
|
|
||||||
INSTALLS += qt_plugin_iconengine
|
|
||||||
|
|
||||||
qt_plugin_printsupport.files = $$[QT_INSTALL_PLUGINS]/printsupport/windowsprintersupport$${SUFFIX}.dll
|
|
||||||
qt_plugin_printsupport.path = $$DESTDIR/install/printsupport
|
|
||||||
INSTALLS += qt_plugin_printsupport
|
|
||||||
|
|
||||||
qt_plugin_texttospeech.files = $$[QT_INSTALL_PLUGINS]/texttospeech/qtexttospeech_sapi$${SUFFIX}.dll
|
|
||||||
qt_plugin_texttospeech.path = $$DESTDIR/install/texttospeech
|
|
||||||
INSTALLS += qt_plugin_texttospeech
|
|
||||||
|
|
||||||
VC_REDIST_FILES = $$files($$(VCToolsRedistDir)/$$(VSCMD_ARG_TGT_ARCH)/Microsoft.VC143.CRT/*.dll)
|
|
||||||
vc_redist.files = $$VC_REDIST_FILES
|
|
||||||
vc_redist.path = $$DESTDIR/install
|
|
||||||
INSTALLS += vc_redist
|
|
||||||
|
|
||||||
# Debug code for list of all variables and its values
|
|
||||||
#for(var, $$list($$enumerate_vars())) {
|
|
||||||
# value = $$eval($$var)
|
|
||||||
# message($$var = $$value)
|
|
||||||
#}
|
|
|
@ -1,52 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtLibrary {
|
|
||||||
name: "Pdf4QtLib"
|
|
||||||
Depends { name: "Qt"; submodules: ["core", "gui", "widgets", "xml", "svg"] }
|
|
||||||
Depends { name: "openssl" }
|
|
||||||
Depends { name: "freetype" }
|
|
||||||
Depends { name: "libjpeg" }
|
|
||||||
Depends { name: "openjpeg" }
|
|
||||||
Depends { name: "lcms" }
|
|
||||||
Depends {
|
|
||||||
condition: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("mingw")
|
|
||||||
name: "tbb"
|
|
||||||
}
|
|
||||||
Depends {
|
|
||||||
condition: qbs.hostOS.contains("linux")
|
|
||||||
name: "fontconfig"
|
|
||||||
}
|
|
||||||
Properties {
|
|
||||||
condition: qbs.toolchain.contains("msvc") || qbs.toolchain.contains("clang")
|
|
||||||
cpp.cxxFlags: "/bigobj"
|
|
||||||
}
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "PDF4QTLIB_LIBRARY"
|
|
||||||
}
|
|
||||||
|
|
||||||
files: [
|
|
||||||
"sources/*.cpp",
|
|
||||||
"sources/*.h",
|
|
||||||
"sources/*.ui",
|
|
||||||
"cmaps.qrc",
|
|
||||||
]
|
|
||||||
Export {
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
Depends { name: "Qt"; submodules: ["core", "gui", "widgets", "xml", "svg"] }
|
|
||||||
cpp.includePaths: ["sources"]
|
|
||||||
Depends { name: "openssl" }
|
|
||||||
Depends { name: "freetype" }
|
|
||||||
Depends { name: "libjpeg" }
|
|
||||||
Depends { name: "openjpeg" }
|
|
||||||
Depends { name: "lcms" }
|
|
||||||
Depends {
|
|
||||||
condition: qbs.toolchain.contains("gcc") && !qbs.toolchain.contains("mingw")
|
|
||||||
name: "tbb"
|
|
||||||
}
|
|
||||||
Depends {
|
|
||||||
condition: qbs.hostOS.contains("linux")
|
|
||||||
name: "fontconfig"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -206,7 +206,7 @@ PDFCreateLineTypeTool::PDFCreateLineTypeTool(PDFDrawWidgetProxy* proxy, PDFToolM
|
||||||
addTool(m_pickTool);
|
addTool(m_pickTool);
|
||||||
connect(m_pickTool, &PDFPickTool::pointPicked, this, &PDFCreateLineTypeTool::onPointPicked);
|
connect(m_pickTool, &PDFPickTool::pointPicked, this, &PDFCreateLineTypeTool::onPointPicked);
|
||||||
|
|
||||||
m_fillColor.setAlphaF(0.2);
|
m_fillColor.setAlphaF(0.2f);
|
||||||
|
|
||||||
updateActions();
|
updateActions();
|
||||||
}
|
}
|
||||||
|
@ -495,7 +495,7 @@ PDFCreateEllipseTool::PDFCreateEllipseTool(PDFDrawWidgetProxy* proxy, PDFToolMan
|
||||||
addTool(m_pickTool);
|
addTool(m_pickTool);
|
||||||
connect(m_pickTool, &PDFPickTool::rectanglePicked, this, &PDFCreateEllipseTool::onRectanglePicked);
|
connect(m_pickTool, &PDFPickTool::rectanglePicked, this, &PDFCreateEllipseTool::onRectanglePicked);
|
||||||
|
|
||||||
m_fillColor.setAlphaF(0.2);
|
m_fillColor.setAlphaF(0.2f);
|
||||||
|
|
||||||
updateActions();
|
updateActions();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ void PDFAnnotationManager::drawWidgetAnnotationHighlight(QRectF annotationRectan
|
||||||
|
|
||||||
if (color.isValid())
|
if (color.isValid())
|
||||||
{
|
{
|
||||||
color.setAlphaF(0.2);
|
color.setAlphaF(0.2f);
|
||||||
|
|
||||||
// Draw annotation rectangle by highlight color
|
// Draw annotation rectangle by highlight color
|
||||||
QPainterPath highlightArea;
|
QPainterPath highlightArea;
|
||||||
|
@ -2128,8 +2128,8 @@ void PDFWidgetAnnotationManager::createWidgetsForMarkupAnnotations(QWidget* pare
|
||||||
|
|
||||||
const PDFMarkupAnnotation* markupMainAnnotation = pageAnnotation.annotation->asMarkupAnnotation();
|
const PDFMarkupAnnotation* markupMainAnnotation = pageAnnotation.annotation->asMarkupAnnotation();
|
||||||
QColor color = markupMainAnnotation->getDrawColorFromAnnotationColor(markupMainAnnotation->getColor(), 1.0);
|
QColor color = markupMainAnnotation->getDrawColorFromAnnotationColor(markupMainAnnotation->getColor(), 1.0);
|
||||||
QColor titleColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.2, 1.0);
|
QColor titleColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.2f, 1.0f);
|
||||||
QColor backgroundColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.9, 1.0);
|
QColor backgroundColor = QColor::fromHslF(color.hueF(), color.saturationF(), 0.9f, 1.0f);
|
||||||
|
|
||||||
QString style = "QGroupBox { "
|
QString style = "QGroupBox { "
|
||||||
"border: 2px solid black; "
|
"border: 2px solid black; "
|
||||||
|
|
|
@ -26,6 +26,11 @@
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#include <openssl/rsaerr.h>
|
#include <openssl/rsaerr.h>
|
||||||
|
@ -258,3 +263,7 @@ bool PDFSignatureFactory::sign(QString certificateName, QString password, QByteA
|
||||||
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
|
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
|
@ -2052,7 +2052,7 @@ std::vector<PDFColorComponent> PDFIndexedColorSpace::transformColorsToBaseColorS
|
||||||
const int byteOffset = int(colorIndex * colorComponentCount);
|
const int byteOffset = int(colorIndex * colorComponentCount);
|
||||||
|
|
||||||
// We must point into the array. Check first and last component.
|
// We must point into the array. Check first and last component.
|
||||||
Q_ASSERT(byteOffset + colorComponentCount - 1 < m_colors.size());
|
Q_ASSERT(byteOffset + colorComponentCount - 1 < static_cast<size_t>(m_colors.size()));
|
||||||
|
|
||||||
const char* bytePointer = m_colors.constData() + byteOffset;
|
const char* bytePointer = m_colors.constData() + byteOffset;
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ PDFInteger PDFDocumentReader::findXrefTableOffset(const QByteArray& buffer)
|
||||||
throw PDFException(tr("Start of object reference table not found."));
|
throw PDFException(tr("Start of object reference table not found."));
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT(startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK) < buffer.size());
|
Q_ASSERT(startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK) < static_cast<size_t>(buffer.size()));
|
||||||
PDFLexicalAnalyzer analyzer(buffer.constData() + startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK), buffer.constData() + buffer.size());
|
PDFLexicalAnalyzer analyzer(buffer.constData() + startXRefPosition + std::strlen(PDF_START_OF_XREF_MARK), buffer.constData() + buffer.size());
|
||||||
const PDFLexicalAnalyzer::Token token = analyzer.fetch();
|
const PDFLexicalAnalyzer::Token token = analyzer.fetch();
|
||||||
if (token.type != PDFLexicalAnalyzer::TokenType::Integer)
|
if (token.type != PDFLexicalAnalyzer::TokenType::Integer)
|
||||||
|
|
|
@ -245,7 +245,7 @@ void PDFStructureTreeTextContentProcessor::finishText()
|
||||||
if (trimmedText.size() < m_currentText.size())
|
if (trimmedText.size() < m_currentText.size())
|
||||||
{
|
{
|
||||||
// Fix character bounding boxes...
|
// Fix character bounding boxes...
|
||||||
if (m_characterBoundingRects.size() == m_currentText.size())
|
if (m_characterBoundingRects.size() == static_cast<size_t>(m_currentText.size()))
|
||||||
{
|
{
|
||||||
std::vector<QRectF> boundingRects(std::next(m_characterBoundingRects.cbegin(), index), std::next(m_characterBoundingRects.cbegin(), index + trimmedText.length()));
|
std::vector<QRectF> boundingRects(std::next(m_characterBoundingRects.cbegin(), index), std::next(m_characterBoundingRects.cbegin(), index + trimmedText.length()));
|
||||||
m_characterBoundingRects = std::move(boundingRects);
|
m_characterBoundingRects = std::move(boundingRects);
|
||||||
|
@ -266,7 +266,7 @@ void PDFStructureTreeTextContentProcessor::finishText()
|
||||||
m_currentText = qMove(reversed);
|
m_currentText = qMove(reversed);
|
||||||
std::reverse(m_characterBoundingRects.begin(), m_characterBoundingRects.end());
|
std::reverse(m_characterBoundingRects.begin(), m_characterBoundingRects.end());
|
||||||
}
|
}
|
||||||
Q_ASSERT(m_currentText.size() == m_characterBoundingRects.size() || m_characterBoundingRects.empty());
|
Q_ASSERT(static_cast<size_t>(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_textSequence.emplace_back(PDFStructureTreeTextItem::createText(std::move(m_currentText), m_pageIndex, m_currentBoundingBox, std::move(m_characterBoundingRects)));
|
||||||
}
|
}
|
||||||
m_currentText = QString();
|
m_currentText = QString();
|
||||||
|
|
|
@ -2286,9 +2286,9 @@ void PDFPageContentElementManipulator::drawPage(QPainter* painter,
|
||||||
PDFPainterStateGuard guard(painter);
|
PDFPainterStateGuard guard(painter);
|
||||||
QPen pen(Qt::SolidLine);
|
QPen pen(Qt::SolidLine);
|
||||||
pen.setWidthF(2.0);
|
pen.setWidthF(2.0);
|
||||||
pen.setColor(QColor::fromRgbF(0.8, 0.8, 0.1, 0.7));
|
pen.setColor(QColor::fromRgbF(0.8f, 0.8f, 0.1f, 0.7f));
|
||||||
QBrush brush(Qt::SolidPattern);
|
QBrush brush(Qt::SolidPattern);
|
||||||
brush.setColor(QColor::fromRgbF(1.0, 1.0, 0.0, 0.2));
|
brush.setColor(QColor::fromRgbF(1.0f, 1.0f, 0.0f, 0.2f));
|
||||||
|
|
||||||
painter->setPen(std::move(pen));
|
painter->setPen(std::move(pen));
|
||||||
painter->setBrush(std::move(brush));
|
painter->setBrush(std::move(brush));
|
||||||
|
|
|
@ -705,7 +705,7 @@ PDFObject PDFParser::getObject()
|
||||||
{
|
{
|
||||||
case PDFLexicalAnalyzer::TokenType::Boolean:
|
case PDFLexicalAnalyzer::TokenType::Boolean:
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::Bool);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::Bool);
|
||||||
const bool value = m_lookAhead1.data.toBool();
|
const bool value = m_lookAhead1.data.toBool();
|
||||||
shift();
|
shift();
|
||||||
return PDFObject::createBool(value);
|
return PDFObject::createBool(value);
|
||||||
|
@ -713,7 +713,7 @@ PDFObject PDFParser::getObject()
|
||||||
|
|
||||||
case PDFLexicalAnalyzer::TokenType::Integer:
|
case PDFLexicalAnalyzer::TokenType::Integer:
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::LongLong);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::LongLong);
|
||||||
const PDFInteger value = m_lookAhead1.data.toLongLong();
|
const PDFInteger value = m_lookAhead1.data.toLongLong();
|
||||||
shift();
|
shift();
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ PDFObject PDFParser::getObject()
|
||||||
m_lookAhead2.type == PDFLexicalAnalyzer::TokenType::Command &&
|
m_lookAhead2.type == PDFLexicalAnalyzer::TokenType::Command &&
|
||||||
m_lookAhead2.data.toByteArray() == PDF_REFERENCE_COMMAND)
|
m_lookAhead2.data.toByteArray() == PDF_REFERENCE_COMMAND)
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::LongLong);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::LongLong);
|
||||||
const PDFInteger generation = m_lookAhead1.data.toLongLong();
|
const PDFInteger generation = m_lookAhead1.data.toLongLong();
|
||||||
shift();
|
shift();
|
||||||
shift();
|
shift();
|
||||||
|
@ -738,7 +738,7 @@ PDFObject PDFParser::getObject()
|
||||||
|
|
||||||
case PDFLexicalAnalyzer::TokenType::Real:
|
case PDFLexicalAnalyzer::TokenType::Real:
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::Double);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::Double);
|
||||||
const PDFReal value = m_lookAhead1.data.toDouble();
|
const PDFReal value = m_lookAhead1.data.toDouble();
|
||||||
shift();
|
shift();
|
||||||
return PDFObject::createReal(value);
|
return PDFObject::createReal(value);
|
||||||
|
@ -746,7 +746,7 @@ PDFObject PDFParser::getObject()
|
||||||
|
|
||||||
case PDFLexicalAnalyzer::TokenType::String:
|
case PDFLexicalAnalyzer::TokenType::String:
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::QByteArray);
|
||||||
QByteArray array = m_lookAhead1.data.toByteArray();
|
QByteArray array = m_lookAhead1.data.toByteArray();
|
||||||
array.shrink_to_fit();
|
array.shrink_to_fit();
|
||||||
shift();
|
shift();
|
||||||
|
@ -755,7 +755,7 @@ PDFObject PDFParser::getObject()
|
||||||
|
|
||||||
case PDFLexicalAnalyzer::TokenType::Name:
|
case PDFLexicalAnalyzer::TokenType::Name:
|
||||||
{
|
{
|
||||||
Q_ASSERT(m_lookAhead1.data.typeId() == QVariant::ByteArray);
|
Q_ASSERT(m_lookAhead1.data.typeId() == QMetaType::QByteArray);
|
||||||
QByteArray array = m_lookAhead1.data.toByteArray();
|
QByteArray array = m_lookAhead1.data.toByteArray();
|
||||||
array.shrink_to_fit();
|
array.shrink_to_fit();
|
||||||
shift();
|
shift();
|
||||||
|
|
|
@ -31,6 +31,11 @@
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <openssl/rc4.h>
|
#include <openssl/rc4.h>
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
|
@ -2605,7 +2610,7 @@ PDFObject PDFPublicKeySecurityHandler::createEncryptionDictionaryObject() const
|
||||||
factory << PDFInteger(int32_t(m_permissions));
|
factory << PDFInteger(int32_t(m_permissions));
|
||||||
factory.endDictionaryItem();
|
factory.endDictionaryItem();
|
||||||
|
|
||||||
// Jakub Melka: 131105 is mysterious value set by Adobe Acrobat Pro
|
// Jakub Melka: 131105 is mysterious value set by Acrobat Pro
|
||||||
// when using public key security
|
// when using public key security
|
||||||
factory.beginDictionaryItem("R");
|
factory.beginDictionaryItem("R");
|
||||||
factory << PDFInteger(131105);
|
factory << PDFInteger(131105);
|
||||||
|
@ -2622,3 +2627,6 @@ PDFObject PDFPublicKeySecurityHandler::createEncryptionDictionaryObject() const
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
|
@ -28,6 +28,11 @@
|
||||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable: 4996)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/sha.h>
|
#include <openssl/sha.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
|
@ -2109,3 +2114,7 @@ pdf::PDFCertificateStore::CertificateEntries pdf::PDFCertificateStore::getSystem
|
||||||
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
|
#if defined(PDF4QT_COMPILER_MINGW) || defined(PDF4QT_COMPILER_GCC)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PDF4QT_COMPILER_MSVC)
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
|
|
|
@ -1394,7 +1394,7 @@ void PDFSelectTableTool::drawPage(QPainter* painter,
|
||||||
if (isTablePicked() && pageIndex == m_pageIndex)
|
if (isTablePicked() && pageIndex == m_pageIndex)
|
||||||
{
|
{
|
||||||
PDFPainterStateGuard guard(painter);
|
PDFPainterStateGuard guard(painter);
|
||||||
QColor color = QColor::fromRgbF(0.0, 0.0, 0.5, 0.2);
|
QColor color = QColor::fromRgbF(0.0f, 0.0f, 0.5f, 0.2f);
|
||||||
QRectF rectangle = pagePointToDevicePointMatrix.mapRect(m_pickedRectangle);
|
QRectF rectangle = pagePointToDevicePointMatrix.mapRect(m_pickedRectangle);
|
||||||
|
|
||||||
const PDFReal lineWidth = PDFWidgetUtils::scaleDPI_x(getProxy()->getWidget(), 2.0);
|
const PDFReal lineWidth = PDFWidgetUtils::scaleDPI_x(getProxy()->getWidget(), 2.0);
|
||||||
|
|
|
@ -10360,7 +10360,7 @@ void PDFXFALayoutEngine::layoutFlow(LayoutParameters& layoutParameters, bool bre
|
||||||
QStringList colWidths = layoutParameters.colWidths.split(' ', Qt::SkipEmptyParts);
|
QStringList colWidths = layoutParameters.colWidths.split(' ', Qt::SkipEmptyParts);
|
||||||
for (size_t i = 0; i < columnWidths.size(); ++i)
|
for (size_t i = 0; i < columnWidths.size(); ++i)
|
||||||
{
|
{
|
||||||
if (i >= colWidths.size())
|
if (i >= static_cast<size_t>(colWidths.size()))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -12134,19 +12134,19 @@ void PDFXFAEngineImpl::drawUi(const xfa::XFA_ui* ui,
|
||||||
passwordEdit || signature || textEdit;
|
passwordEdit || signature || textEdit;
|
||||||
const bool isDefaultUi = !isNonDefaultUi || defaultUi;
|
const bool isDefaultUi = !isNonDefaultUi || defaultUi;
|
||||||
|
|
||||||
if (textEdit || (isDefaultUi && value.value.typeId() == QVariant::String))
|
if (textEdit || (isDefaultUi && value.value.typeId() == QMetaType::QString))
|
||||||
{
|
{
|
||||||
drawUiTextEdit(textEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
drawUiTextEdit(textEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
||||||
}
|
}
|
||||||
else if (checkButton || (isDefaultUi && value.value.typeId() == QVariant::Bool))
|
else if (checkButton || (isDefaultUi && value.value.typeId() == QMetaType::Bool))
|
||||||
{
|
{
|
||||||
drawUiCheckButton(checkButton, value, nominalExtentArea, painter);
|
drawUiCheckButton(checkButton, value, nominalExtentArea, painter);
|
||||||
}
|
}
|
||||||
else if (imageEdit || (isDefaultUi && value.value.typeId() == QVariant::Image))
|
else if (imageEdit || (isDefaultUi && value.value.typeId() == QMetaType::QImage))
|
||||||
{
|
{
|
||||||
drawUiImageEdit(imageEdit, value, errors, nominalExtentArea, painter);
|
drawUiImageEdit(imageEdit, value, errors, nominalExtentArea, painter);
|
||||||
}
|
}
|
||||||
else if (numericEdit || (isDefaultUi && value.value.typeId() == QVariant::Double))
|
else if (numericEdit || (isDefaultUi && value.value.typeId() == QMetaType::Double))
|
||||||
{
|
{
|
||||||
drawUiNumericEdit(numericEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
drawUiNumericEdit(numericEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
||||||
}
|
}
|
||||||
|
@ -12166,9 +12166,9 @@ void PDFXFAEngineImpl::drawUi(const xfa::XFA_ui* ui,
|
||||||
{
|
{
|
||||||
errors << PDFRenderError(RenderErrorType::NotImplemented, PDFTranslationContext::tr("XFA: Buttons not implemented."));
|
errors << PDFRenderError(RenderErrorType::NotImplemented, PDFTranslationContext::tr("XFA: Buttons not implemented."));
|
||||||
}
|
}
|
||||||
else if (dateTimeEdit || (isDefaultUi && (value.value.typeId() == QVariant::DateTime ||
|
else if (dateTimeEdit || (isDefaultUi && (value.value.typeId() == QMetaType::QDateTime ||
|
||||||
value.value.typeId() == QVariant::Date ||
|
value.value.typeId() == QMetaType::QDate ||
|
||||||
value.value.typeId() == QVariant::Time)))
|
value.value.typeId() == QMetaType::QTime)))
|
||||||
{
|
{
|
||||||
drawUiDateTimeEdit(dateTimeEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
drawUiDateTimeEdit(dateTimeEdit, value, errors, nominalExtentArea, paragraphSettingsIndex, painter);
|
||||||
}
|
}
|
||||||
|
@ -12391,15 +12391,15 @@ void PDFXFAEngineImpl::drawUiDateTimeEdit(const xfa::XFA_dateTimeEdit* dateTimeE
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
|
|
||||||
if (value.value.typeId() == QVariant::DateTime)
|
if (value.value.typeId() == QMetaType::QDateTime)
|
||||||
{
|
{
|
||||||
text = value.value.toDateTime().toString();
|
text = value.value.toDateTime().toString();
|
||||||
}
|
}
|
||||||
else if (value.value.typeId() == QVariant::Time)
|
else if (value.value.typeId() == QMetaType::QTime)
|
||||||
{
|
{
|
||||||
text = value.value.toTime().toString();
|
text = value.value.toTime().toString();
|
||||||
}
|
}
|
||||||
else if (value.value.typeId() == QVariant::Date)
|
else if (value.value.typeId() == QMetaType::QDate)
|
||||||
{
|
{
|
||||||
text = value.value.toDate().toString();
|
text = value.value.toDate().toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,114 +0,0 @@
|
||||||
# Copyright (C) 2018-2022 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 printsupport texttospeech network xml
|
|
||||||
|
|
||||||
TARGET = Pdf4QtViewer
|
|
||||||
TEMPLATE = lib
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
DEFINES += PDF4QTVIEWER_LIBRARY
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF viewer support library"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
LIBS += -ltbb
|
|
||||||
}
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
LIBS += -lPDF4QtLib
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
pdfaboutdialog.cpp \
|
|
||||||
pdfadvancedfindwidget.cpp \
|
|
||||||
pdfdocumentpropertiesdialog.cpp \
|
|
||||||
pdfencryptionsettingsdialog.cpp \
|
|
||||||
pdfencryptionstrengthhintwidget.cpp \
|
|
||||||
pdfoptimizedocumentdialog.cpp \
|
|
||||||
pdfprogramcontroller.cpp \
|
|
||||||
pdfrecentfilemanager.cpp \
|
|
||||||
pdfrendertoimagesdialog.cpp \
|
|
||||||
pdfsendmail.cpp \
|
|
||||||
pdfsidebarwidget.cpp \
|
|
||||||
pdftexttospeech.cpp \
|
|
||||||
pdfundoredomanager.cpp \
|
|
||||||
pdfviewermainwindow.cpp \
|
|
||||||
pdfviewermainwindowlite.cpp \
|
|
||||||
pdfviewersettings.cpp \
|
|
||||||
pdfviewersettingsdialog.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
pdfaboutdialog.h \
|
|
||||||
pdfadvancedfindwidget.h \
|
|
||||||
pdfdocumentpropertiesdialog.h \
|
|
||||||
pdfencryptionsettingsdialog.h \
|
|
||||||
pdfencryptionstrengthhintwidget.h \
|
|
||||||
pdfoptimizedocumentdialog.h \
|
|
||||||
pdfprogramcontroller.h \
|
|
||||||
pdfrecentfilemanager.h \
|
|
||||||
pdfrendertoimagesdialog.h \
|
|
||||||
pdfsendmail.h \
|
|
||||||
pdfsidebarwidget.h \
|
|
||||||
pdftexttospeech.h \
|
|
||||||
pdfundoredomanager.h \
|
|
||||||
pdfviewerglobal.h \
|
|
||||||
pdfviewermainwindow.h \
|
|
||||||
pdfviewermainwindowlite.h \
|
|
||||||
pdfviewersettings.h \
|
|
||||||
pdfviewersettingsdialog.h
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
pdfaboutdialog.ui \
|
|
||||||
pdfadvancedfindwidget.ui \
|
|
||||||
pdfdocumentpropertiesdialog.ui \
|
|
||||||
pdfencryptionsettingsdialog.ui \
|
|
||||||
pdfoptimizedocumentdialog.ui \
|
|
||||||
pdfrendertoimagesdialog.ui \
|
|
||||||
pdfsidebarwidget.ui \
|
|
||||||
pdfviewermainwindow.ui \
|
|
||||||
pdfviewermainwindowlite.ui \
|
|
||||||
pdfviewersettingsdialog.ui
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
viewer_library.files = $$DESTDIR/Pdf4QtViewer.dll
|
|
||||||
viewer_library.path = $$DESTDIR/install
|
|
||||||
viewer_library.CONFIG += no_check_exist
|
|
||||||
INSTALLS += viewer_library
|
|
||||||
|
|
||||||
plugins.files = $$DESTDIR/pdfplugins/ObjectInspectorPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/OutputPreviewPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/DimensionsPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/SoftProofingPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/RedactPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/AudioBookPlugin.dll \
|
|
||||||
$$DESTDIR/pdfplugins/SignaturePlugin.dll
|
|
||||||
|
|
||||||
plugins.path = $$DESTDIR/install/pdfplugins
|
|
||||||
plugins.CONFIG += no_check_exist
|
|
||||||
INSTALLS += plugins
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
pdf4qtviewer.qrc
|
|
||||||
|
|
||||||
DEFINES += QT_INSTALL_DIRECTORY=\"\\\"$$[QT_INSTALL_BINS]\\\"\"
|
|
|
@ -1,30 +0,0 @@
|
||||||
import qbs.Utilities
|
|
||||||
|
|
||||||
Pdf4QtLibrary {
|
|
||||||
name: "Pdf4QtViewer"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"pdf4qtviewer.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: ["PDF4QTVIEWER_LIBRARY", "QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
|
|
||||||
}
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("linux")
|
|
||||||
cpp.defines: ["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)]
|
|
||||||
}
|
|
||||||
cpp.defines: base.concat(["QT_INSTALL_DIRECTORY=" + Utilities.cStringQuote(Qt.core.binPath)])
|
|
||||||
Depends { name: "Qt"; submodules: ["printsupport", "texttospeech", "network", "xml"] }
|
|
||||||
Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
|
|
||||||
Depends { name: "Pdf4QtLib" }
|
|
||||||
Export {
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Depends { name: "Pdf4QtLib" }
|
|
||||||
Depends { name: "Qt.winextras"; condition: qbs.hostOS.contains("windows") }
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -130,7 +130,7 @@ void PDFDocumentPropertiesDialog::initializeProperties(const pdf::PDFDocument* d
|
||||||
{
|
{
|
||||||
QString key = QString::fromLatin1(item.first);
|
QString key = QString::fromLatin1(item.first);
|
||||||
QVariant valueVariant = item.second;
|
QVariant valueVariant = item.second;
|
||||||
QString value = (valueVariant.typeId() == QVariant::DateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
|
QString value = (valueVariant.typeId() == QMetaType::QDateTime) ? locale.toString(valueVariant.toDateTime()) : valueVariant.toString();
|
||||||
new QTreeWidgetItem(customRoot, { key, value });
|
new QTreeWidgetItem(customRoot, { key, value });
|
||||||
}
|
}
|
||||||
ui->propertiesTreeWidget->addTopLevelItem(customRoot);
|
ui->propertiesTreeWidget->addTopLevelItem(customRoot);
|
||||||
|
|
|
@ -97,7 +97,7 @@ void PDFRecentFileManager::onRecentFileActionTriggered()
|
||||||
Q_ASSERT(action);
|
Q_ASSERT(action);
|
||||||
|
|
||||||
QVariant data = action->data();
|
QVariant data = action->data();
|
||||||
if (data.typeId() == QVariant::String)
|
if (data.typeId() == QMetaType::QString)
|
||||||
{
|
{
|
||||||
emit fileOpenRequest(data.toString());
|
emit fileOpenRequest(data.toString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -811,9 +811,9 @@ void PDFViewerSettingsDialog::setSpeechEngine(const QString& engine, const QStri
|
||||||
QVector<QLocale> locales = textToSpeech.availableLocales();
|
QVector<QLocale> locales = textToSpeech.availableLocales();
|
||||||
ui->speechLocaleComboBox->setUpdatesEnabled(false);
|
ui->speechLocaleComboBox->setUpdatesEnabled(false);
|
||||||
ui->speechLocaleComboBox->clear();
|
ui->speechLocaleComboBox->clear();
|
||||||
for (const QLocale& locale : locales)
|
for (const QLocale& currentLocale : locales)
|
||||||
{
|
{
|
||||||
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeCountryName()), locale.name());
|
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(currentLocale.nativeLanguageName(), currentLocale.nativeCountryName()), currentLocale.name());
|
||||||
}
|
}
|
||||||
ui->speechLocaleComboBox->setUpdatesEnabled(true);
|
ui->speechLocaleComboBox->setUpdatesEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
# Copyright (C) 2018-2022 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 = Pdf4QtViewerLite
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Lite version"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
LIBS += -ltbb
|
|
||||||
}
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
LIBS += -lPDF4QtLib -lPDF4QtViewer
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
application.files = $$DESTDIR/Pdf4QtViewerLite.exe
|
|
||||||
application.path = $$DESTDIR/install
|
|
||||||
application.CONFIG += no_check_exist
|
|
||||||
INSTALLS += application
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
main.cpp
|
|
|
@ -1,7 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "Pdf4QtViewerLite"
|
|
||||||
files: [
|
|
||||||
"*.cpp"
|
|
||||||
]
|
|
||||||
Depends { name: "Pdf4QtViewer" }
|
|
||||||
}
|
|
|
@ -1,57 +0,0 @@
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += AUDIOBOOKPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
win32-*g++: {
|
|
||||||
LIBS += -lole32 -lsapi
|
|
||||||
}
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
audiobookcreator.cpp \
|
|
||||||
audiobookplugin.cpp \
|
|
||||||
audiotextstreameditordockwidget.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
audiobookcreator.h \
|
|
||||||
audiobookplugin.h \
|
|
||||||
audiotextstreameditordockwidget.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
AudioBookPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
audiotextstreameditordockwidget.ui
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "AudioBookPlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "AUDIOBOOKPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -200,7 +200,7 @@ void AudioBookPlugin::drawPage(QPainter* painter,
|
||||||
|
|
||||||
QColor strokeColor = color;
|
QColor strokeColor = color;
|
||||||
QColor fillColor = color;
|
QColor fillColor = color;
|
||||||
fillColor.setAlphaF(0.2);
|
fillColor.setAlphaF(0.2f);
|
||||||
|
|
||||||
pen.setColor(strokeColor);
|
pen.setColor(strokeColor);
|
||||||
painter->setPen(pen);
|
painter->setPen(pen);
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
# Copyright (C) 2020-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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += DIMENSIONPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
dimensionsplugin.cpp \
|
|
||||||
dimensiontool.cpp \
|
|
||||||
settingsdialog.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
dimensionsplugin.h \
|
|
||||||
dimensiontool.h \
|
|
||||||
settingsdialog.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
DimensionsPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
settingsdialog.ui
|
|
|
@ -1,15 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "DimensionsPlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "DIMENSIONPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -232,7 +232,7 @@ void DimensionsPlugin::drawPage(QPainter* painter,
|
||||||
pen.setCosmetic(true);
|
pen.setCosmetic(true);
|
||||||
|
|
||||||
QColor brushColor = Qt::black;
|
QColor brushColor = Qt::black;
|
||||||
brushColor.setAlphaF(0.1);
|
brushColor.setAlphaF(0.1f);
|
||||||
painter->setPen(qMove(pen));
|
painter->setPen(qMove(pen));
|
||||||
painter->setBrush(QBrush(brushColor, isArea ? Qt::SolidPattern : Qt::DiagCrossPattern));
|
painter->setBrush(QBrush(brushColor, isArea ? Qt::SolidPattern : Qt::DiagCrossPattern));
|
||||||
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += OBJECTINSPECTORPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
objectinspectordialog.cpp \
|
|
||||||
objectinspectorplugin.cpp \
|
|
||||||
objectstatisticsdialog.cpp \
|
|
||||||
objectviewerwidget.cpp \
|
|
||||||
pdfobjectinspectortreeitemmodel.cpp \
|
|
||||||
statisticsgraphwidget.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
objectinspectordialog.h \
|
|
||||||
objectinspectorplugin.h \
|
|
||||||
objectstatisticsdialog.h \
|
|
||||||
objectviewerwidget.h \
|
|
||||||
pdfobjectinspectortreeitemmodel.h \
|
|
||||||
statisticsgraphwidget.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
ObjectInspectorPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
objectinspectordialog.ui \
|
|
||||||
objectstatisticsdialog.ui \
|
|
||||||
objectviewerwidget.ui \
|
|
||||||
statisticsgraphwidget.ui
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
LIBS += -ltbb
|
|
||||||
}
|
|
|
@ -88,7 +88,7 @@ StatisticsGraphWidget::GeometryHint StatisticsGraphWidget::getGeometryHint() con
|
||||||
|
|
||||||
for (const auto& item : m_statistics.items)
|
for (const auto& item : m_statistics.items)
|
||||||
{
|
{
|
||||||
Q_ASSERT(item.texts.size() == hint.textWidths.size());
|
Q_ASSERT(static_cast<size_t>(item.texts.size()) == hint.textWidths.size());
|
||||||
|
|
||||||
for (int i = 0; i < item.texts.size(); ++i)
|
for (int i = 0; i < item.texts.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -152,7 +152,7 @@ void StatisticsGraphWidget::paintEvent(QPaintEvent* event)
|
||||||
top = currentRect.bottom();
|
top = currentRect.bottom();
|
||||||
|
|
||||||
QColor color = (m_selectedColorBox == i) ? selectedColor: item.color;
|
QColor color = (m_selectedColorBox == i) ? selectedColor: item.color;
|
||||||
color.setAlphaF(0.8);
|
color.setAlphaF(0.8f);
|
||||||
painter.fillRect(currentRect, color);
|
painter.fillRect(currentRect, color);
|
||||||
m_colorBoxes.push_back(currentRect);
|
m_colorBoxes.push_back(currentRect);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
# 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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += OUTPUTPREVIEWPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
inkcoveragedialog.cpp \
|
|
||||||
outputpreviewdialog.cpp \
|
|
||||||
outputpreviewplugin.cpp \
|
|
||||||
outputpreviewwidget.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
inkcoveragedialog.h \
|
|
||||||
outputpreviewdialog.h \
|
|
||||||
outputpreviewplugin.h \
|
|
||||||
outputpreviewwidget.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
OutputPreviewPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
inkcoveragedialog.ui \
|
|
||||||
outputpreviewdialog.ui
|
|
|
@ -1,16 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "OutputPreviewPlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "OUTPUTPREVIEWPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
# Copyright (C) 2020-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/>.
|
|
||||||
|
|
||||||
|
|
||||||
TEMPLATE = subdirs
|
|
||||||
|
|
||||||
SUBDIRS += \
|
|
||||||
DimensionsPlugin \
|
|
||||||
SoftProofingPlugin \
|
|
||||||
RedactPlugin \
|
|
||||||
OutputPreviewPlugin \
|
|
||||||
ObjectInspectorPlugin \
|
|
||||||
AudioBookPlugin \
|
|
||||||
SignaturePlugin
|
|
||||||
|
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
# Copyright (C) 2020-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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += REDACTPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
createredacteddocumentdialog.cpp \
|
|
||||||
redactplugin.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
createredacteddocumentdialog.h \
|
|
||||||
redactplugin.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
RedactPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
createredacteddocumentdialog.ui
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "RedactPlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "REDACTPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
# Copyright (C) 2022 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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += SIGNATUREPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += /std:c++latest /utf-8
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
Pdf4Qt_OPENSSL_PATH = $$absolute_path(../../Tools, $$[QT_INSTALL_PREFIX])
|
|
||||||
|
|
||||||
# Link OpenSSL
|
|
||||||
LIBS += -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/bin -L$$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/lib -llibcrypto -llibssl
|
|
||||||
INCLUDEPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
|
|
||||||
DEPENDPATH += $$Pdf4Qt_OPENSSL_PATH/OpenSSL/Win_x64/include
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
signatureplugin.cpp \
|
|
||||||
signdialog.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
signatureplugin.h \
|
|
||||||
signdialog.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
SignaturePlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
signdialog.ui
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "SignaturePlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "SIGNATUREPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,50 +0,0 @@
|
||||||
# Copyright (C) 2020-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/>.
|
|
||||||
|
|
||||||
TEMPLATE = lib
|
|
||||||
DEFINES += SOFTPROOFINGPLUGIN_LIBRARY
|
|
||||||
|
|
||||||
QT += gui widgets
|
|
||||||
|
|
||||||
include(../../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/../..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/../../pdfplugins
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
softproofingplugin.cpp \
|
|
||||||
settingsdialog.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
softproofingplugin.h \
|
|
||||||
settingsdialog.h
|
|
||||||
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
DISTFILES += \
|
|
||||||
SoftProofingPlugin.json
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
icons.qrc
|
|
||||||
|
|
||||||
FORMS += \
|
|
||||||
settingsdialog.ui
|
|
|
@ -1,16 +0,0 @@
|
||||||
import qbs
|
|
||||||
|
|
||||||
Pdf4QtPlugin {
|
|
||||||
name: "SoftProofingPlugin"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
"*.ui",
|
|
||||||
"icons.qrc",
|
|
||||||
]
|
|
||||||
cpp.includePaths: ["."]
|
|
||||||
Properties {
|
|
||||||
condition: qbs.hostOS.contains("windows")
|
|
||||||
cpp.defines: "SOFTPROOFINGPLUGIN_LIBRARY"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
# Copyright (C) 2018-2022 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 = Pdf4QtViewerProfi
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
RC_ICONS = $$PWD/app-icon.ico
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF viewer for Qt, Profi version"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
LIBS += -ltbb
|
|
||||||
}
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources $$PWD/../PDF4QtViewer
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
LIBS += -lPDF4QtLib -lPDF4QtViewer
|
|
||||||
CONFIG += force_debug_info
|
|
||||||
|
|
||||||
application.files = $$DESTDIR/Pdf4QtViewerProfi.exe
|
|
||||||
application.path = $$DESTDIR/install
|
|
||||||
application.CONFIG += no_check_exist
|
|
||||||
INSTALLS += application
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
main.cpp
|
|
|
@ -1,8 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "Pdf4QtViewerProfi"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"app-icon.ico"
|
|
||||||
]
|
|
||||||
Depends { name: "Pdf4QtViewer" }
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
# Copyright (C) 2018-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 += gui widgets
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
CONFIG += console
|
|
||||||
CONFIG -= app_bundle
|
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
|
||||||
# depend on your compiler). Please consult the documentation of the
|
|
||||||
# deprecated API in order to know how to port your code away from it.
|
|
||||||
DEFINES += QT_DEPRECATED_WARNINGS
|
|
||||||
|
|
||||||
# You can also make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -lPDF4QtLib
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
main.cpp \
|
|
||||||
pdfexamplesgenerator.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
pdfexamplesgenerator.h
|
|
|
@ -1,7 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "PdfExampleGenerator"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
"*.h",
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,109 +0,0 @@
|
||||||
# Copyright (C) 2020-2022 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/>.
|
|
||||||
|
|
||||||
CONFIG += console
|
|
||||||
CONFIG -= app_bundle
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
TARGET = PdfTool
|
|
||||||
|
|
||||||
QMAKE_TARGET_DESCRIPTION = "PDF tool for Qt"
|
|
||||||
QMAKE_TARGET_COPYRIGHT = "(c) Jakub Melka 2018-2022"
|
|
||||||
|
|
||||||
# You can make your code fail to compile if it uses deprecated APIs.
|
|
||||||
# In order to do so, uncomment the following line.
|
|
||||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
|
||||||
|
|
||||||
win32-*g++|unix: {
|
|
||||||
LIBS += -ltbb
|
|
||||||
win32: {
|
|
||||||
LIBS += -lole32 -lsapi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../PDF4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -lPDF4QtLib
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
main.cpp \
|
|
||||||
pdfoutputformatter.cpp \
|
|
||||||
pdftoolabstractapplication.cpp \
|
|
||||||
pdftoolattachments.cpp \
|
|
||||||
pdftoolaudiobook.cpp \
|
|
||||||
pdftoolcertstore.cpp \
|
|
||||||
pdftoolcolorprofiles.cpp \
|
|
||||||
pdftooldecrypt.cpp \
|
|
||||||
pdftooldiff.cpp \
|
|
||||||
pdftoolencrypt.cpp \
|
|
||||||
pdftoolfetchimages.cpp \
|
|
||||||
pdftoolfetchtext.cpp \
|
|
||||||
pdftoolinfo.cpp \
|
|
||||||
pdftoolinfofonts.cpp \
|
|
||||||
pdftoolinfoinks.cpp \
|
|
||||||
pdftoolinfojavascript.cpp \
|
|
||||||
pdftoolinfometadata.cpp \
|
|
||||||
pdftoolinfonameddestinations.cpp \
|
|
||||||
pdftoolinfopageboxes.cpp \
|
|
||||||
pdftoolinfostructuretree.cpp \
|
|
||||||
pdftoolinkcoverage.cpp \
|
|
||||||
pdftooloptimize.cpp \
|
|
||||||
pdftoolrender.cpp \
|
|
||||||
pdftoolseparate.cpp \
|
|
||||||
pdftoolstatistics.cpp \
|
|
||||||
pdftoolunite.cpp \
|
|
||||||
pdftoolverifysignatures.cpp \
|
|
||||||
pdftoolxml.cpp
|
|
||||||
|
|
||||||
application.files = $$DESTDIR/PdfTool.exe
|
|
||||||
application.path = $$DESTDIR/install
|
|
||||||
application.CONFIG += no_check_exist
|
|
||||||
INSTALLS += application
|
|
||||||
|
|
||||||
HEADERS += \
|
|
||||||
pdfoutputformatter.h \
|
|
||||||
pdftoolabstractapplication.h \
|
|
||||||
pdftoolattachments.h \
|
|
||||||
pdftoolaudiobook.h \
|
|
||||||
pdftoolcertstore.h \
|
|
||||||
pdftoolcolorprofiles.h \
|
|
||||||
pdftooldecrypt.h \
|
|
||||||
pdftooldiff.h \
|
|
||||||
pdftoolencrypt.h \
|
|
||||||
pdftoolfetchimages.h \
|
|
||||||
pdftoolfetchtext.h \
|
|
||||||
pdftoolinfo.h \
|
|
||||||
pdftoolinfofonts.h \
|
|
||||||
pdftoolinfoinks.h \
|
|
||||||
pdftoolinfojavascript.h \
|
|
||||||
pdftoolinfometadata.h \
|
|
||||||
pdftoolinfonameddestinations.h \
|
|
||||||
pdftoolinfopageboxes.h \
|
|
||||||
pdftoolinfostructuretree.h \
|
|
||||||
pdftoolinkcoverage.h \
|
|
||||||
pdftooloptimize.h \
|
|
||||||
pdftoolrender.h \
|
|
||||||
pdftoolseparate.h \
|
|
||||||
pdftoolstatistics.h \
|
|
||||||
pdftoolunite.h \
|
|
||||||
pdftoolverifysignatures.h \
|
|
||||||
pdftoolxml.h
|
|
|
@ -1,7 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "PdfTool"
|
|
||||||
files: [
|
|
||||||
"*.h",
|
|
||||||
"*.cpp",
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -155,7 +155,7 @@ int PDFToolInfoApplication::execute(const PDFToolOptions& options)
|
||||||
{
|
{
|
||||||
QString key = QString::fromLatin1(item.first);
|
QString key = QString::fromLatin1(item.first);
|
||||||
QVariant valueVariant = item.second;
|
QVariant valueVariant = item.second;
|
||||||
QString value = (valueVariant.typeId() == QVariant::DateTime) ? convertDateTimeToString(valueVariant.toDateTime().toLocalTime(), options.outputDateFormat) : valueVariant.toString();
|
QString value = (valueVariant.typeId() == QMetaType::QDateTime) ? convertDateTimeToString(valueVariant.toDateTime().toLocalTime(), options.outputDateFormat) : valueVariant.toString();
|
||||||
writeProperty("custom-property", key, value);
|
writeProperty("custom-property", key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
# Copyright (C) 2018-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 += testlib
|
|
||||||
|
|
||||||
CONFIG += qt console warn_on depend_includepath testcase
|
|
||||||
CONFIG -= app_bundle
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
include(../Pdf4Qt.pri)
|
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../Pdf4QtLib/Sources
|
|
||||||
|
|
||||||
DESTDIR = $$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -L$$OUT_PWD/..
|
|
||||||
|
|
||||||
LIBS += -lPdf4QtLib
|
|
||||||
|
|
||||||
SOURCES += \
|
|
||||||
tst_lexicalanalyzertest.cpp
|
|
||||||
|
|
||||||
target.path = $$DESTDIR/install
|
|
||||||
INSTALLS += target
|
|
|
@ -1,7 +0,0 @@
|
||||||
Pdf4QtApp {
|
|
||||||
name: "UnitTests"
|
|
||||||
files: [
|
|
||||||
"*.cpp",
|
|
||||||
]
|
|
||||||
Depends { name: "Qt"; submodules: ["test"] }
|
|
||||||
}
|
|
|
@ -221,20 +221,20 @@ void LexicalAnalyzerTest::test_invalid_input()
|
||||||
bigNumber.front() = '1';
|
bigNumber.front() = '1';
|
||||||
bigNumber.back() = 0;
|
bigNumber.back() = 0;
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("(\\9adoctalnumber)"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("(\\9adoctalnumber)"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("(\\)"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("(\\)"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 +4-5"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 +4-5"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 +"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 +"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("123 456 + 45"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("123 456 + 45"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream(bigNumber.constData()), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream(bigNumber.constData()));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("/#Q1FF"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/#Q1FF"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("/#1QFF"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/#1QFF"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("/# "), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("/# "));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("<A bad hexadecimal string>"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("<A bad hexadecimal string>"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("<1FA3"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("<1FA3"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("<1FA"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("<1FA"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream("> albatros"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream("> albatros"));
|
||||||
QVERIFY_EXCEPTION_THROWN(scanWholeStream(")"), pdf::PDFException);
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException, scanWholeStream(")"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LexicalAnalyzerTest::test_header_regexp()
|
void LexicalAnalyzerTest::test_header_regexp()
|
||||||
|
@ -434,7 +434,7 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -452,10 +452,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -473,10 +473,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -494,10 +494,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -515,10 +515,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -536,10 +536,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -558,10 +558,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -580,10 +580,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -600,10 +600,10 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
const char data[] = " << "
|
const char data[] = " << "
|
||||||
" /FunctionType 0 "
|
" /FunctionType 0 "
|
||||||
|
@ -620,7 +620,7 @@ void LexicalAnalyzerTest::test_sampled_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void LexicalAnalyzerTest::test_exponential_function()
|
void LexicalAnalyzerTest::test_exponential_function()
|
||||||
|
@ -724,7 +724,7 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test invalid inputs
|
// Test invalid inputs
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -738,9 +738,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -753,9 +753,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -768,9 +768,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -783,9 +783,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -801,9 +801,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -818,9 +818,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -835,9 +835,9 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 2 "
|
" /FunctionType 2 "
|
||||||
|
@ -852,7 +852,7 @@ void LexicalAnalyzerTest::test_exponential_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void LexicalAnalyzerTest::test_stitching_function()
|
void LexicalAnalyzerTest::test_stitching_function()
|
||||||
|
@ -882,7 +882,7 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 3 "
|
" /FunctionType 3 "
|
||||||
|
@ -897,9 +897,9 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 3 "
|
" /FunctionType 3 "
|
||||||
|
@ -914,9 +914,9 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 3 "
|
" /FunctionType 3 "
|
||||||
|
@ -931,9 +931,9 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 3 "
|
" /FunctionType 3 "
|
||||||
|
@ -947,9 +947,9 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
|
|
||||||
QVERIFY_EXCEPTION_THROWN(
|
QVERIFY_THROWS_EXCEPTION(pdf::PDFException,
|
||||||
{
|
{
|
||||||
QByteArray data = " << "
|
QByteArray data = " << "
|
||||||
" /FunctionType 3 "
|
" /FunctionType 3 "
|
||||||
|
@ -963,7 +963,7 @@ void LexicalAnalyzerTest::test_stitching_function()
|
||||||
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
pdf::PDFFunctionPtr function = pdf::PDFFunction::createFunction(&document, parser.getObject());
|
||||||
|
|
||||||
QVERIFY(!function);
|
QVERIFY(!function);
|
||||||
}, pdf::PDFException);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void LexicalAnalyzerTest::test_postscript_function()
|
void LexicalAnalyzerTest::test_postscript_function()
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
import qbs.FileInfo
|
|
||||||
|
|
||||||
Pdf4QtProduct {
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
type: "application"
|
|
||||||
cpp.rpaths: [FileInfo.joinPaths(cpp.rpathOrigin, "..", "lib"), conanLibDirectory]
|
|
||||||
|
|
||||||
Depends { name: "Pdf4QtLib" }
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: product.type
|
|
||||||
qbs.install: true
|
|
||||||
qbs.installDir: targetInstallDir
|
|
||||||
qbs.installSourceBase: buildDirectory
|
|
||||||
}
|
|
||||||
targetInstallDir: pdf4qtbuildconfig.appInstallDir
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
Pdf4QtProduct {
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
property stringList libType: "dynamiclibrary"
|
|
||||||
type: libType
|
|
||||||
cpp.sonamePrefix: qbs.targetOS.contains("macos") ? "@rpath" : undefined
|
|
||||||
cpp.rpaths: cpp.rpathOrigin
|
|
||||||
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: "dynamiclibrary"
|
|
||||||
qbs.install: install
|
|
||||||
qbs.installDir: targetInstallDir
|
|
||||||
qbs.installSourceBase: buildDirectory
|
|
||||||
}
|
|
||||||
targetInstallDir: pdf4qtbuildconfig.libInstallDir
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
Pdf4QtLibrary {
|
|
||||||
Depends { name: "Pdf4QtLib" }
|
|
||||||
|
|
||||||
Group {
|
|
||||||
fileTagsFilter: "dynamiclibrary"
|
|
||||||
qbs.install: install
|
|
||||||
qbs.installDir: "bin/pdfplugins"
|
|
||||||
qbs.installSourceBase: buildDirectory
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
Product {
|
|
||||||
Depends { name: "pdf4qtbuildconfig" }
|
|
||||||
Depends { name: "cpp" }
|
|
||||||
Depends { name: "Qt.core" }
|
|
||||||
cpp.cxxLanguageVersion: "c++20"
|
|
||||||
cpp.minimumWindowsVersion: "6.1" // Require at least Windows 7, older versions will be ignored
|
|
||||||
property bool install: true
|
|
||||||
property string targetInstallDir
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
Module {
|
|
||||||
property string libDirName: "lib"
|
|
||||||
property string appInstallDir: "bin"
|
|
||||||
property string libInstallDir: qbs.targetOS.contains("windows") ? "bin" : libDirName
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue