mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #118: Fixing compilation errors
This commit is contained in:
@@ -30,11 +30,47 @@
|
||||
#include <QPageSize>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
#include <stack>
|
||||
#include <execution>
|
||||
|
||||
namespace pdfviewer
|
||||
{
|
||||
|
||||
class PDFTreeFactory : public pdf::ITreeFactory
|
||||
{
|
||||
public:
|
||||
PDFTreeFactory(QTreeWidgetItem* root)
|
||||
{
|
||||
m_roots.push(root);
|
||||
}
|
||||
|
||||
// ITreeFactory interface
|
||||
virtual void pushItem(QStringList texts) override;
|
||||
virtual void addItem(QStringList texts) override;
|
||||
virtual void popItem() override;
|
||||
|
||||
private:
|
||||
std::stack<QTreeWidgetItem*> m_roots;
|
||||
};
|
||||
|
||||
void PDFTreeFactory::pushItem(QStringList texts)
|
||||
{
|
||||
Q_ASSERT(!m_roots.empty());
|
||||
m_roots.push(new QTreeWidgetItem(m_roots.top(), texts));
|
||||
}
|
||||
|
||||
void PDFTreeFactory::addItem(QStringList texts)
|
||||
{
|
||||
Q_ASSERT(!m_roots.empty());
|
||||
new QTreeWidgetItem(m_roots.top(), texts);
|
||||
}
|
||||
|
||||
void PDFTreeFactory::popItem()
|
||||
{
|
||||
Q_ASSERT(!m_roots.empty());
|
||||
m_roots.pop();
|
||||
}
|
||||
|
||||
PDFDocumentPropertiesDialog::PDFDocumentPropertiesDialog(const pdf::PDFDocument* document,
|
||||
const PDFFileInfo* fileInfo,
|
||||
QWidget* parent) :
|
||||
@@ -352,9 +388,14 @@ void PDFDocumentPropertiesDialog::initializeFonts(const pdf::PDFDocument* docume
|
||||
{
|
||||
new QTreeWidgetItem(fontRootItem, { tr("Font family"), fontDescriptor->fontFamily });
|
||||
}
|
||||
|
||||
new QTreeWidgetItem(fontRootItem, { tr("Embedded subset"), fontDescriptor->getEmbeddedFontData() ? tr("Yes") : tr("No") });
|
||||
font->dumpFontToTreeItem(fontRootItem);
|
||||
realizedFont->dumpFontToTreeItem(fontRootItem);
|
||||
|
||||
PDFTreeFactory treeFactory1(fontRootItem);
|
||||
font->dumpFontToTreeItem(&treeFactory1);
|
||||
|
||||
PDFTreeFactory treeFactory2(fontRootItem);
|
||||
realizedFont->dumpFontToTreeItem(&treeFactory2);
|
||||
|
||||
// Separator item
|
||||
new QTreeWidgetItem(fontRootItem, QStringList());
|
||||
|
@@ -42,6 +42,8 @@
|
||||
#include "pdfrecentfilemanager.h"
|
||||
#include "pdftexttospeech.h"
|
||||
#include "pdfencryptionsettingsdialog.h"
|
||||
#include "pdfwidgetannotation.h"
|
||||
#include "pdfwidgetformmanager.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QPrinter>
|
||||
@@ -385,7 +387,7 @@ void PDFProgramController::initializeAnnotationManager()
|
||||
|
||||
void PDFProgramController::initializeFormManager()
|
||||
{
|
||||
m_formManager = new pdf::PDFFormManager(m_pdfWidget->getDrawWidgetProxy(), this);
|
||||
m_formManager = new pdf::PDFWidgetFormManager(m_pdfWidget->getDrawWidgetProxy(), this);
|
||||
m_formManager->setAnnotationManager(m_annotationManager);
|
||||
m_formManager->setAppearanceFlags(m_settings->getSettings().m_formAppearanceFlags);
|
||||
m_annotationManager->setFormManager(m_formManager);
|
||||
|
@@ -42,7 +42,7 @@ class PDFAction;
|
||||
class PDFWidget;
|
||||
class PDFCMSManager;
|
||||
class PDFToolManager;
|
||||
class PDFFormManager;
|
||||
class PDFWidgetFormManager;
|
||||
class PDFWidgetAnnotationManager;
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ private:
|
||||
pdf::PDFCMSManager* m_CMSManager;
|
||||
pdf::PDFToolManager* m_toolManager;
|
||||
pdf::PDFWidgetAnnotationManager* m_annotationManager;
|
||||
pdf::PDFFormManager* m_formManager;
|
||||
pdf::PDFWidgetFormManager* m_formManager;
|
||||
|
||||
PDFFileInfo m_fileInfo;
|
||||
QFileSystemWatcher m_fileWatcher;
|
||||
|
Reference in New Issue
Block a user