Files
create/src/Gui/PreferencePages/DlgSettingsPDF.h
tetektoza b138276a15 Core: Introduce PDF Import-Export dialog (#20860)
* Core: Introduce PDF Import-Export dialog

Currently, we only have hardcoded exporting to one pdf version, which
leads to (as in one of the below issues) to problems, such as
non-transparent layers, which are by default not supported in PDF/A-1b.

So, this patch adds an option to the user to select their preferred PDF
version by introducing new dialog under Import-Export in Preferences,
and allowing to update that version before exporting.

* Core: Add informational messages regarding selected PDF format

* Gui: Handle Qt < 6.8 unsupported PDF format

* Gui: Switch PDF export prefs dialog to use tr()

* Gui: Remove center alignment of PDF version description

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-04-27 19:31:34 -05:00

43 lines
912 B
C++

#ifndef GUI_DIALOG_DLGSETTINGSPDF_H
#define GUI_DIALOG_DLGSETTINGSPDF_H
#include <Gui/PropertyPage.h>
#include <QPagedPaintDevice>
#include <memory>
namespace Gui {
namespace Dialog {
class Ui_DlgSettingsPDF;
/**
* The DlgSettingsPDF class implements a preference page to change settings
* for the PDF Import-Export.
*/
class GuiExport DlgSettingsPDF: public PreferencePage
{
Q_OBJECT
public:
explicit DlgSettingsPDF(QWidget* parent = nullptr);
~DlgSettingsPDF() override;
void saveSettings() override;
void loadSettings() override;
static QPagedPaintDevice::PdfVersion evaluatePDFVersion();
protected:
void changeEvent(QEvent *e) override;
private:
void onComboBoxIndexChanged(int index);
std::unique_ptr<Ui_DlgSettingsPDF> ui;
// Q_DISABLE_COPY_MOVE(DlgSettingsPDF)
};
} // namespace Dialog
} // namespace Gui
#endif // GUI_DIALOG_DLGSETTINGSPDF_H