DocDiff application: colored icons

This commit is contained in:
Jakub Melka
2021-10-02 19:30:18 +02:00
parent d3aa9efcb3
commit 5972e17146
5 changed files with 106 additions and 27 deletions

View File

@ -1074,6 +1074,16 @@ void PDFDiffResult::finalize()
}
}
uint32_t PDFDiffResult::getTypeFlags(size_t index) const
{
if (index >= m_differences.size())
{
return 0;
}
return uint32_t(m_differences[index].type);
}
QString PDFDiffResult::getMessage(size_t index) const
{
if (index >= m_differences.size())
@ -1154,6 +1164,26 @@ PDFInteger PDFDiffResult::getRightPage(size_t index) const
return m_differences[index].pageIndex2;
}
bool PDFDiffResult::isPageMoveDifference(size_t index) const
{
return getTypeFlags(index) & FLAGS_TYPE_PAGE_MOVE;
}
bool PDFDiffResult::isAddDifference(size_t index) const
{
return getTypeFlags(index) & FLAGS_TYPE_ADD;
}
bool PDFDiffResult::isRemoveDifference(size_t index) const
{
return getTypeFlags(index) & FLAGS_TYPE_REMOVE;
}
bool PDFDiffResult::isReplaceDifference(size_t index) const
{
return getTypeFlags(index) & FLAGS_TYPE_REPLACE;
}
PDFDiffResult PDFDiffResult::filter(bool filterPageMoveDifferences,
bool filterTextDifferences,
bool filterVectorGraphicsDifferences,