mirror of https://github.com/JakubMelka/PDF4QT.git
Polygon/polyline annotations
This commit is contained in:
parent
9fa2a70bf4
commit
23b8373f98
|
@ -145,6 +145,7 @@ public:
|
||||||
_QRectF,
|
_QRectF,
|
||||||
_QColor,
|
_QColor,
|
||||||
_QVariant,
|
_QVariant,
|
||||||
|
_QPolygonF,
|
||||||
_TextAnnotationIcon,
|
_TextAnnotationIcon,
|
||||||
_LinkHighlightMode,
|
_LinkHighlightMode,
|
||||||
_TextAlignment,
|
_TextAlignment,
|
||||||
|
|
|
@ -54,48 +54,86 @@ void PDFExamplesGenerator::generateAnnotationsExample()
|
||||||
builder.createAnnotationFreeText(page3, QRectF(250, 150, 100, 50), QRectF(50, 50, 50, 50), "Title", "Subject", "Toto je stredni text", Qt::AlignCenter, QPointF(250, 150), QPointF(300, 200), pdf::AnnotationLineEnding::OpenArrow, pdf::AnnotationLineEnding::ClosedArrow);
|
builder.createAnnotationFreeText(page3, QRectF(250, 150, 100, 50), QRectF(50, 50, 50, 50), "Title", "Subject", "Toto je stredni text", Qt::AlignCenter, QPointF(250, 150), QPointF(300, 200), pdf::AnnotationLineEnding::OpenArrow, pdf::AnnotationLineEnding::ClosedArrow);
|
||||||
builder.createAnnotationFreeText(page3, QRectF(250, 250, 100, 50), QRectF(0, 50, 50, 50), "Title", "Subject", "Toto je horni text", Qt::AlignRight, QPointF(250, 250), QPointF(300, 300), pdf::AnnotationLineEnding::OpenArrow, pdf::AnnotationLineEnding::ClosedArrow);
|
builder.createAnnotationFreeText(page3, QRectF(250, 250, 100, 50), QRectF(0, 50, 50, 50), "Title", "Subject", "Toto je horni text", Qt::AlignRight, QPointF(250, 250), QPointF(300, 300), pdf::AnnotationLineEnding::OpenArrow, pdf::AnnotationLineEnding::ClosedArrow);
|
||||||
|
|
||||||
pdf::PDFObjectReference page4 = builder.appendPage(QRectF(0, 0, 400, 400));
|
|
||||||
std::vector<QRectF> lineRects;
|
|
||||||
QRectF baseRect = QRectF(0, 0, 100, 50);
|
|
||||||
qreal spaceCoef = 1.2;
|
|
||||||
int lineRows = 400 / (baseRect.height() * spaceCoef);
|
|
||||||
int lineCols = 400 / (baseRect.width() * spaceCoef);
|
|
||||||
int lineNumber = 0;
|
|
||||||
constexpr pdf::AnnotationLineEnding lineEndings[] =
|
|
||||||
{
|
{
|
||||||
pdf::AnnotationLineEnding::None,
|
pdf::PDFObjectReference page4 = builder.appendPage(QRectF(0, 0, 400, 400));
|
||||||
pdf::AnnotationLineEnding::Square,
|
QRectF baseRect = QRectF(0, 0, 100, 50);
|
||||||
pdf::AnnotationLineEnding::Circle,
|
qreal spaceCoef = 1.2;
|
||||||
pdf::AnnotationLineEnding::Diamond,
|
int lineRows = 400 / (baseRect.height() * spaceCoef);
|
||||||
pdf::AnnotationLineEnding::OpenArrow,
|
int lineCols = 400 / (baseRect.width() * spaceCoef);
|
||||||
pdf::AnnotationLineEnding::ClosedArrow,
|
int lineNumber = 0;
|
||||||
pdf::AnnotationLineEnding::Butt,
|
constexpr pdf::AnnotationLineEnding lineEndings[] =
|
||||||
pdf::AnnotationLineEnding::ROpenArrow,
|
|
||||||
pdf::AnnotationLineEnding::RClosedArrow,
|
|
||||||
pdf::AnnotationLineEnding::Slash
|
|
||||||
};
|
|
||||||
for (int i = 0; i < lineCols; ++i)
|
|
||||||
{
|
|
||||||
for (int j = 0; j < lineRows; ++j)
|
|
||||||
{
|
{
|
||||||
QRectF rect = baseRect.translated(i * baseRect.width() * spaceCoef, j * baseRect.height() * spaceCoef);
|
pdf::AnnotationLineEnding::None,
|
||||||
|
pdf::AnnotationLineEnding::Square,
|
||||||
QPointF start;
|
pdf::AnnotationLineEnding::Circle,
|
||||||
QPointF end;
|
pdf::AnnotationLineEnding::Diamond,
|
||||||
if (lineNumber % 2 == 0)
|
pdf::AnnotationLineEnding::OpenArrow,
|
||||||
|
pdf::AnnotationLineEnding::ClosedArrow,
|
||||||
|
pdf::AnnotationLineEnding::Butt,
|
||||||
|
pdf::AnnotationLineEnding::ROpenArrow,
|
||||||
|
pdf::AnnotationLineEnding::RClosedArrow,
|
||||||
|
pdf::AnnotationLineEnding::Slash
|
||||||
|
};
|
||||||
|
for (int i = 0; i < lineCols; ++i)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < lineRows; ++j)
|
||||||
{
|
{
|
||||||
start = rect.topLeft();
|
QRectF rect = baseRect.translated(i * baseRect.width() * spaceCoef, j * baseRect.height() * spaceCoef);
|
||||||
end = rect.bottomRight();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
start = rect.bottomLeft();
|
|
||||||
end = rect.topRight();
|
|
||||||
}
|
|
||||||
|
|
||||||
pdf::AnnotationLineEnding lineEnding = lineEndings[lineNumber % std::size(lineEndings)];
|
QPointF start;
|
||||||
builder.createAnnotationLine(page4, rect, start, end, 2.0, Qt::yellow, Qt::green, "Title", "Subject", "Contents", lineEnding, lineEnding);
|
QPointF end;
|
||||||
++lineNumber;
|
if (lineNumber % 2 == 0)
|
||||||
|
{
|
||||||
|
start = rect.topLeft();
|
||||||
|
end = rect.bottomRight();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
start = rect.bottomLeft();
|
||||||
|
end = rect.topRight();
|
||||||
|
}
|
||||||
|
|
||||||
|
pdf::AnnotationLineEnding lineEnding = lineEndings[lineNumber % std::size(lineEndings)];
|
||||||
|
builder.createAnnotationLine(page4, rect, start, end, 2.0, Qt::yellow, Qt::green, "Title", "Subject", "Contents", lineEnding, lineEnding);
|
||||||
|
++lineNumber;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
pdf::PDFObjectReference page4 = builder.appendPage(QRectF(0, 0, 400, 400));
|
||||||
|
QRectF baseRect = QRectF(0, 0, 100, 50);
|
||||||
|
qreal spaceCoef = 1.2;
|
||||||
|
int lineRows = 400 / (baseRect.height() * spaceCoef);
|
||||||
|
int lineCols = 400 / (baseRect.width() * spaceCoef);
|
||||||
|
int lineNumber = 0;
|
||||||
|
constexpr pdf::AnnotationLineEnding lineEndings[] =
|
||||||
|
{
|
||||||
|
pdf::AnnotationLineEnding::None,
|
||||||
|
pdf::AnnotationLineEnding::Square,
|
||||||
|
pdf::AnnotationLineEnding::Circle,
|
||||||
|
pdf::AnnotationLineEnding::Diamond,
|
||||||
|
pdf::AnnotationLineEnding::OpenArrow,
|
||||||
|
pdf::AnnotationLineEnding::ClosedArrow,
|
||||||
|
pdf::AnnotationLineEnding::Butt,
|
||||||
|
pdf::AnnotationLineEnding::ROpenArrow,
|
||||||
|
pdf::AnnotationLineEnding::RClosedArrow,
|
||||||
|
pdf::AnnotationLineEnding::Slash
|
||||||
|
};
|
||||||
|
for (int i = 0; i < lineCols; ++i)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < lineRows; ++j)
|
||||||
|
{
|
||||||
|
QRectF rect = baseRect.translated(i * baseRect.width() * spaceCoef, j * baseRect.height() * spaceCoef);
|
||||||
|
|
||||||
|
QPointF start(rect.left(), rect.center().y());
|
||||||
|
QPointF end(rect.right(), rect.center().y());
|
||||||
|
|
||||||
|
pdf::AnnotationLineEnding lineEnding = lineEndings[lineNumber % std::size(lineEndings)];
|
||||||
|
builder.createAnnotationLine(page4, rect, start, end, 2.0, Qt::yellow, Qt::green, "Title", "Subject", "Contents",
|
||||||
|
lineEnding, lineEnding, 10.0, 2.0, 3.0, true, (j % 2 == 0));
|
||||||
|
++lineNumber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +147,19 @@ void PDFExamplesGenerator::generateAnnotationsExample()
|
||||||
builder.createAnnotationCircle(page6, QRectF(50, 150, 50, 50), 3.0, QColor(), Qt::red, "Title2", "Subject2", "Contents - red boundary");
|
builder.createAnnotationCircle(page6, QRectF(50, 150, 50, 50), 3.0, QColor(), Qt::red, "Title2", "Subject2", "Contents - red boundary");
|
||||||
builder.createAnnotationCircle(page6, QRectF(50, 250, 50, 50), 3.0, Qt::green, QColor(), "Title3", "Subject3", "Contents - green filling");
|
builder.createAnnotationCircle(page6, QRectF(50, 250, 50, 50), 3.0, Qt::green, QColor(), "Title3", "Subject3", "Contents - green filling");
|
||||||
|
|
||||||
|
pdf::PDFObjectReference page7 = builder.appendPage(QRectF(0, 0, 400, 400));
|
||||||
|
QPolygonF polygon;
|
||||||
|
QRectF polygonRect(50, 50, 50, 50);
|
||||||
|
polygon << polygonRect.topLeft() << polygonRect.center() << polygonRect.topRight() << polygonRect.bottomRight() << polygonRect.bottomLeft() << polygonRect.topLeft();
|
||||||
|
builder.createAnnotationPolygon(page7, polygon, 2.0, Qt::green, Qt::yellow, "Title", "Subject", "Contents");
|
||||||
|
polygon.translate(0, 100);
|
||||||
|
builder.createAnnotationPolygon(page7, polygon, 2.0, Qt::red, Qt::cyan, "Title", "Subject", "Contents");
|
||||||
|
polygon.pop_back();
|
||||||
|
polygon.translate(200, 0);
|
||||||
|
builder.createAnnotationPolyline(page7, polygon, 2.0, Qt::green, Qt::yellow, "Title", "Subject", "Contents", pdf::AnnotationLineEnding::ClosedArrow, pdf::AnnotationLineEnding::Circle);
|
||||||
|
polygon.translate(0, -100);
|
||||||
|
builder.createAnnotationPolyline(page7, polygon, 2.0, Qt::green, Qt::yellow, "Title", "Subject", "Contents", pdf::AnnotationLineEnding::ClosedArrow, pdf::AnnotationLineEnding::Circle);
|
||||||
|
|
||||||
// Write result to a file
|
// Write result to a file
|
||||||
pdf::PDFDocument document = builder.build();
|
pdf::PDFDocument document = builder.build();
|
||||||
pdf::PDFDocumentWriter writer(nullptr);
|
pdf::PDFDocumentWriter writer(nullptr);
|
||||||
|
|
|
@ -64,6 +64,13 @@ void PDFObjectFactory::endDictionaryItem()
|
||||||
std::get<PDFDictionary>(dictionaryItem.object).addEntry(qMove(topItem.itemName), qMove(std::get<PDFObject>(topItem.object)));
|
std::get<PDFDictionary>(dictionaryItem.object).addEntry(qMove(topItem.itemName), qMove(std::get<PDFObject>(topItem.object)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PDFObjectFactory& PDFObjectFactory::operator<<(const QPointF& point)
|
||||||
|
{
|
||||||
|
*this << point.x();
|
||||||
|
*this << point.y();
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
PDFObjectFactory& PDFObjectFactory::operator<<(AnnotationLineEnding lineEnding)
|
PDFObjectFactory& PDFObjectFactory::operator<<(AnnotationLineEnding lineEnding)
|
||||||
{
|
{
|
||||||
switch (lineEnding)
|
switch (lineEnding)
|
||||||
|
@ -858,6 +865,120 @@ PDFObjectReference PDFDocumentBuilder::createAnnotationLine(PDFObjectReference p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PDFObjectReference PDFDocumentBuilder::createAnnotationLine(PDFObjectReference page,
|
||||||
|
QRectF boundingRect,
|
||||||
|
QPointF startPoint,
|
||||||
|
QPointF endPoint,
|
||||||
|
PDFReal lineWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents,
|
||||||
|
AnnotationLineEnding startLineType,
|
||||||
|
AnnotationLineEnding endLineType,
|
||||||
|
PDFReal leaderLineLength,
|
||||||
|
PDFReal leaderLineOffset,
|
||||||
|
PDFReal leaderLineExtension,
|
||||||
|
bool displayContents,
|
||||||
|
bool displayedContentsTopAlign)
|
||||||
|
{
|
||||||
|
PDFObjectFactory objectBuilder;
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Type");
|
||||||
|
objectBuilder << WrapName("Annot");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subtype");
|
||||||
|
objectBuilder << WrapName("Line");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Rect");
|
||||||
|
objectBuilder << boundingRect;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("F");
|
||||||
|
objectBuilder << 4;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("P");
|
||||||
|
objectBuilder << page;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("L");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << startPoint.x();
|
||||||
|
objectBuilder << startPoint.y();
|
||||||
|
objectBuilder << endPoint.x();
|
||||||
|
objectBuilder << endPoint.y();
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("LE");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << startLineType;
|
||||||
|
objectBuilder << endLineType;
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("M");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("CreationDate");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Border");
|
||||||
|
objectBuilder << std::initializer_list<PDFReal>{ 0.0, 0.0, lineWidth };
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("C");
|
||||||
|
objectBuilder << WrapAnnotationColor(strokeColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("IC");
|
||||||
|
objectBuilder << WrapAnnotationColor(fillColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("T");
|
||||||
|
objectBuilder << title;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Contents");
|
||||||
|
objectBuilder << contents;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subj");
|
||||||
|
objectBuilder << subject;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("LL");
|
||||||
|
objectBuilder << leaderLineLength;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("LLO");
|
||||||
|
objectBuilder << leaderLineOffset;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("LLE");
|
||||||
|
objectBuilder << leaderLineExtension;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Cap");
|
||||||
|
objectBuilder << displayContents;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("CP");
|
||||||
|
objectBuilder << (displayedContentsTopAlign ? WrapName("Top") : WrapName("Inline"));
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObjectReference annotationObject = addObject(objectBuilder.takeObject());
|
||||||
|
PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(boundingRect), false);
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Popup");
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject updateAnnotationPopup = objectBuilder.takeObject();
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Annots");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << annotationObject;
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject pageAnnots = objectBuilder.takeObject();
|
||||||
|
mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PDFObjectReference PDFDocumentBuilder::createAnnotationLink(PDFObjectReference page,
|
PDFObjectReference PDFDocumentBuilder::createAnnotationLink(PDFObjectReference page,
|
||||||
QRectF linkRectangle,
|
QRectF linkRectangle,
|
||||||
PDFObjectReference action,
|
PDFObjectReference action,
|
||||||
|
@ -910,6 +1031,172 @@ PDFObjectReference PDFDocumentBuilder::createAnnotationLink(PDFObjectReference p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PDFObjectReference PDFDocumentBuilder::createAnnotationPolygon(PDFObjectReference page,
|
||||||
|
QPolygonF polygon,
|
||||||
|
PDFReal borderWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents)
|
||||||
|
{
|
||||||
|
PDFObjectFactory objectBuilder;
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Type");
|
||||||
|
objectBuilder << WrapName("Annot");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subtype");
|
||||||
|
objectBuilder << WrapName("Polygon");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Rect");
|
||||||
|
objectBuilder << polygon.boundingRect();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("F");
|
||||||
|
objectBuilder << 4;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("P");
|
||||||
|
objectBuilder << page;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Vertices");
|
||||||
|
objectBuilder << polygon;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("M");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("CreationDate");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Border");
|
||||||
|
objectBuilder << std::initializer_list<PDFReal>{ 0.0, 0.0, borderWidth };
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("C");
|
||||||
|
objectBuilder << WrapAnnotationColor(strokeColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("IC");
|
||||||
|
objectBuilder << WrapAnnotationColor(fillColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("T");
|
||||||
|
objectBuilder << title;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Contents");
|
||||||
|
objectBuilder << contents;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subj");
|
||||||
|
objectBuilder << subject;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObjectReference annotationObject = addObject(objectBuilder.takeObject());
|
||||||
|
PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(polygon.boundingRect()), false);
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Popup");
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject updateAnnotationPopup = objectBuilder.takeObject();
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Annots");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << annotationObject;
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject pageAnnots = objectBuilder.takeObject();
|
||||||
|
mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PDFObjectReference PDFDocumentBuilder::createAnnotationPolyline(PDFObjectReference page,
|
||||||
|
QPolygonF polyline,
|
||||||
|
PDFReal borderWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents,
|
||||||
|
AnnotationLineEnding startLineType,
|
||||||
|
AnnotationLineEnding endLineType)
|
||||||
|
{
|
||||||
|
PDFObjectFactory objectBuilder;
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Type");
|
||||||
|
objectBuilder << WrapName("Annot");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subtype");
|
||||||
|
objectBuilder << WrapName("PolyLine");
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Rect");
|
||||||
|
objectBuilder << polyline.boundingRect();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("F");
|
||||||
|
objectBuilder << 4;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("P");
|
||||||
|
objectBuilder << page;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Vertices");
|
||||||
|
objectBuilder << polyline;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("M");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("CreationDate");
|
||||||
|
objectBuilder << WrapCurrentDateTime();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Border");
|
||||||
|
objectBuilder << std::initializer_list<PDFReal>{ 0.0, 0.0, borderWidth };
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("C");
|
||||||
|
objectBuilder << WrapAnnotationColor(strokeColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("IC");
|
||||||
|
objectBuilder << WrapAnnotationColor(fillColor);
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("T");
|
||||||
|
objectBuilder << title;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Contents");
|
||||||
|
objectBuilder << contents;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("Subj");
|
||||||
|
objectBuilder << subject;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.beginDictionaryItem("");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << startLineType;
|
||||||
|
objectBuilder << endLineType;
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObjectReference annotationObject = addObject(objectBuilder.takeObject());
|
||||||
|
PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(polyline.boundingRect()), false);
|
||||||
|
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Popup");
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject updateAnnotationPopup = objectBuilder.takeObject();
|
||||||
|
objectBuilder.beginDictionary();
|
||||||
|
objectBuilder.beginDictionaryItem("Annots");
|
||||||
|
objectBuilder.beginArray();
|
||||||
|
objectBuilder << annotationObject;
|
||||||
|
objectBuilder << popupAnnotation;
|
||||||
|
objectBuilder.endArray();
|
||||||
|
objectBuilder.endDictionaryItem();
|
||||||
|
objectBuilder.endDictionary();
|
||||||
|
PDFObject pageAnnots = objectBuilder.takeObject();
|
||||||
|
mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PDFObjectReference PDFDocumentBuilder::createAnnotationPopup(PDFObjectReference page,
|
PDFObjectReference PDFDocumentBuilder::createAnnotationPopup(PDFObjectReference page,
|
||||||
PDFObjectReference parentAnnotation,
|
PDFObjectReference parentAnnotation,
|
||||||
QRectF rectangle,
|
QRectF rectangle,
|
||||||
|
|
|
@ -105,6 +105,7 @@ public:
|
||||||
PDFObjectFactory& operator<<(WrapFreeTextAlignment alignment);
|
PDFObjectFactory& operator<<(WrapFreeTextAlignment alignment);
|
||||||
PDFObjectFactory& operator<<(WrapString string);
|
PDFObjectFactory& operator<<(WrapString string);
|
||||||
PDFObjectFactory& operator<<(AnnotationLineEnding lineEnding);
|
PDFObjectFactory& operator<<(AnnotationLineEnding lineEnding);
|
||||||
|
PDFObjectFactory& operator<<(const QPointF& point);
|
||||||
|
|
||||||
/// Treat containers - write them as array
|
/// Treat containers - write them as array
|
||||||
template<typename Container, typename ValueType = decltype(*std::begin(std::declval<Container>()))>
|
template<typename Container, typename ValueType = decltype(*std::begin(std::declval<Container>()))>
|
||||||
|
@ -320,6 +321,50 @@ public:
|
||||||
AnnotationLineEnding endLineType);
|
AnnotationLineEnding endLineType);
|
||||||
|
|
||||||
|
|
||||||
|
/// Line annotation represents straight line, or some more advanced graphics, such as dimension with
|
||||||
|
/// text. Line annotations are markup annotations, so they can have popup window. Line endings can
|
||||||
|
/// be specified.
|
||||||
|
/// \param page Page to which is annotation added
|
||||||
|
/// \param boundingRect Line annotation bounding rectangle
|
||||||
|
/// \param startPoint Line start
|
||||||
|
/// \param endPoint Line end
|
||||||
|
/// \param lineWidth Line width
|
||||||
|
/// \param fillColor Fill color of line parts (for example, filled line endings)
|
||||||
|
/// \param strokeColor Line stroke color
|
||||||
|
/// \param title Title (it is displayed as title of popup window)
|
||||||
|
/// \param subject Subject (short description of the subject being adressed by the annotation)
|
||||||
|
/// \param contents Contents (text displayed, for example, in the marked annotation dialog)
|
||||||
|
/// \param startLineType Start line ending type
|
||||||
|
/// \param endLineType End line ending type
|
||||||
|
/// \param leaderLineLength Length of the leader line. Leader line extends from each endpoint of
|
||||||
|
/// the line perpendicular to the line itself. Value can be either positive, negative or zero. If
|
||||||
|
/// positive, then extension is in plane that is above the annotation line (in clockwise order),
|
||||||
|
/// if negative, then it is below the annotation line.
|
||||||
|
/// \param leaderLineOffset Length of leader line offset, which is the amount of empty space
|
||||||
|
/// between the endpoints of the annotation and beginning of leader lines
|
||||||
|
/// \param leaderLineExtension Length of leader line extension, which extends leader lines in 180°
|
||||||
|
/// direction from leader lines (so leader lines continues above drawn line)
|
||||||
|
/// \param displayContents Display contents of the annotation as text along the line
|
||||||
|
/// \param displayedContentsTopAlign Displayed contents appear above the line, instead inline.
|
||||||
|
PDFObjectReference createAnnotationLine(PDFObjectReference page,
|
||||||
|
QRectF boundingRect,
|
||||||
|
QPointF startPoint,
|
||||||
|
QPointF endPoint,
|
||||||
|
PDFReal lineWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents,
|
||||||
|
AnnotationLineEnding startLineType,
|
||||||
|
AnnotationLineEnding endLineType,
|
||||||
|
PDFReal leaderLineLength,
|
||||||
|
PDFReal leaderLineOffset,
|
||||||
|
PDFReal leaderLineExtension,
|
||||||
|
bool displayContents,
|
||||||
|
bool displayedContentsTopAlign);
|
||||||
|
|
||||||
|
|
||||||
/// Creates new link annotation. It usually represents clickable hypertext link. User can also specify
|
/// Creates new link annotation. It usually represents clickable hypertext link. User can also specify
|
||||||
/// action, which can be executed, for example, link can be also in the PDF document (link to some
|
/// action, which can be executed, for example, link can be also in the PDF document (link to some
|
||||||
/// location in document).
|
/// location in document).
|
||||||
|
@ -346,6 +391,50 @@ public:
|
||||||
LinkHighlightMode highlightMode);
|
LinkHighlightMode highlightMode);
|
||||||
|
|
||||||
|
|
||||||
|
/// Polygon annotation. When opened, they display pop-up window containing the text of associated
|
||||||
|
/// note (and window title). Polygon border/fill color can be defined, along with border width.
|
||||||
|
/// \param page Page to which is annotation added
|
||||||
|
/// \param polygon Polygon
|
||||||
|
/// \param borderWidth Border line width
|
||||||
|
/// \param fillColor Fill color
|
||||||
|
/// \param strokeColor Stroke color
|
||||||
|
/// \param title Title
|
||||||
|
/// \param subject Subject
|
||||||
|
/// \param contents Contents
|
||||||
|
PDFObjectReference createAnnotationPolygon(PDFObjectReference page,
|
||||||
|
QPolygonF polygon,
|
||||||
|
PDFReal borderWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents);
|
||||||
|
|
||||||
|
|
||||||
|
/// Polyline annotation. When opened, they display pop-up window containing the text of associated
|
||||||
|
/// note (and window title). Polyline border/fill color can be defined, along with border width.
|
||||||
|
/// \param page Page to which is annotation added
|
||||||
|
/// \param polyline Polyline
|
||||||
|
/// \param borderWidth Border line width
|
||||||
|
/// \param fillColor Fill color
|
||||||
|
/// \param strokeColor Stroke color
|
||||||
|
/// \param title Title
|
||||||
|
/// \param subject Subject
|
||||||
|
/// \param contents Contents
|
||||||
|
/// \param startLineType Start line ending type
|
||||||
|
/// \param endLineType End line ending type
|
||||||
|
PDFObjectReference createAnnotationPolyline(PDFObjectReference page,
|
||||||
|
QPolygonF polyline,
|
||||||
|
PDFReal borderWidth,
|
||||||
|
QColor fillColor,
|
||||||
|
QColor strokeColor,
|
||||||
|
QString title,
|
||||||
|
QString subject,
|
||||||
|
QString contents,
|
||||||
|
AnnotationLineEnding startLineType,
|
||||||
|
AnnotationLineEnding endLineType);
|
||||||
|
|
||||||
|
|
||||||
/// Creates a new popup annotation on the page. Popup annotation is represented usually by floating
|
/// Creates a new popup annotation on the page. Popup annotation is represented usually by floating
|
||||||
/// window, which can be opened, or closed. Popup annotation is associated with parent annotation,
|
/// window, which can be opened, or closed. Popup annotation is associated with parent annotation,
|
||||||
/// which can be usually markup annotation. Popup annotation displays parent annotation's texts, for
|
/// which can be usually markup annotation. Popup annotation displays parent annotation's texts, for
|
||||||
|
|
|
@ -1221,6 +1221,390 @@ return annotationObject;</property>
|
||||||
<property name="variableType">_void</property>
|
<property name="variableType">_void</property>
|
||||||
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
appendTo(page, pageAnnots);
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="functionType">Annotations</property>
|
||||||
|
<property name="functionName">createAnnotationLine</property>
|
||||||
|
<property name="functionDescription">Line annotation represents straight line, or some more advanced graphics, such as dimension with text. Line annotations are markup annotations, so they can have popup window. Line endings can be specified.</property>
|
||||||
|
<property name="returnType">_PDFObjectReference</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedFunction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">page</property>
|
||||||
|
<property name="parameterType">_PDFObjectReference</property>
|
||||||
|
<property name="parameterDescription">Page to which is annotation added</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">boundingRect</property>
|
||||||
|
<property name="parameterType">_QRectF</property>
|
||||||
|
<property name="parameterDescription">Line annotation bounding rectangle</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">startPoint</property>
|
||||||
|
<property name="parameterType">_QPointF</property>
|
||||||
|
<property name="parameterDescription">Line start</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">endPoint</property>
|
||||||
|
<property name="parameterType">_QPointF</property>
|
||||||
|
<property name="parameterDescription">Line end</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">lineWidth</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Line width</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">fillColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Fill color of line parts (for example, filled line endings)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">strokeColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Line stroke color</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">title</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Title (it is displayed as title of popup window)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">subject</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Subject (short description of the subject being adressed by the annotation)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">contents</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Contents (text displayed, for example, in the marked annotation dialog)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">startLineType</property>
|
||||||
|
<property name="parameterType">_AnnotationLineEnding</property>
|
||||||
|
<property name="parameterDescription">Start line ending type</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">endLineType</property>
|
||||||
|
<property name="parameterType">_AnnotationLineEnding</property>
|
||||||
|
<property name="parameterDescription">End line ending type</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">leaderLineLength</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Length of the leader line. Leader line extends from each endpoint of the line perpendicular to the line itself. Value can be either positive, negative or zero. If positive, then extension is in plane that is above the annotation line (in clockwise order), if negative, then it is below the annotation line.</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">leaderLineOffset</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Length of leader line offset, which is the amount of empty space between the endpoints of the annotation and beginning of leader lines</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">leaderLineExtension</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Length of leader line extension, which extends leader lines in 180° direction from leader lines (so leader lines continues above drawn line)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">displayContents</property>
|
||||||
|
<property name="parameterType">_bool</property>
|
||||||
|
<property name="parameterDescription">Display contents of the annotation as text along the line</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">displayedContentsTopAlign</property>
|
||||||
|
<property name="parameterType">_bool</property>
|
||||||
|
<property name="parameterDescription">Displayed contents appear above the line, instead inline.</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">Parameters</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Type</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("Annot")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subtype</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("Line")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Rect</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">boundingRect</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">F</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">4</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">P</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">page</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">startPoint.x();startPoint.y();endPoint.x();endPoint.y()</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">L</property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">startLineType;endLineType</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">LE</property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">M</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">CreationDate</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Border</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">std::initializer_list<PDFReal>{ 0.0, 0.0, lineWidth }</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">C</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(strokeColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">IC</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(fillColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">T</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">title</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Contents</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">contents</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subj</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">subject</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">LL</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">leaderLineLength</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">LLO</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">leaderLineOffset</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">LLE</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">leaderLineExtension</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Cap</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">displayContents</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">CP</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">(displayedContentsTopAlign ? WrapName("Top") : WrapName("Inline"))</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">annotationObject</property>
|
||||||
|
<property name="variableType">_PDFObjectReference</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(boundingRect), false);</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">updateAnnotationPopup</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">annotationObject;popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Annots</property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">pageAnnots</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
return annotationObject;</property>
|
return annotationObject;</property>
|
||||||
</QObject>
|
</QObject>
|
||||||
</property>
|
</property>
|
||||||
|
@ -1429,6 +1813,561 @@ return annotationReference;</property>
|
||||||
<property name="functionDescription">Creates new link annotation. It usually represents clickable hypertext link. User can also specify action, which can be executed, for example, link can be also in the PDF document (link to some location in document).</property>
|
<property name="functionDescription">Creates new link annotation. It usually represents clickable hypertext link. User can also specify action, which can be executed, for example, link can be also in the PDF document (link to some location in document).</property>
|
||||||
<property name="returnType">_PDFObjectReference</property>
|
<property name="returnType">_PDFObjectReference</property>
|
||||||
</QObject>
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedFunction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">page</property>
|
||||||
|
<property name="parameterType">_PDFObjectReference</property>
|
||||||
|
<property name="parameterDescription">Page to which is annotation added</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">polygon</property>
|
||||||
|
<property name="parameterType">_QPolygonF</property>
|
||||||
|
<property name="parameterDescription">Polygon</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">borderWidth</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Border line width</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">fillColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Fill color</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">strokeColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Stroke color</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">title</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Title</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">subject</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Subject</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">contents</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Contents</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">Parameters</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Type</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("Annot")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subtype</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("Polygon")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Rect</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">polygon.boundingRect()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">F</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">4</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">P</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">page</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Vertices</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">polygon</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">M</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">CreationDate</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Border</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">std::initializer_list<PDFReal>{ 0.0, 0.0, borderWidth }</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">C</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(strokeColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">IC</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(fillColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">T</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">title</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Contents</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">contents</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subj</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">subject</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">annotationObject</property>
|
||||||
|
<property name="variableType">_PDFObjectReference</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(polygon.boundingRect()), false);</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">updateAnnotationPopup</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">annotationObject;popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Annots</property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">pageAnnots</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="functionType">Annotations</property>
|
||||||
|
<property name="functionName">createAnnotationPolygon</property>
|
||||||
|
<property name="functionDescription">Polygon annotation. When opened, they display pop-up window containing the text of associated note (and window title). Polygon border/fill color can be defined, along with border width.</property>
|
||||||
|
<property name="returnType">_PDFObjectReference</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedFunction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">page</property>
|
||||||
|
<property name="parameterType">_PDFObjectReference</property>
|
||||||
|
<property name="parameterDescription">Page to which is annotation added</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">polyline</property>
|
||||||
|
<property name="parameterType">_QPolygonF</property>
|
||||||
|
<property name="parameterDescription">Polyline</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">borderWidth</property>
|
||||||
|
<property name="parameterType">_PDFReal</property>
|
||||||
|
<property name="parameterDescription">Border line width</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">fillColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Fill color</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">strokeColor</property>
|
||||||
|
<property name="parameterType">_QColor</property>
|
||||||
|
<property name="parameterDescription">Stroke color</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">title</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Title</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">subject</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Subject</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">contents</property>
|
||||||
|
<property name="parameterType">_QString</property>
|
||||||
|
<property name="parameterDescription">Contents</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">startLineType</property>
|
||||||
|
<property name="parameterType">_AnnotationLineEnding</property>
|
||||||
|
<property name="parameterDescription">Start line ending type</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedParameter">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="parameterName">endLineType</property>
|
||||||
|
<property name="parameterType">_AnnotationLineEnding</property>
|
||||||
|
<property name="parameterDescription">End line ending type</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">Parameters</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Type</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("Annot")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subtype</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapName("PolyLine")</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Rect</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">polyline.boundingRect()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">F</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">4</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">P</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">page</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Vertices</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">polyline</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">M</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">CreationDate</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapCurrentDateTime()</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Border</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">std::initializer_list<PDFReal>{ 0.0, 0.0, borderWidth }</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">C</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(strokeColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">IC</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">WrapAnnotationColor(fillColor)</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">T</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">title</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Contents</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">contents</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Subj</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">subject</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">startLineType;endLineType</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">annotationObject</property>
|
||||||
|
<property name="variableType">_PDFObjectReference</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">PDFObjectReference popupAnnotation = createAnnotationPopup(page, annotationObject, getPopupWindowRect(polyline.boundingRect()), false);</property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">DictionaryItemSimple</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Popup</property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value">popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">updateAnnotationPopup</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items">
|
||||||
|
<QObject class="codegen::GeneratedPDFObject">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">ArraySimple</property>
|
||||||
|
<property name="value">annotationObject;popupAnnotation</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName">Annots</property>
|
||||||
|
<property name="objectType">DictionaryItemComplex</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="dictionaryItemName"></property>
|
||||||
|
<property name="objectType">Dictionary</property>
|
||||||
|
<property name="value"></property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="actionType">CreateObject</property>
|
||||||
|
<property name="variableName">pageAnnots</property>
|
||||||
|
<property name="variableType">_PDFObject</property>
|
||||||
|
<property name="code"></property>
|
||||||
|
</QObject>
|
||||||
|
<QObject class="codegen::GeneratedAction">
|
||||||
|
<property name="objectName"></property>
|
||||||
|
<property name="items"/>
|
||||||
|
<property name="actionType">Code</property>
|
||||||
|
<property name="variableName"></property>
|
||||||
|
<property name="variableType">_void</property>
|
||||||
|
<property name="code">mergeTo(annotationObject, updateAnnotationPopup);
|
||||||
|
appendTo(page, pageAnnots);
|
||||||
|
return annotationObject;</property>
|
||||||
|
</QObject>
|
||||||
|
</property>
|
||||||
|
<property name="functionType">Annotations</property>
|
||||||
|
<property name="functionName">createAnnotationPolyline</property>
|
||||||
|
<property name="functionDescription">Polyline annotation. When opened, they display pop-up window containing the text of associated note (and window title). Polyline border/fill color can be defined, along with border width.</property>
|
||||||
|
<property name="returnType">_PDFObjectReference</property>
|
||||||
|
</QObject>
|
||||||
<QObject class="codegen::GeneratedFunction">
|
<QObject class="codegen::GeneratedFunction">
|
||||||
<property name="objectName"></property>
|
<property name="objectName"></property>
|
||||||
<property name="items">
|
<property name="items">
|
||||||
|
|
Loading…
Reference in New Issue