| 8 | bool QtAnnotation::annotationColorForRects = true; |
| 9 | |
| 10 | QtAnnotation::QtAnnotation(const std::shared_ptr<Annotation>& annotation, QObject* parent, float scale) : |
| 11 | QGraphicsItem(), |
| 12 | QObject(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 | |
| 29 | QtAnnotation::~QtAnnotation() { |
| 30 | _annotation = NULL; |
nothing calls this directly
no test coverage detected