mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Create link annotation
This commit is contained in:
@ -40,6 +40,14 @@ QObjectList GeneratedCodeStorage::getFunctions() const
|
||||
void GeneratedCodeStorage::setFunctions(const QObjectList& functions)
|
||||
{
|
||||
m_functions = functions;
|
||||
|
||||
auto comparator = [](const QObject* left, const QObject* right)
|
||||
{
|
||||
const GeneratedFunction* leftFunction = qobject_cast<const GeneratedFunction*>(left);
|
||||
const GeneratedFunction* rightFunction = qobject_cast<const GeneratedFunction*>(right);
|
||||
return leftFunction->getFunctionName() < rightFunction->getFunctionName();
|
||||
};
|
||||
std::sort(m_functions.begin(), m_functions.end(), comparator);
|
||||
}
|
||||
|
||||
GeneratedFunction* GeneratedCodeStorage::addFunction(const QString& name)
|
||||
|
@ -145,7 +145,8 @@ public:
|
||||
_QRectF,
|
||||
_QColor,
|
||||
_QVariant,
|
||||
_TextAnnotationIcon
|
||||
_TextAnnotationIcon,
|
||||
_LinkHighlightMode
|
||||
};
|
||||
Q_ENUM(DataType)
|
||||
|
||||
@ -352,7 +353,8 @@ public:
|
||||
{
|
||||
Structure,
|
||||
Annotations,
|
||||
ColorSpace
|
||||
ColorSpace,
|
||||
Actions
|
||||
};
|
||||
Q_ENUM(FunctionType)
|
||||
|
||||
|
Reference in New Issue
Block a user