MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / keyPressEvent

Method keyPressEvent

ASAP/annotation/RectangleAnnotationTool.cpp:88–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void RectangleAnnotationTool::keyPressEvent(QKeyEvent *event) {
89 AnnotationTool::keyPressEvent(event);
90 if (event->key() == Qt::Key::Key_Delete) {
91 if (!_generating && _annotationPlugin->getActiveAnnotation()) {
92 if (_annotationPlugin->getActiveAnnotation()->getAnnotation()->getCoordinates().size() <= 2) {
93 _annotationPlugin->deleteAnnotation(_annotationPlugin->getActiveAnnotation());
94 event->accept();
95 }
96 }
97 }
98}
99
100void RectangleAnnotationTool::cancelAnnotation() {
101 if (_generating) {

Callers

nothing calls this directly

Calls 5

getActiveAnnotationMethod · 0.80
sizeMethod · 0.80
getCoordinatesMethod · 0.80
deleteAnnotationMethod · 0.80
getAnnotationMethod · 0.45

Tested by

no test coverage detected