2023-05-14 14:06:24 +02:00
|
|
|
#include "documentoutlineentry.h"
|
|
|
|
|
|
|
|
DocumentOutlineEntry::DocumentOutlineEntry()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
QDataStream &operator<<(QDataStream &out, const DocumentOutlineEntry &pd)
|
|
|
|
{
|
|
|
|
out << pd.text << pd.type << pd.destinationPage;
|
|
|
|
out << pd.children.size();
|
|
|
|
for(const DocumentOutlineEntry &entry : pd.children)
|
|
|
|
{
|
|
|
|
out << entry;
|
|
|
|
}
|
|
|
|
return out;
|
|
|
|
}
|
|
|
|
|
|
|
|
QDataStream &operator>>(QDataStream &in, DocumentOutlineEntry &pd)
|
|
|
|
{
|
|
|
|
in >> pd.text >> pd.type >> pd.destinationPage;
|
|
|
|
|
2024-05-23 18:14:21 +02:00
|
|
|
qsizetype numChildren;
|
2023-05-14 14:06:24 +02:00
|
|
|
in >> numChildren;
|
|
|
|
for(int i = 0; i < numChildren; i++)
|
|
|
|
{
|
|
|
|
DocumentOutlineEntry entry;
|
|
|
|
in >> entry;
|
|
|
|
pd.children.append(entry);
|
|
|
|
}
|
|
|
|
return in;
|
|
|
|
}
|