MCPcopy Create free account
hub / github.com/KDE/okular / canRemovePageAnnotation

Method canRemovePageAnnotation

core/document.cpp:3525–3547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3523}
3524
3525bool Document::canRemovePageAnnotation(const Annotation *annotation) const
3526{
3527 if (!annotation || (annotation->flags() & Annotation::DenyDelete)) {
3528 return false;
3529 }
3530
3531 if ((annotation->flags() & Annotation::External) && !d->canRemoveExternalAnnotations()) {
3532 return false;
3533 }
3534
3535 switch (annotation->subType()) {
3536 case Annotation::AText:
3537 case Annotation::ALine:
3538 case Annotation::AGeom:
3539 case Annotation::AHighlight:
3540 case Annotation::AStamp:
3541 case Annotation::AInk:
3542 case Annotation::ACaret:
3543 return true;
3544 default:
3545 return false;
3546 }
3547}
3548
3549void Document::removePageAnnotation(int page, Annotation *annotation)
3550{

Callers 4

removeAnnotationMethod · 0.80
addActionsToMenuMethod · 0.80

Calls 3

subTypeMethod · 0.80
flagsMethod · 0.45

Tested by 1