#Issue 25: Plugin compilation + icons for programs

This commit is contained in:
Jakub Melka
2022-08-21 18:03:06 +02:00
parent e5775906cf
commit 0c4b5fbc82
20 changed files with 333 additions and 17 deletions

View File

@@ -0,0 +1,33 @@
# 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/>.
add_library(AudioBookPlugin SHARED
audiobookcreator.cpp
audiobookplugin.cpp
audiotextstreameditordockwidget.cpp
audiotextstreameditordockwidget.ui
icons.qrc
)
target_link_libraries(AudioBookPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(AudioBookPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,26 @@
# 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/>.
set(PDF4QT_PLUGINS_DIR ${PROJECT_BINARY_DIR}/pdfplugins)
add_subdirectory(AudioBookPlugin)
add_subdirectory(DimensionsPlugin)
add_subdirectory(ObjectInspectorPlugin)
add_subdirectory(OutputPreviewPlugin)
add_subdirectory(RedactPlugin)
add_subdirectory(SignaturePlugin)
add_subdirectory(SoftProofingPlugin)

View File

@@ -0,0 +1,33 @@
# 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/>.
add_library(DimensionsPlugin SHARED
dimensionsplugin.cpp
dimensiontool.cpp
settingsdialog.cpp
settingsdialog.ui
icons.qrc
)
target_link_libraries(DimensionsPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(DimensionsPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,39 @@
# 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/>.
add_library(ObjectInspectorPlugin SHARED
objectinspectordialog.cpp
objectinspectorplugin.cpp
objectstatisticsdialog.cpp
objectviewerwidget.cpp
pdfobjectinspectortreeitemmodel.cpp
statisticsgraphwidget.cpp
objectinspectordialog.ui
objectstatisticsdialog.ui
objectviewerwidget.ui
statisticsgraphwidget.ui
icons.qrc
)
target_link_libraries(ObjectInspectorPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(ObjectInspectorPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,35 @@
# 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/>.
add_library(OutputPreviewPlugin SHARED
inkcoveragedialog.cpp
outputpreviewdialog.cpp
outputpreviewplugin.cpp
outputpreviewwidget.cpp
inkcoveragedialog.ui
outputpreviewdialog.ui
icons.qrc
)
target_link_libraries(OutputPreviewPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(OutputPreviewPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,32 @@
# 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/>.
add_library(RedactPlugin SHARED
createredacteddocumentdialog.cpp
redactplugin.cpp
createredacteddocumentdialog.ui
icons.qrc
)
target_link_libraries(RedactPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(RedactPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,34 @@
# 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/>.
add_library(SignaturePlugin SHARED
signatureplugin.cpp
signdialog.cpp
signdialog.ui
icons.qrc
)
target_link_libraries(SignaturePlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
target_link_libraries(SignaturePlugin PRIVATE OpenSSL::SSL OpenSSL::Crypto)
set_target_properties(SignaturePlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})

View File

@@ -441,7 +441,7 @@ void SignaturePlugin::onSignDigitally()
{
QString offsetString = QString::number(offset);
offsetString = offsetString.leftJustified(static_cast<int>(offsetMarkStringLength), ' ', true);
const auto index = buffer.data().lastIndexOf(QString(offsetMarkString), indexOfSignature);
const auto index = buffer.data().lastIndexOf(QByteArray(offsetMarkString, offsetMarkStringLength), indexOfSignature);
buffer.seek(index);
buffer.write(offsetString.toLocal8Bit());
};

View File

@@ -0,0 +1,31 @@
# 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/>.
add_library(SoftProofingPlugin SHARED
softproofingplugin.cpp
settingsdialog.cpp
settingsdialog.ui
icons.qrc
)
target_link_libraries(SoftProofingPlugin PRIVATE Pdf4QtLib Qt6::Core Qt6::Gui Qt6::Widgets Qt6::OpenGLWidgets)
set_target_properties(SoftProofingPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${PDF4QT_PLUGINS_DIR})