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

Method QtAnnotation

ASAP/annotation/QtAnnotation.cpp:10–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8bool QtAnnotation::annotationColorForRects = true;
9
10QtAnnotation::QtAnnotation(const std::shared_ptr<Annotation>& annotation, QObject* parent, float scale) :
11QGraphicsItem(),
12QObject(parent),
13_annotation(annotation),
14_scale(scale),
15_editable(true),
16_activeSeedPoint(-1),
17_finished(false),
18_lastClickedFirstCoordinateIndex(-1),
19_lastClickedSecondCoordinateIndex(-1)
20{
21 // We consider the first point to act as the 'center' of the annotation
22 if (_annotation) {
23 Point center = _annotation->getCoordinate(0);
24 this->setPos(center.getX()*_scale, center.getY()*_scale);
25 }
26 this->setFlag(QGraphicsItem::ItemIsSelectable);
27}
28
29QtAnnotation::~QtAnnotation() {
30 _annotation = NULL;

Callers

nothing calls this directly

Calls 1

getCoordinateMethod · 0.80

Tested by

no test coverage detected